From c6da28cde9dc469ee1e2d4dba4b7234307d9bd5a Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期三, 25 十二月 2024 16:54:14 +0800
Subject: [PATCH] 1.根据客户需求修改 看板内容、新增字段
---
src/views/kanbanManager/ckgl.vue | 48
src/views/materialManager/inventoryList.vue | 3478 +++---
src/views/workOrder/workOrderClose.vue | 6950 ++++++------
src/api/kanbanManager.js | 28
src/views/workOrder/produceOrderList.vue | 2648 ++--
src/views/kanbanManager/cj.vue | 159
src/views/produce/stepReport.vue | 3430 +++---
src/views/systemSetting/dataImport.vue | 6
src/utils/myEcharts.js | 49
src/views/basicSettings/personList.vue | 1484 +-
src/views/workOrder/workOrderList.vue | 8180 +++++++-------
src/views/workOrder/workOrderSend.vue | 6962 ++++++------
12 files changed, 16,951 insertions(+), 16,471 deletions(-)
diff --git a/src/api/kanbanManager.js b/src/api/kanbanManager.js
index ec3a1e0..77acd4e 100644
--- a/src/api/kanbanManager.js
+++ b/src/api/kanbanManager.js
@@ -1,5 +1,33 @@
import request from '@/utils/request'
+export function ProductionStockedInRightBottom() {
+ return request({
+ url: 'KanBanManagerent/ProductionStockedInRightBottom',
+ method: 'get'
+ })
+}
+
+export function ProcureOutsourcRightTop() {
+ return request({
+ url: 'KanBanManagerent/ProcureOutsourcRightTop',
+ method: 'get'
+ })
+}
+
+export function ProductConsignmentLeftBottom() {
+ return request({
+ url: 'KanBanManagerent/ProductConsignmentLeftBottom',
+ method: 'get'
+ })
+}
+
+export function ProcureOutsourcLeftTop() {
+ return request({
+ url: 'KanBanManagerent/ProcureOutsourcLeftTop',
+ method: 'get'
+ })
+}
+
// 杞﹂棿鐪嬫澘,涓婄敓浜т俊鎭�
export function WorkShopProduceTopData(data) {
return request({
diff --git a/src/utils/myEcharts.js b/src/utils/myEcharts.js
index 3fb285e..415693e 100644
--- a/src/utils/myEcharts.js
+++ b/src/utils/myEcharts.js
@@ -356,13 +356,13 @@
// 缁煎悎鐪嬫澘鍥�
export function bar02(dataArr, titlenameArr) {
- // const data = [700, 600, 50, 40, 30]
- // const titlename = ['500ml鎻愭墜鐩栧挅鍟℃澂 钃濊壊 鍠峰', '500ml鎻愭墜鐩栧挅鍟℃澂 钃濊壊 鍠峰', '灏哄', '棰滆壊', '澶у皬']
+ // const data = [70, 60, 50, 40, 30]
+ // const titlename = ['澶栬鍒掍激', '琛ㄩ潰娌规薄', '灏哄', '棰滆壊', '澶у皬']
// const data = val.map(i => i.cont)
// const titlename = val.map(i => i.name)
- const data = dataArr.filter((item, index) => index < 5)
+ const data = dataArr.filter((item, index) => index < 10)
- const titlename = titlenameArr.filter((item, index) => index < 5)
+ const titlename = titlenameArr.filter((item, index) => index < 10)
const length = titlename.length
if (titlename.length < 5) {
@@ -371,13 +371,14 @@
}
}
- console.log(titlename, 123)
-
- // const valdata = [683, 500, 400, 300, 200]
+ const valdata = [683, 500, 400, 300, 200]
// const myColor = ['#FF0000', '#FF5511', '#FF8800', '#FFBB00', '#FFFF00']
// const myColor = ['#0000FF']
// const myColor = ['#7af5f5', '#00FFFF', '#00FFFF', '#00FFFF', '#00FFFF']
- const myColor = ['rgba(122,245,245,1)', 'rgba(122,245,245,0.95)', 'rgba(122,245,245,0.9)', 'rgba(122,245,245,0.85)', 'rgba(122,245,245,0.8)']
+ const myColor = [
+ 'rgba(122,245,245,1)', 'rgba(122,245,245,0.95)', 'rgba(122,245,245,0.9)', 'rgba(122,245,245,0.85)', 'rgba(122,245,245,0.8)',
+ 'rgba(122,245,245,0.75)', 'rgba(122,245,245,0.7)', 'rgba(122,245,245,0.65)', 'rgba(122,245,245,0.6)', 'rgba(122,245,245,0.55)'
+ ]
const option = {
animation: false,
backgroundColor: 'transparent',
@@ -423,16 +424,11 @@
show: false
},
axisLabel: {
- show: false,
// color: '#fff',
color: function(value, index) {
return value === '0' ? 'transparent' : '#fff'
},
- verticalAlign: 'bottom',
- // align: 'left',
- // margin: 80,
fontSize: 20,
-
// formatter: function(value, index) {
// return [
// '{lg|' + (index + 1) + '銆� }' + '{title|' + value + '} '
@@ -462,12 +458,12 @@
}
},
{
- show: true,
+ show: false,
inverse: true,
- data: data,
+ data: valdata,
axisLabel: {
textStyle: {
- fontSize: 20,
+ fontSize: 12,
color: '#fff'
}
},
@@ -502,24 +498,13 @@
},
label: {
normal: {
- color: '#fff',
show: true,
- position: [0, '-20px'],
- textStyle: {
- fontSize: 16
- },
- formatter: function(a, b) {
- return a.name
- }
+ position: 'right',
+ formatter: '{c}',
+ fontSize: 20,
+ color: '#fff'
+ // formatter: '{c}%',
}
- // normal: {
- // show: true,
- // position: 'right',
- // formatter: '{c}',
- // fontSize: 20,
- // color: '#fff'
- // // formatter: '{c}%',
- // }
}
}
]
diff --git a/src/views/basicSettings/personList.vue b/src/views/basicSettings/personList.vue
index 636a649..57ca8b4 100644
--- a/src/views/basicSettings/personList.vue
+++ b/src/views/basicSettings/personList.vue
@@ -1,715 +1,769 @@
-<template>
- <div>
- <div class="body" :style="{height:mainHeight+'px'}">
- <div style="display: flex">
- <!-- background:rgba(248,248,250,1);-->
- <div style="width: 300px;margin: 10px 10px 0 0;background: #fff">
-
- <div style="margin: 20px 10px 0 10px;display: flex;justify-content: space-between;">
- <div style="display: flex;">
- <div
- style="width: 5px;height: 100%;border-radius: 5px;"
- :style="{background:$store.state.settings.theme}"
- />
- <div style="margin-left: 8px;">缁勭粐鏋舵瀯</div>
- </div>
-
- <!-- <div style="margin-right:10px">-->
- <!-- <i class="el-icon-plus" style="cursor: pointer;color: #999" />-->
- <!-- </div>-->
-
- </div>
-
- <el-tree
- ref="treeLeftRef"
- key="treeLeftKey"
- style="padding: 10px;overflow: auto;"
- :style="{height:(tableHeight+180)+'px'}"
- :data="treeLeft"
- node-key="torg_code"
- highlight-current
- :props="defaultPropsLeft"
- :default-expand-all="true"
- :expand-on-click-node="false"
- @node-click="nodeClick"
- />
-
- </div>
-
- <div style="width: calc(100% - 300px)">
- <div class="bodyTopButtonGroup" style="justify-content: space-between">
- <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
- <el-button v-waves type="success" icon="el-icon-download" @click="$router.push('./../systemSetting/dataImport?fileCode=3')">瀵煎叆</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-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />
- </el-form-item>
- <el-form-item label="鐢ㄦ埛鍚嶇О" style=" display: flex;">
- <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />
- </el-form-item>
- <!-- <el-form-item label="鐢ㄦ埛缂栫爜" style=" display: flex;">-->
- <!-- <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">-->
- <!-- <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛缂栫爜" style=" display: flex;">-->
- <!-- <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">-->
- <!-- <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛缂栫爜" style=" display: flex;">-->
- <!-- <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">-->
- <!-- <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />-->
- <!-- </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="getUserData">鏌ヨ</el-button>
- <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
- </div>
- </el-form>
- <div
- class="bodyTopFormExpand"
- style="height: 5px;"
- >
- <!-- <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+80)+'px'"
- border
- row-class-name="custom-row"
- :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'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="usercode"
- label="鐢ㄦ埛缂栫爜"
- sortable="custom"
- show-overflow-tooltip
- />
- <el-table-column
- prop="username"
- label="鐢ㄦ埛鍚嶇О"
- sortable="custom"
- show-overflow-tooltip
- />
- <el-table-column
- prop="storg_name"
- label="鎵�灞炵粍缁�"
- show-overflow-tooltip
- sortable="custom"
- >
- <template slot-scope="{row}">
- <div v-if="row.storg_name">{{ row.storg_name }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="status"
- label="鐘舵��"
- show-overflow-tooltip
- sortable="custom"
- >
- <template slot-scope="{row}">
- <el-tag v-if="row.status==='Y'" size="small" type="success">鍦ㄨ亴</el-tag>
- <el-tag v-if="row.status==='N'" size="small" type="danger">绂昏亴</el-tag>
- </template>
- </el-table-column>
- <el-table-column
- prop="email"
- label="閭"
- sortable="custom"
- show-overflow-tooltip
- >
- <template slot-scope="{row}">
- {{ row.email ? row.email : '/' }}
- </template>
- </el-table-column>
- <el-table-column
- prop="mobile"
- label="鍙风爜"
- sortable="custom"
- show-overflow-tooltip
- >
- <template slot-scope="{row}">
- {{ row.mobile ? row.mobile : '/' }}
- </template>
- </el-table-column>
- <el-table-column
- prop="postname"
- label="宀椾綅"
- sortable="custom"
- show-overflow-tooltip
- >
- <template slot-scope="{row}">
- {{ row.postname ? row.postname : '/' }}
- </template>
- </el-table-column>
- <el-table-column
- prop="rolename"
- label="瑙掕壊"
- sortable="custom"
- show-overflow-tooltip
- >
- <template slot-scope="{row}">
- {{ row.rolename ? row.rolename : '/' }}
- </template>
- </el-table-column>
- <el-table-column
- prop="group_name"
- label="鐝粍"
- sortable="custom"
- show-overflow-tooltip
- >
- <template slot-scope="{row}">
- {{ row.group_name ? row.group_name : '/' }}
- </template>
- </el-table-column>
- <el-table-column
- prop="createusername"
- label="鍒涘缓浜哄憳"
- sortable="custom"
- />
- <el-table-column
- prop="lm_date"
- label="鍒涘缓鏃堕棿"
- width="160"
- sortable="custom"
- />
- <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
- v-if="row.usercode!=='9999'"
- class="el-icon-edit-outline"
- :style="{color:$store.state.settings.theme}"
- @click="edit('edit',row)"
- />
- </el-tooltip>
- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
- <i
- v-if="row.usercode!=='9999'"
- class="el-icon-delete"
- :style="{color:$store.state.settings.theme}"
- @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,jumper"
- popper-class="select_bottom"
- @pagination="getUserData"
- />
- </div>
-
- </div>
-
- </div>
-
- <el-dialog
- v-el-drag-dialog
- :title="operation==='add'?'鏂板':'缂栬緫'"
- :visible.sync="dialogVisible"
- width="800px"
- :close-on-click-modal="false"
- top="15vh"
- @closed="handleClose"
- @close="handleClose"
- >
- <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
- <el-form-item label="鐢ㄦ埛缂栫爜" prop="usercode">
- <el-input v-model="dialogForm.usercode" :disabled="operation!=='add'" style="width: 200px" />
- </el-form-item>
- <el-form-item label="鐢ㄦ埛鍚嶇О" prop="username">
- <el-input v-model="dialogForm.username" style="width: 200px" />
- </el-form-item>
-
- <el-form-item label="鐢ㄦ埛瀵嗙爜" prop="password">
- <el-input v-model="dialogForm.password" style="width: 200px" />
- </el-form-item>
-
- <el-form-item label="鎵�灞炵粍缁�" prop="storg_code">
- <el-cascader
- ref="cascader"
- v-model="dialogForm.storg_code"
- :options="cascaderOptions"
- filterable
- :props="defaultProps"
- :show-all-levels="false"
- />
- </el-form-item>
-
- <el-form-item label="鎵嬫満鍙�" prop="mobile">
- <el-input v-model="dialogForm.mobile" style="width: 200px" />
- </el-form-item>
- <el-form-item label="閭" prop="email">
- <el-input v-model="dialogForm.email" style="width: 200px" />
- </el-form-item>
-
- <el-form-item required label="鐢ㄦ埛鐘舵��">
- <el-radio-group v-model="dialogForm.status" style="width: 200px;">
- <el-radio label="Y">鍦ㄨ亴</el-radio>
- <el-radio label="N">绂昏亴</el-radio>
- </el-radio-group>
- </el-form-item>
-
- <el-form-item prop="post_code" label="宀椾綅">
- <el-select
- v-model="dialogForm.post_code"
- style="width:490px"
- placeholder="璇烽�夋嫨"
- multiple
- filterable
- clearable
- collapse-tags
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in postArr"
- :key="item.postcode"
- :label="item.postname"
- :value="item.postcode"
- />
- </el-select>
- </el-form-item>
-
- <el-form-item prop="role_code" label="瑙掕壊">
- <el-select
- v-model="dialogForm.role_code"
- style="width:490px"
- multiple
- filterable
- clearable
- collapse-tags
- placeholder="璇烽�夋嫨"
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in roleArr"
- :key="item.rolecode"
- :label="item.rolename"
- :value="item.rolecode"
- />
- </el-select>
- </el-form-item>
- <el-form-item prop="group_code" label="鐝粍">
- <el-select
- v-model="dialogForm.group_code"
- style="width: 490px"
- placeholder="璇烽�夋嫨"
- :popper-append-to-body="false"
- multiple
- filterable
- collapse-tags
- clearable
- >
- <el-option
- v-for="item in groupArr"
- :key="item.usergroupcode"
- :label="item.usergroupname"
- :value="item.usergroupcode"
- />
- </el-select>
- </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-waves
- type="primary"
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- @click="dialogVisibleConfirm"
- >纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- </div>
-</template>
-
-<script>
-import Pagination from '@/components/Pagination'
-import {
- AddUpdateUserSave,
- DeleteUserSave, UserData
-} from '@/api/basicSettings'
-import { validateCode } from '@/utils/global'
-import elDragDialog from '@/directive/el-drag-dialog'
-import waves from '@/directive/waves'
-import arrayToTree from 'array-to-tree'
-import { GroupsPermissions, PostPermissions, PrentOrganization, RolePermissions } from '@/api/GeneralBasicData'
-
-export default {
- name: 'PersonList',
- components: {
- Pagination
- },
- directives: { elDragDialog, waves },
- data() {
- const validateMobile = (rule, value, callback) => {
- if (!value) {
- callback()
- // return callback(new Error('璇疯緭鍏ョ數璇濆彿鐮�'))
- } else {
- const mobile = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ // 闀垮彿
- const mobile2 = /^[0-9]{6}$/ // 鐭彿
- if (mobile.test(value) || mobile2.test(value)) {
- callback()
- // return callback(new Error('鐢佃瘽鍙风爜涓嶇鍚堣鍒�'))
- } else {
- return callback(new Error('鐢佃瘽鍙风爜涓嶇鍚堣鍒�'))
- // callback()
- }
- }
- }
- const validateEmail = (rule, value, callback) => {
- if (!value) {
- callback()
- // return callback(new Error('璇疯緭鍏ョ數瀛愰偖绠�'))
- } else {
- const email = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+$/
- if (email.test(value)) {
- callback()
- } else {
- return callback(new Error('鐢靛瓙閭涓嶇鍚堣鍒�'))
- }
- }
- }
- return {
- mouseHoverType: 'mouseout',
- isExpandForm: false,
- mainHeight: 0,
- tableHeight: 0,
- form: {
- usercode: '',
- username: '',
- storgcode: '', // 缁勭粐缂栫爜
- prop: 'lm_date', // 鎺掑簭瀛楁
- order: 'desc', // 鎺掑簭瀛楁
- page: 1, // 绗嚑椤�
- rows: 20 // 姣忛〉澶氬皯鏉�
- },
- total: 10,
- tableData: [],
- dialogVisible: false,
- dialogForm: {
- usercode: '', // 鐢ㄦ埛缂栫爜
- username: '', // 鐢ㄦ埛鍚嶇О
- post_code: [], // 宀椾綅
- role_code: [], // 瑙掕壊
- group_code: [], // 鐝粍
- password: '123456', // 瀵嗙爜
- storg_code: '', // 鎵�灞炵粍缁�
- mobile: '', // 鍙风爜
- email: '', // 閭
- status: 'Y'// 鐘舵��
- },
- operation: '',
- dialogFormRules: {
- usercode: [
- { required: true, validator: validateCode, trigger: ['blur', 'change'] }
- ],
- username: [
- { required: true, message: '璇疯緭鍏ョ粍缁囧悕绉�', trigger: ['blur', 'change'] }
- ],
- password: [
- { required: true, message: '璇疯緭鍏ョ敤鎴峰瘑鐮�', trigger: ['blur', 'change'] }
- ],
- mobile: [
- { required: false, validator: validateMobile, trigger: ['blur', 'change'] }
- ],
- email: [
- { required: false, validator: validateEmail, trigger: ['blur', 'change'] }
- ],
- storg_code: [
- { required: true, message: '璇烽�夋嫨鎵�灞炵粍缁�', trigger: ['blur', 'change'] }
- ]
- },
- defaultProps: {
- checkStrictly: true,
- expandTrigger: 'hover',
- value: 'torg_code',
- label: 'torg_name'
- },
- Options: [],
- cascaderOptions: [],
-
- postArr: [],
- roleArr: [],
- groupArr: [],
-
- defaultPropsLeft: {
- children: 'children',
- label: 'torg_name'
- },
- treeLeft: []
-
- }
- },
- activated() {
window.addEventListener('resize', this.getHeight)
this.getHeight()
},
created() {
- this.getUserData()
- },
- mounted() {
- window.addEventListener('resize', this.getHeight)
- this.getHeight()
-
- this.getPrentOrganization()
- this.getAllSelectData()
- },
- methods: {
- // 缁勭粐鏋舵瀯澶у垪琛ㄦ煡璇�
- async getUserData() {
- const res = await UserData(this.form)
- this.tableData = res.data
- this.total = res.count
- },
- // 缁勭粐鏋舵瀯绾ц仈閫夋嫨鍣�
- async getPrentOrganization() {
- const { data: res } = await PrentOrganization()
- this.Options = res
- this.cascaderOptions = arrayToTree(res, {
- parentProperty: 'parent_id',
- customID: 'torg_code',
- childrenProperty: 'children'
- })
- this.$nextTick(() => {
- this.treeLeft = this.cascaderOptions
- this.$forceUpdate()
- })
- },
- // 宀椾綅 瑙掕壊 鐝粍
- async getAllSelectData() {
- const { data: res1 } = await PostPermissions()
- this.postArr = res1
-
- const { data: res2 } = await RolePermissions()
- this.roleArr = res2
-
- const { data: res3 } = await GroupsPermissions()
- this.groupArr = res3
- },
-
- // 鎺掑簭鏀瑰彉鏃�
- 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.getUserData()
- },
- nodeClick(obj, Node, VueComponent) {
- this.form.storgcode = obj.torg_code
- this.getUserData()
- },
- // 閲嶇疆
- reset() {
- this.form.usercode = ''
- this.form.username = ''
- this.form.storgcode = ''
- this.$refs.treeLeftRef.setCurrentKey(null)
- this.getUserData()
- },
- // 鏂板鎸夐挳
- add(operation) {
- this.operation = operation
- this.dialogVisible = true
- this.dialogForm.OperType = 'Add'
- },
- // 淇敼鎸夐挳
- async edit(operation, row) {
- this.operation = operation
- this.dialogVisible = true
- this.dialogForm.OperType = 'Update'
-
- // this.cascaderOptions = this.filterChildren(this.cascaderOptions, row.storg_code)
- this.$nextTick(() => {
- this.dialogForm.usercode = row.usercode
- this.dialogForm.username = row.username
- this.dialogForm.password = row.password
- this.dialogForm.mobile = row.mobile
- this.dialogForm.email = row.email
- this.dialogForm.status = row.status
- this.dialogForm.storg_code = this.findParent([], row.storg_code, this.cascaderOptions).reverse()
-
- this.dialogForm.post_code = row.post_code ? row.post_code.split(',') : []
- this.dialogForm.role_code = row.role_code ? row.role_code.split(',') : []
- this.dialogForm.group_code = row.group_code ? row.group_code.split(',') : []
- })
- },
- filterChildren(treeData, code) {
- treeData.forEach(item => {
- if (code.split(',').includes(item.torg_code)) {
- item.disabled = true
- if (item.children && item.children.length > 0) {
- this.filterChildren(item.children, item.children.map(it => it.torg_code).join(','))
- }
- } else {
- if (item.children && item.children.length > 0) {
- this.filterChildren(item.children, code)
- }
- }
- })
- return treeData
- },
- // parents:鐢ㄤ簬杩斿洖鐨勬暟缁勶紝childNode:瑕佹煡璇㈢殑鑺傜偣锛宼reeData锛歫son鏍戝舰鏁版嵁
- findParent(parents, childNode, treeData) {
- // console.log(parents, childNode, treeData, 2)
-
- for (let i = 0; i < treeData.length; i++) {
- // 鐖惰妭鐐规煡璇㈡潯浠�
- if (treeData[i].torg_code === childNode) {
- // 濡傛灉鎵惧埌缁撴灉,淇濆瓨褰撳墠鑺傜偣
- parents.push(treeData[i].torg_code)
- // 鐢ㄥ綋鍓嶈妭鐐瑰啀鍘诲師鏁版嵁鏌ユ壘褰撳墠鑺傜偣鐨勭埗鑺傜偣
- this.findParent(parents, treeData[i].parent_id, this.cascaderOptions)
- break
- } else {
- if (treeData[i].children instanceof Array) {
- // 娌℃壘鍒帮紝閬嶅巻璇ヨ妭鐐圭殑瀛愯妭鐐�
- this.findParent(parents, childNode, treeData[i].children)
- }
- }
- }
- return parents
- },
- // 鍒犻櫎鎸夐挳
- async del(row) {
- this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- DeleteUserSave({ usercode: row.usercode }).then(res => {
- if (res.code === '200') {
- this.$notify.success('鍒犻櫎鎴愬姛!')
- if (this.form.page > 1 && this.tableData.length === 1) {
- this.form.page--
- }
- this.getUserData()
- }
- })
- }).catch(() => {
- this.$notify.info('宸插彇娑堝垹闄�')
- })
- },
- // 瀵硅瘽妗嗗叧闂簨浠�
- handleClose() {
- this.dialogForm.usercode = ''
- this.dialogForm.username = ''
- this.dialogForm.status = 'Y'
-
- this.dialogForm.post_code = []
- this.dialogForm.role_code = []
- this.dialogForm.group_code = []
- this.dialogForm.password = '123456'
- this.dialogForm.mobile = ''
- this.dialogForm.email = ''
-
- // this.dialogForm.storg_code = ''
-
- this.$refs.cascader.checkedValue = ''
- this.$refs.dialogForm.clearValidate()
- },
- // 瀵硅瘽妗嗗彇娑�
- dialogVisibleCancel() {
- this.dialogVisible = false
- },
- // 瀵硅瘽妗嗙‘璁�
- dialogVisibleConfirm() {
- this.$refs.dialogForm.validate(valid => {
- if (valid) {
- this.$store.state.app.buttonIsDisabled = true
- this.dialogForm.group_code = this.dialogForm.group_code.join(',')
- this.dialogForm.post_code = this.dialogForm.post_code.join(',')
- this.dialogForm.role_code = this.dialogForm.role_code.join(',')
- this.dialogForm.storg_code = this.dialogForm.storg_code[this.dialogForm.storg_code.length - 1]
- AddUpdateUserSave(this.dialogForm).then(res => {
- if (res.code === '200') {
- this.$notify.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
- this.dialogVisible = false
- this.$store.state.app.buttonIsDisabled = false
- this.getUserData()
- } else {
- this.$store.state.app.buttonIsDisabled = false
- this.$notify.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
- }
- })
- }
- })
- },
- // 鑾峰彇椤甸潰楂樺害
- getHeight() {
- this.$nextTick(() => {
- this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 280
- this.$refs.tableDataRef.doLayout()
- })
- }
- }
-}
-</script>
+<template>
+ <div>
+ <div class="body" :style="{height:mainHeight+'px'}">
+ <div style="display: flex">
+ <!-- background:rgba(248,248,250,1);-->
+ <div style="width: 220px;margin: 10px 10px 0 0;background: #fff">
+
+ <div style="margin: 20px 10px 0 10px;display: flex;justify-content: space-between;">
+ <div style="display: flex;">
+ <div
+ style="width: 5px;height: 100%;border-radius: 5px;"
+ :style="{background:$store.state.settings.theme}"
+ />
+ <div style="margin-left: 8px;">缁勭粐鏋舵瀯</div>
+ </div>
+
+ <!-- <div style="margin-right:10px">-->
+ <!-- <i class="el-icon-plus" style="cursor: pointer;color: #999" />-->
+ <!-- </div>-->
+
+ </div>
+
+ <el-tree
+ ref="treeLeftRef"
+ key="treeLeftKey"
+ style="padding: 10px;overflow: auto;"
+ :style="{height:(tableHeight+180)+'px'}"
+ :data="treeLeft"
+ node-key="torg_code"
+ highlight-current
+ :props="defaultPropsLeft"
+ :default-expand-all="true"
+ :expand-on-click-node="false"
+ @node-click="nodeClick"
+ />
+
+ </div>
+
+ <div style="width: calc(100% - 220px)">
+ <div class="bodyTopButtonGroup" style="justify-content: space-between">
+ <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
+ <el-button v-waves type="success" icon="el-icon-download" @click="$router.push('./../systemSetting/dataImport?fileCode=3')">瀵煎叆</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-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="鐢ㄦ埛鍚嶇О" style=" display: flex;">
+ <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <!-- <el-form-item label="鐢ㄦ埛缂栫爜" style=" display: flex;">-->
+ <!-- <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">-->
+ <!-- <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛缂栫爜" style=" display: flex;">-->
+ <!-- <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">-->
+ <!-- <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛缂栫爜" style=" display: flex;">-->
+ <!-- <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">-->
+ <!-- <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </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="getUserData">鏌ヨ</el-button>
+ <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
+ </div>
+ </el-form>
+ <div
+ class="bodyTopFormExpand"
+ style="height: 5px;"
+ >
+ <!-- <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+80)+'px'"
+ border
+ row-class-name="custom-row"
+ :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'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="usercode"
+ label="鐢ㄦ埛缂栫爜"
+ sortable="custom"
+ min-width="105"
+ show-overflow-tooltip
+ />
+ <el-table-column
+ prop="username"
+ label="鐢ㄦ埛鍚嶇О"
+ min-width="105"
+ sortable="custom"
+ show-overflow-tooltip
+ />
+ <el-table-column
+ prop="storg_name"
+ label="鎵�灞炵粍缁�"
+ min-width="105"
+ show-overflow-tooltip
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.storg_name">{{ row.storg_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="status"
+ min-width="105"
+ label="鐘舵��"
+ show-overflow-tooltip
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ <el-tag v-if="row.status==='Y'" size="small" type="success">鍦ㄨ亴</el-tag>
+ <el-tag v-if="row.status==='N'" size="small" type="danger">绂昏亴</el-tag>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ prop="payrate"
+ min-width="105"
+ label="钖祫绫诲瀷"
+ show-overflow-tooltip
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.payrate ? PayRateArr.find(i=>i.code === row.payrate).name : '/' }}
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ prop="email"
+ label="閭"
+ min-width="105"
+ sortable="custom"
+ show-overflow-tooltip
+ >
+ <template slot-scope="{row}">
+ {{ row.email ? row.email : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="mobile"
+ label="鍙风爜"
+ min-width="105"
+ sortable="custom"
+ show-overflow-tooltip
+ >
+ <template slot-scope="{row}">
+ {{ row.mobile ? row.mobile : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="postname"
+ label="宀椾綅"
+ sortable="custom"
+ min-width="105"
+ show-overflow-tooltip
+ >
+ <template slot-scope="{row}">
+ {{ row.postname ? row.postname : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="rolename"
+ label="瑙掕壊"
+ sortable="custom"
+ min-width="105"
+ show-overflow-tooltip
+ >
+ <template slot-scope="{row}">
+ {{ row.rolename ? row.rolename : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="group_name"
+ label="鐝粍"
+ min-width="105"
+ sortable="custom"
+ show-overflow-tooltip
+ >
+ <template slot-scope="{row}">
+ {{ row.group_name ? row.group_name : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="createusername"
+ label="鍒涘缓浜哄憳"
+ sortable="custom"
+ min-width="105"
+ />
+ <el-table-column
+ prop="lm_date"
+ label="鍒涘缓鏃堕棿"
+ width="160"
+ sortable="custom"
+ />
+ <el-table-column
+ label="鎿嶄綔"
+ width="80"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <div class="operationClass">
+ <el-tooltip class="item" effect="dark" content="缂栬緫" placement="top">
+ <i
+ v-if="row.usercode!=='9999'"
+ class="el-icon-edit-outline"
+ :style="{color:$store.state.settings.theme}"
+ @click="edit('edit',row)"
+ />
+ </el-tooltip>
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
+ <i
+ v-if="row.usercode!=='9999'"
+ class="el-icon-delete"
+ :style="{color:$store.state.settings.theme}"
+ @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,jumper"
+ popper-class="select_bottom"
+ @pagination="getUserData"
+ />
+ </div>
+
+ </div>
+
+ </div>
+
+ <el-dialog
+ v-el-drag-dialog
+ :title="operation==='add'?'鏂板':'缂栬緫'"
+ :visible.sync="dialogVisible"
+ width="800px"
+ :close-on-click-modal="false"
+ top="15vh"
+ @closed="handleClose"
+ @close="handleClose"
+ >
+ <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
+ <el-form-item label="鐢ㄦ埛缂栫爜" prop="usercode">
+ <el-input v-model="dialogForm.usercode" :disabled="operation!=='add'" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="鐢ㄦ埛鍚嶇О" prop="username">
+ <el-input v-model="dialogForm.username" style="width: 200px" />
+ </el-form-item>
+
+ <el-form-item label="鐢ㄦ埛瀵嗙爜" prop="password">
+ <el-input v-model="dialogForm.password" style="width: 200px" />
+ </el-form-item>
+
+ <el-form-item label="鎵�灞炵粍缁�" prop="storg_code">
+ <el-cascader
+ ref="cascader"
+ v-model="dialogForm.storg_code"
+ :options="cascaderOptions"
+ filterable
+ :props="defaultProps"
+ :show-all-levels="false"
+ />
+ </el-form-item>
+
+ <el-form-item label="鎵嬫満鍙�" prop="mobile">
+ <el-input v-model="dialogForm.mobile" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="閭" prop="email">
+ <el-input v-model="dialogForm.email" style="width: 200px" />
+ </el-form-item>
+
+ <el-form-item required label="鐢ㄦ埛鐘舵��">
+ <el-radio-group v-model="dialogForm.status" style="width: 200px;">
+ <el-radio label="Y">鍦ㄨ亴</el-radio>
+ <el-radio label="N">绂昏亴</el-radio>
+ </el-radio-group>
+ </el-form-item>
+
+ <el-form-item prop="payrate" label="钖祫绫诲瀷">
+ <el-select
+ v-model="dialogForm.payrate"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in PayRateArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item prop="post_code" label="宀椾綅">
+ <el-select
+ v-model="dialogForm.post_code"
+ style="width:490px"
+ placeholder="璇烽�夋嫨"
+ multiple
+ filterable
+ clearable
+ collapse-tags
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in postArr"
+ :key="item.postcode"
+ :label="item.postname"
+ :value="item.postcode"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item prop="role_code" label="瑙掕壊">
+ <el-select
+ v-model="dialogForm.role_code"
+ style="width:490px"
+ multiple
+ filterable
+ clearable
+ collapse-tags
+ placeholder="璇烽�夋嫨"
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in roleArr"
+ :key="item.rolecode"
+ :label="item.rolename"
+ :value="item.rolecode"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item prop="group_code" label="鐝粍">
+ <el-select
+ v-model="dialogForm.group_code"
+ style="width: 490px"
+ placeholder="璇烽�夋嫨"
+ :popper-append-to-body="false"
+ multiple
+ filterable
+ collapse-tags
+ clearable
+ >
+ <el-option
+ v-for="item in groupArr"
+ :key="item.usergroupcode"
+ :label="item.usergroupname"
+ :value="item.usergroupcode"
+ />
+ </el-select>
+ </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-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="dialogVisibleConfirm"
+ >纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ </div>
+</template>
+
+<script>
+import Pagination from '@/components/Pagination'
+import {
+ AddUpdateUserSave,
+ DeleteUserSave, UserData
+} from '@/api/basicSettings'
+import { validateCode } from '@/utils/global'
+import elDragDialog from '@/directive/el-drag-dialog'
+import waves from '@/directive/waves'
+import arrayToTree from 'array-to-tree'
+import { GroupsPermissions, PostPermissions, PrentOrganization, RolePermissions } from '@/api/GeneralBasicData'
+
+export default {
+ name: 'PersonList',
+ components: {
+ Pagination
+ },
+ directives: { elDragDialog, waves },
+ data() {
+ const validateMobile = (rule, value, callback) => {
+ if (!value) {
+ callback()
+ // return callback(new Error('璇疯緭鍏ョ數璇濆彿鐮�'))
+ } else {
+ const mobile = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ // 闀垮彿
+ const mobile2 = /^[0-9]{6}$/ // 鐭彿
+ if (mobile.test(value) || mobile2.test(value)) {
+ callback()
+ // return callback(new Error('鐢佃瘽鍙风爜涓嶇鍚堣鍒�'))
+ } else {
+ return callback(new Error('鐢佃瘽鍙风爜涓嶇鍚堣鍒�'))
+ // callback()
+ }
+ }
+ }
+ const validateEmail = (rule, value, callback) => {
+ if (!value) {
+ callback()
+ // return callback(new Error('璇疯緭鍏ョ數瀛愰偖绠�'))
+ } else {
+ const email = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+$/
+ if (email.test(value)) {
+ callback()
+ } else {
+ return callback(new Error('鐢靛瓙閭涓嶇鍚堣鍒�'))
+ }
+ }
+ }
+ return {
+ mouseHoverType: 'mouseout',
+ isExpandForm: false,
+ mainHeight: 0,
+ tableHeight: 0,
+ form: {
+ usercode: '',
+ username: '',
+ storgcode: '', // 缁勭粐缂栫爜
+ prop: 'lm_date', // 鎺掑簭瀛楁
+ order: 'desc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ },
+ total: 10,
+ tableData: [],
+ dialogVisible: false,
+ dialogForm: {
+ usercode: '', // 鐢ㄦ埛缂栫爜
+ username: '', // 鐢ㄦ埛鍚嶇О
+ post_code: [], // 宀椾綅
+ role_code: [], // 瑙掕壊
+ group_code: [], // 鐝粍
+ password: '123456', // 瀵嗙爜
+ storg_code: '', // 鎵�灞炵粍缁�
+ mobile: '', // 鍙风爜
+ email: '', // 閭
+ status: 'Y', // 鐘舵��
+ payrate: ''// 钖祫绫诲瀷
+ },
+ operation: '',
+ dialogFormRules: {
+ usercode: [
+ { required: true, validator: validateCode, trigger: ['blur', 'change'] }
+ ],
+ username: [
+ { required: true, message: '璇疯緭鍏ョ粍缁囧悕绉�', trigger: ['blur', 'change'] }
+ ],
+ password: [
+ { required: true, message: '璇疯緭鍏ョ敤鎴峰瘑鐮�', trigger: ['blur', 'change'] }
+ ],
+ mobile: [
+ { required: false, validator: validateMobile, trigger: ['blur', 'change'] }
+ ],
+ email: [
+ { required: false, validator: validateEmail, trigger: ['blur', 'change'] }
+ ],
+ storg_code: [
+ { required: true, message: '璇烽�夋嫨鎵�灞炵粍缁�', trigger: ['blur', 'change'] }
+ ],
+ payrate: [
+ { required: true, message: '璇烽�夋嫨钖祫绫诲瀷', trigger: ['blur', 'change'] }
+ ]
+ },
+ defaultProps: {
+ checkStrictly: true,
+ expandTrigger: 'hover',
+ value: 'torg_code',
+ label: 'torg_name'
+ },
+ Options: [],
+ cascaderOptions: [],
+
+ postArr: [],
+ roleArr: [],
+ groupArr: [],
+ PayRateArr: [
+ { code: 'S', name: '璁′欢' },
+ { code: 'T', name: '璁℃椂' },
+ { code: 'M', name: '鎸夋湀' }
+ ],
+
+ defaultPropsLeft: {
+ children: 'children',
+ label: 'torg_name'
+ },
+ treeLeft: []
+
+ }
+ },
+ activated() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+ },
+ created() {
+ this.getUserData()
+ },
+ mounted() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+
+ this.getPrentOrganization()
+ this.getAllSelectData()
+ },
+ methods: {
+ // 缁勭粐鏋舵瀯澶у垪琛ㄦ煡璇�
+ async getUserData() {
+ const res = await UserData(this.form)
+ this.tableData = res.data
+ this.total = res.count
+ },
+ // 缁勭粐鏋舵瀯绾ц仈閫夋嫨鍣�
+ async getPrentOrganization() {
+ const { data: res } = await PrentOrganization()
+ this.Options = res
+ this.cascaderOptions = arrayToTree(res, {
+ parentProperty: 'parent_id',
+ customID: 'torg_code',
+ childrenProperty: 'children'
+ })
+ this.$nextTick(() => {
+ this.treeLeft = this.cascaderOptions
+ this.$forceUpdate()
+ })
+ },
+ // 宀椾綅 瑙掕壊 鐝粍
+ async getAllSelectData() {
+ const { data: res1 } = await PostPermissions()
+ this.postArr = res1
+
+ const { data: res2 } = await RolePermissions()
+ this.roleArr = res2
+
+ const { data: res3 } = await GroupsPermissions()
+ this.groupArr = res3
+ },
+
+ // 鎺掑簭鏀瑰彉鏃�
+ 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.getUserData()
+ },
+ nodeClick(obj, Node, VueComponent) {
+ this.form.storgcode = obj.torg_code
+ this.getUserData()
+ },
+ // 閲嶇疆
+ reset() {
+ this.form.usercode = ''
+ this.form.username = ''
+ this.form.storgcode = ''
+ this.$refs.treeLeftRef.setCurrentKey(null)
+ this.getUserData()
+ },
+ // 鏂板鎸夐挳
+ add(operation) {
+ this.operation = operation
+ this.dialogVisible = true
+ this.dialogForm.OperType = 'Add'
+ },
+ // 淇敼鎸夐挳
+ async edit(operation, row) {
+ this.operation = operation
+ this.dialogVisible = true
+ this.dialogForm.OperType = 'Update'
+
+ // this.cascaderOptions = this.filterChildren(this.cascaderOptions, row.storg_code)
+ this.$nextTick(() => {
+ this.dialogForm.usercode = row.usercode
+ this.dialogForm.username = row.username
+ this.dialogForm.password = row.password
+ this.dialogForm.mobile = row.mobile
+ this.dialogForm.email = row.email
+ this.dialogForm.status = row.status
+ this.dialogForm.payrate = row.payrate
+ this.dialogForm.storg_code = this.findParent([], row.storg_code, this.cascaderOptions).reverse()
+
+ this.dialogForm.post_code = row.post_code ? row.post_code.split(',') : []
+ this.dialogForm.role_code = row.role_code ? row.role_code.split(',') : []
+ this.dialogForm.group_code = row.group_code ? row.group_code.split(',') : []
+ })
+ },
+ filterChildren(treeData, code) {
+ treeData.forEach(item => {
+ if (code.split(',').includes(item.torg_code)) {
+ item.disabled = true
+ if (item.children && item.children.length > 0) {
+ this.filterChildren(item.children, item.children.map(it => it.torg_code).join(','))
+ }
+ } else {
+ if (item.children && item.children.length > 0) {
+ this.filterChildren(item.children, code)
+ }
+ }
+ })
+ return treeData
+ },
+ // parents:鐢ㄤ簬杩斿洖鐨勬暟缁勶紝childNode:瑕佹煡璇㈢殑鑺傜偣锛宼reeData锛歫son鏍戝舰鏁版嵁
+ findParent(parents, childNode, treeData) {
+ // console.log(parents, childNode, treeData, 2)
+
+ for (let i = 0; i < treeData.length; i++) {
+ // 鐖惰妭鐐规煡璇㈡潯浠�
+ if (treeData[i].torg_code === childNode) {
+ // 濡傛灉鎵惧埌缁撴灉,淇濆瓨褰撳墠鑺傜偣
+ parents.push(treeData[i].torg_code)
+ // 鐢ㄥ綋鍓嶈妭鐐瑰啀鍘诲師鏁版嵁鏌ユ壘褰撳墠鑺傜偣鐨勭埗鑺傜偣
+ this.findParent(parents, treeData[i].parent_id, this.cascaderOptions)
+ break
+ } else {
+ if (treeData[i].children instanceof Array) {
+ // 娌℃壘鍒帮紝閬嶅巻璇ヨ妭鐐圭殑瀛愯妭鐐�
+ this.findParent(parents, childNode, treeData[i].children)
+ }
+ }
+ }
+ return parents
+ },
+ // 鍒犻櫎鎸夐挳
+ async del(row) {
+ this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ DeleteUserSave({ usercode: row.usercode }).then(res => {
+ if (res.code === '200') {
+ this.$notify.success('鍒犻櫎鎴愬姛!')
+ if (this.form.page > 1 && this.tableData.length === 1) {
+ this.form.page--
+ }
+ this.getUserData()
+ }
+ })
+ }).catch(() => {
+ this.$notify.info('宸插彇娑堝垹闄�')
+ })
+ },
+ // 瀵硅瘽妗嗗叧闂簨浠�
+ handleClose() {
+ this.dialogForm.usercode = ''
+ this.dialogForm.username = ''
+ this.dialogForm.status = 'Y'
+
+ this.dialogForm.post_code = []
+ this.dialogForm.role_code = []
+ this.dialogForm.group_code = []
+ this.dialogForm.password = '123456'
+ this.dialogForm.mobile = ''
+ this.dialogForm.email = ''
+ this.dialogForm.payrate = ''
+
+ // this.dialogForm.storg_code = ''
+
+ this.$refs.cascader.checkedValue = ''
+ this.$refs.dialogForm.clearValidate()
+ },
+ // 瀵硅瘽妗嗗彇娑�
+ dialogVisibleCancel() {
+ this.dialogVisible = false
+ },
+ // 瀵硅瘽妗嗙‘璁�
+ dialogVisibleConfirm() {
+ this.$refs.dialogForm.validate(valid => {
+ if (valid) {
+ this.$store.state.app.buttonIsDisabled = true
+ this.dialogForm.group_code = this.dialogForm.group_code.join(',')
+ this.dialogForm.post_code = this.dialogForm.post_code.join(',')
+ this.dialogForm.role_code = this.dialogForm.role_code.join(',')
+ this.dialogForm.storg_code = this.dialogForm.storg_code[this.dialogForm.storg_code.length - 1]
+ AddUpdateUserSave(this.dialogForm).then(res => {
+ if (res.code === '200') {
+ this.$notify.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
+ this.dialogVisible = false
+ this.$store.state.app.buttonIsDisabled = false
+ this.getUserData()
+ } else {
+ this.$store.state.app.buttonIsDisabled = false
+ this.$notify.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
+ }
+ })
+ }
+ })
+ },
+ // 鑾峰彇椤甸潰楂樺害
+ getHeight() {
+ this.$nextTick(() => {
+ this.mainHeight = window.innerHeight - 85
+ this.tableHeight = this.mainHeight - 280
+ this.$refs.tableDataRef.doLayout()
+ })
+ }
+ }
+}
+</script>
diff --git a/src/views/kanbanManager/cj.vue b/src/views/kanbanManager/cj.vue
index 4f74d49..03a26ad 100644
--- a/src/views/kanbanManager/cj.vue
+++ b/src/views/kanbanManager/cj.vue
@@ -29,7 +29,7 @@
</div>
<div
class="lineContent horn"
- style="height: 870px;display: flex;flex-direction: column;justify-content: space-between"
+ style="height: 450px;display: flex;flex-direction: column;justify-content: space-between"
>
<el-table
ref="tableDataLeftCenterRef"
@@ -38,88 +38,77 @@
style="width: 100%;"
:header-cell-style="headerCellStyle"
:cell-style="cellStyle"
- height="920"
+ height="500"
>
<el-table-column
prop="wo_code"
label="宸ュ崟鍙�"
- width="270"
+ width="220"
/>
- <!-- <el-table-column-->
- <!-- prop="saleOrderCode"-->
- <!-- label="鐢熶骇鍗曞彿"-->
- <!-- width="160"-->
- <!-- />-->
- <el-table-column
- prop="wkshp_name"
- label="鐢熶骇杞﹂棿"
- width="210"
- />
- <!-- 600-->
<el-table-column
prop="partcode"
label="浜у搧缂栫爜"
- width="210"
+ width="160"
/>
<el-table-column
prop="partname"
label="浜у搧鍚嶇О"
- width="210"
+ width="160"
/>
- <!-- <el-table-column-->
- <!-- prop="partspec"-->
- <!-- label="浜у搧瑙勬牸"-->
- <!-- width="160"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- {{ row.partspec ? row.partspec : '/' }}-->
- <!-- </template>-->
- <!-- </el-table-column>-->
+ <el-table-column
+ prop="partspec"
+ label="浜у搧瑙勬牸"
+ width="160"
+ >
+ <template slot-scope="{row}">
+ {{ row.partspec ? row.partspec : '/' }}
+ </template>
+ </el-table-column>
<el-table-column
prop="plan_qty"
label="浠诲姟鏁伴噺"
- width="170"
+ width="120"
/>
<el-table-column
prop="good_qty"
label="鍚堟牸鏁伴噺"
- width="170"
+ width="120"
/>
- <!-- <el-table-column-->
- <!-- prop="ng_qty"-->
- <!-- label="涓嶈壇鏁伴噺"-->
- <!-- width="120"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- prop="laborbad_qty"-->
- <!-- label="宸ュ簾鏁伴噺"-->
- <!-- width="120"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- prop="materielbad_qty"-->
- <!-- label="鏂欏簾鏁伴噺"-->
- <!-- width="120"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- prop="seq"-->
- <!-- label="宸ュ簭椤哄簭"-->
- <!-- width="120"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- prop="step_code"-->
- <!-- label="宸ュ簭缂栫爜"-->
- <!-- width="120"-->
- <!-- />-->
+ <el-table-column
+ prop="ng_qty"
+ label="涓嶈壇鏁伴噺"
+ width="120"
+ />
+ <el-table-column
+ prop="laborbad_qty"
+ label="宸ュ簾鏁伴噺"
+ width="120"
+ />
+ <el-table-column
+ prop="materielbad_qty"
+ label="鏂欏簾鏁伴噺"
+ width="120"
+ />
+ <el-table-column
+ prop="seq"
+ label="宸ュ簭椤哄簭"
+ width="120"
+ />
+ <el-table-column
+ prop="step_code"
+ label="宸ュ簭缂栫爜"
+ width="120"
+ />
<el-table-column
prop="step_name"
label="宸ュ簭鍚嶇О"
- width="320"
+ width="120"
/>
<el-table-column
prop="schedule"
label="瀹屾垚杩涘害(%)"
- width="313"
+ width="213"
/>
</el-table>
</div>
@@ -127,27 +116,27 @@
</div>
<!-- 涓嬭竟-->
- <!-- <div style="display: flex;justify-content: space-between;margin-top: 15px;">-->
- <!-- <div style="width: 1000px;">-->
- <!-- <div class="smallTitle">-->
- <!-- <svg-icon icon-class="blcs" class="svg_class" />-->
- <!-- 璐ㄩ噺涓嶈壇(杩戜竴鍛�)-->
- <!-- </div>-->
- <!-- <div class="lineContent horn" style="height: 380px;display: flex;justify-content: space-between">-->
- <!-- <div id="cjzl03" class="flex_c_c" style="width: 100%;height:100%" />-->
+ <div style="display: flex;justify-content: space-between;margin-top: 15px;">
+ <div style="width: 1000px;">
+ <div class="smallTitle">
+ <svg-icon icon-class="blcs" class="svg_class" />
+ 璐ㄩ噺涓嶈壇(杩戜竴鍛�)
+ </div>
+ <div class="lineContent horn" style="height: 380px;display: flex;justify-content: space-between">
+ <div id="cjzl03" class="flex_c_c" style="width: 100%;height:100%" />
- <!-- </div>-->
- <!-- </div>-->
- <!-- <div style="width: 850px;">-->
- <!-- <div class="smallTitle">-->
- <!-- <svg-icon icon-class="ckkc" class="svg_class" />-->
- <!-- 涓嶈壇缁熻(杩戜竴鏈�)-->
- <!-- </div>-->
- <!-- <div class="lineContent horn" style="height: 380px;display: flex;justify-content: space-between">-->
- <!-- <div id="cjzl04" class="flex_c_c" style="width: 100%;height:100%" />-->
- <!-- </div>-->
- <!-- </div>-->
- <!-- </div>-->
+ </div>
+ </div>
+ <div style="width: 850px;">
+ <div class="smallTitle">
+ <svg-icon icon-class="ckkc" class="svg_class" />
+ 涓嶈壇缁熻(杩戜竴鏈�)
+ </div>
+ <div class="lineContent horn" style="height: 380px;display: flex;justify-content: space-between">
+ <div id="cjzl04" class="flex_c_c" style="width: 100%;height:100%" />
+ </div>
+ </div>
+ </div>
</div>
</div>
</div>
@@ -188,10 +177,6 @@
}
},
- activated() {
- window.addEventListener('resize', this.getHeight)
- this.getHeight()
- },
created() {
setInterval(this.getNowTime, 1000)
@@ -201,13 +186,11 @@
}, 1000 * 60 * 120)
},
mounted() {
- // this.getAllApi()
- this.getWorkShopProduceTopData()
+ this.getAllApi()
},
methods: {
async getWorkShopProduceTopData() {
- // WorkShopProduceTopData({ wkshopcode: this.wkshopcode.join(',') }).then(res => {
- WorkShopProduceTopData({ wkshopcode: '101,102' }).then(res => {
+ WorkShopProduceTopData({ wkshopcode: this.wkshopcode.join(',') }).then(res => {
this.tableDataCenterTop = res.data
const divData = this.$refs.tableDataLeftCenterRef.bodyWrapper
@@ -225,7 +208,7 @@
}
})
}
- }, this.tableDataCenterTop.length <= 22 ? 1000 * 30 : 200)
+ }, this.tableDataCenterTop.length <= 11 ? 1000 * 15 : 200)
})
},
@@ -268,14 +251,14 @@
})
}, 1000 * 50)
- const res5 = await WorkShopProduceBottomRightData({ wkshopcode: this.wkshopcode[0] })
+ const res5 = await WorkShopProduceBottomRightData({ wkshopcode: this.wkshopcode.join(',') })
this.RightBottom = res5.data
if (this.RightBottom.length > 0) {
loadEcharts('cjzl04', cjzl04(this.RightBottom.map(i => i.name), this.RightBottom.map(i => i.cont)))
}
setInterval(() => {
- WorkShopProduceBottomRightData({ wkshopcode: this.wkshopcode[0] }).then(res5 => {
+ WorkShopProduceBottomRightData({ wkshopcode: this.wkshopcode.join(',') }).then(res5 => {
this.RightBottom = res5.data
if (this.RightBottom.length > 0) {
loadEcharts('cjzl04', cjzl04(this.RightBottom.map(i => i.name), this.RightBottom.map(i => i.cont)))
@@ -283,7 +266,7 @@
})
}, 1000 * 60)
- await this.getWorkShopProduceTopData()
+ this.getWorkShopProduceTopData()
},
// 鑾峰彇褰撳墠鏃堕棿
@@ -363,10 +346,6 @@
::v-deep .el-table tr,
::v-deep .el-table td {
background-color: transparent;
-}
-
-::v-deep .gutter {
- display: none;
}
.all_block01 {
diff --git a/src/views/kanbanManager/ckgl.vue b/src/views/kanbanManager/ckgl.vue
index 3d0d5e1..e620d25 100644
--- a/src/views/kanbanManager/ckgl.vue
+++ b/src/views/kanbanManager/ckgl.vue
@@ -258,7 +258,7 @@
<div style="height: 470px;">
<div class="smallTitle">
<svg-icon icon-class="ph" class="svg_class" />
- 鍗婃垚鍝併�佷骇鍝佸簱瀛橀噺鎺掕Top5
+ 杩戜竴鍛ㄩ噰璐緟鍏ュ簱鐗╂枡鎺掕Top5
</div>
<div class="lineContent horn" style="height: 410px">
<div id="bar03" style="width: 100%;height:100%; " />
@@ -268,7 +268,7 @@
<div style="height: 470px;margin-top: 30px;">
<div class="smallTitle">
<svg-icon icon-class="ph" class="svg_class" />
- 鍘熸潗鏂欏簱瀛橀噺鎺掕Top5
+ 杩戜竴鍛ㄩ攢鍞凡鍙戣揣浜у搧鎺掕Top5
</div>
<div class="lineContent horn" style="height: 410px">
<div id="bar04" style="width: 100%;height:100%;" />
@@ -286,10 +286,10 @@
import './kbCommon.css'
import { bar02, kbTop, loadEcharts } from '@/utils/myEcharts'
import {
- WareHouseTopLeftData,
- WareHouseTopBottomData,
- WareHouseRightTopData,
- WareHouseRightBottomData
+ ProcureOutsourcLeftTop,
+ ProductConsignmentLeftBottom,
+ ProcureOutsourcRightTop,
+ ProductionStockedInRightBottom
} from '@/api/kanbanManager'
export default {
@@ -335,8 +335,8 @@
window.addEventListener('offline', this.updateOnlineStatus)
this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })
- this.getWareHouseTopLeftData()
- this.getWareHouseTopBottomData()
+ this.getProcureOutsourcLeftTop()
+ this.getProductConsignmentLeftBottom()
this.getEcharts()
},
beforeDestroy() {
@@ -367,8 +367,8 @@
}
},
// 鑾峰彇宸︿笂table鏁版嵁
- getWareHouseTopLeftData() {
- WareHouseTopLeftData().then(res => {
+ getProcureOutsourcLeftTop() {
+ ProcureOutsourcLeftTop().then(res => {
this.tableDataTop = res.data
// this.number1 = this.tableDataTop.length
const divData = this.$refs.tableDataTopRef.bodyWrapper
@@ -381,12 +381,12 @@
if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
// 閲嶇疆table璺濈椤堕儴璺濈
divData.scrollTop = 0
- WareHouseTopLeftData().then(res => {
+ ProcureOutsourcLeftTop().then(res => {
this.tableDataTop = res.data
// this.number1 = this.tableDataTop.length
if (this.tableDataTop.length > 10) {
clearInterval(this.tableTopTask)
- this.getWareHouseTopLeftData()
+ this.getProcureOutsourcLeftTop()
}
})
}
@@ -394,8 +394,8 @@
})
},
// 鑾峰彇宸︿笅table鏁版嵁
- getWareHouseTopBottomData() {
- WareHouseTopBottomData().then(res => {
+ getProductConsignmentLeftBottom() {
+ ProductConsignmentLeftBottom().then(res => {
this.tableDataBottom = res.data
this.number2 = this.tableDataBottom.length
const divData = this.$refs.tableDataBottomRef.bodyWrapper
@@ -409,12 +409,12 @@
if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
// 閲嶇疆table璺濈椤堕儴璺濈
divData.scrollTop = 0
- WareHouseTopBottomData().then(res => {
+ ProductConsignmentLeftBottom().then(res => {
this.tableDataBottom = res.data
this.number2 = this.tableDataBottom.length
if (this.tableDataBottom.length > 10) {
clearInterval(this.tableBottomTask)
- this.getWareHouseTopBottomData()
+ this.getProductConsignmentLeftBottom()
}
})
}
@@ -424,23 +424,23 @@
// 鑾峰彇echarts
getEcharts() {
- WareHouseRightTopData().then(res => {
- loadEcharts('bar03', bar02(res.data.map(i => i.CanuseBaseQuantity), res.data.map(i => i.materiel_name)))
+ ProcureOutsourcRightTop().then(res => {
+ loadEcharts('bar03', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
})
- WareHouseRightBottomData().then(res => {
- loadEcharts('bar04', bar02(res.dat.map(i => i.CanuseBaseQuantity), res.data.map(i => i.materiel_name)))
+ ProductionStockedInRightBottom().then(res => {
+ loadEcharts('bar04', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
})
this.echartsRightTop = setInterval(() => {
- WareHouseRightTopData().then(res => {
- loadEcharts('bar03', bar02(res.data.map(i => i.CanuseBaseQuantity), res.data.map(i => i.materiel_name)))
+ ProcureOutsourcRightTop().then(res => {
+ loadEcharts('bar03', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
})
}, 1000 * 15)
this.echartsRightBottom = setInterval(() => {
- WareHouseRightBottomData().then(res => {
- loadEcharts('bar04', bar02(res.data.map(i => i.CanuseBaseQuantity), res.data.map(i => i.materiel_name)))
+ ProductionStockedInRightBottom().then(res => {
+ loadEcharts('bar04', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
})
}, 1000 * 15)
},
diff --git a/src/views/materialManager/inventoryList.vue b/src/views/materialManager/inventoryList.vue
index 0762d0a..82be864 100644
--- a/src/views/materialManager/inventoryList.vue
+++ b/src/views/materialManager/inventoryList.vue
@@ -1,1706 +1,1772 @@
-<template>
- <div>
- <div class="body" :style="{height:mainHeight+'px'}">
-
- <div style="display: flex">
- <div style="width: 300px;margin: 10px 10px 0 0;background:#fff">
-
- <div style="margin: 20px 10px 0 10px;display: flex;justify-content: space-between;">
- <div style="display: flex;">
- <div
- style="width: 5px;height: 100%;border-radius: 5px;"
- :style="{background:$store.state.settings.theme}"
- />
- <div style="margin-left: 8px;">瀛樿揣妗f</div>
- </div>
-
- <div style="margin-right:10px">
- <el-tooltip v-del-tab-index class="item" effect="dark" content="鏂板" placement="top">
- <i class="el-icon-plus" style="cursor: pointer;color: #999" @click="treeAddClick('add')" />
- </el-tooltip>
- </div>
-
- </div>
-
- <el-tree
- ref="treeLeftRef"
- style="padding: 10px;overflow: auto"
- :style="{height:(tableHeight+222)+'px'}"
- :data="treeLeft"
- node-key="code"
- highlight-current
- :props="defaultPropsLeft"
- :default-expand-all="true"
- :expand-on-click-node="false"
- @node-click="getTMaterielData"
- >
- <span slot-scope="{ node, data }" class="custom-tree-node">
- <span v-if="!data.isEdit" class="ellipsis" style="width:150px;">{{ data.name }}</span>
- <span v-if="!data.isEdit">
- <el-tooltip v-del-tab-index class="item" effect="dark" content="缂栬緫" placement="top">
- <i
- v-if="data.code!=='-1'"
- class="el-icon-edit"
- style="margin-right:10px;color: #999"
- @click.stop="treeEditClick(node,data,'edit')"
- />
- </el-tooltip>
- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
- <i
- v-if="data.code!=='-1'"
- class="el-icon-delete"
- style="margin-right: 4px;color: #999"
- @click.stop="treeDeleteClick(node,data)"
- />
- </el-tooltip>
- </span>
- </span>
- </el-tree>
- </div>
-
- <div
- style=" width:calc(100% - 300px);"
- >
- <div class="bodyTopButtonGroup" style="justify-content: space-between">
- <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
- <div style="display: flex">
- <el-button
- v-waves
- type="success"
- icon="el-icon-download"
- @click="$router.push('./../systemSetting/dataImport?fileCode=8')"
- >瀵煎叆
- </el-button>
- <el-button v-waves icon="el-icon-refresh-right" @click="syncERP">鍚屾瀛樿揣妗f</el-button>
- </div>
- </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-input v-model="form.partcode" placeholder="璇疯緭鍏�" style="width: 200px" />
- </el-form-item>
- <el-form-item label="瀛樿揣鍚嶇О" style=" display: flex;">
- <el-input v-model="form.partname" placeholder="璇疯緭鍏�" style="width: 200px" />
- </el-form-item>
- <el-form-item label="瀛樿揣瑙勬牸" style=" display: flex;">
- <el-input v-model="form.partspec" placeholder="璇疯緭鍏�" style="width: 200px" />
- </el-form-item>
- <!-- <el-form-item label="鐢ㄦ埛缂栫爜" style=" display: flex;">-->
- <!-- <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">-->
- <!-- <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛缂栫爜" style=" display: flex;">-->
- <!-- <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">-->
- <!-- <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛缂栫爜" style=" display: flex;">-->
- <!-- <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">-->
- <!-- <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />-->
- <!-- </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="getTMaterielData($refs.treeLeftRef.getCurrentNode())"
- >鏌ヨ
- </el-button>
- <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
- </div>
- </el-form>
- <div
- class="bodyTopFormExpand"
- style="height: 5px;"
- >
- <!-- <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+80)+'px'"
- border
- row-class-name="custom-row"
- :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px',}"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- @sort-change="sortChange"
- >
- <!-- prop="RowNum"-->
- <el-table-column
- prop="rowNum"
- width="50"
- fixed
- label="搴忓彿"
- />
- <el-table-column
- prop="partcode"
- label="瀛樿揣缂栫爜"
- sortable="custom"
- width="110"
- />
- <el-table-column
- prop="partname"
- label="瀛樿揣鍚嶇О"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="200"
- />
- <el-table-column
- prop="partspec"
- label="瑙勬牸鍨嬪彿"
- width="110"
- sortable="custom"
- >
- <template slot-scope="{row}">
- {{ row.partspec ? row.partspec : '/' }}
- </template>
- </el-table-column>
- <el-table-column
- prop="idinventoryclassname"
- label="鎵�灞炵被鍒�"
- sortable="custom"
- width="110"
- />
- <el-table-column
- label="璁¢噺鍗曚綅"
- width="110"
- sortable="custom"
- >
- <template slot-scope="{row}">
- {{ row.isSingleUnit === '0' ? row.idunitgroupname : row.idunitname }}
- </template>
- </el-table-column>
- <el-table-column
- prop="status"
- label="瀛樿揣鐘舵��"
- width="110"
- sortable="custom"
- >
- <template slot-scope="{row}">
- <el-tag v-if="row.status==='0'" size="small" type="success">姝e父</el-tag>
- <el-tag v-if="row.status==='1'" size="small" type="danger">鍋滅敤</el-tag>
- </template>
- </el-table-column>
- <el-table-column
- label="瀛樿揣灞炴��"
- sortable="custom"
- min-width="220"
- >
- <template slot-scope="{row}">
- {{ row.isPurchase === '1' ? '澶栬喘' : '' }}
- {{ row.isSale === '1' ? '閿�鍞�' : '' }}
- {{ row.isMadeSelf === '1' ? '鑷埗' : '' }}
- {{ row.isMaterial === '1' ? '鐢熶骇娑堣��' : '' }}
- {{ row.isMadeRequest === '1' ? '濮斿' : '' }}
- </template>
- </el-table-column>
-
- <el-table-column
- label="宸ヨ壓"
- prop=""
-
- width="110"
- >
- <template slot-scope="{row}">
-
- <!-- <i-->
- <!-- v-if="row.is_retdproc==='Y'"-->
- <!-- :style="{color:$store.state.settings.theme}"-->
- <!-- class="el-icon-share"-->
- <!-- style="cursor: pointer"-->
- <!-- @click="routeClick(row)"-->
- <!-- />-->
-
- <i
- :style="{color:row.is_retdproc==='Y'?$store.state.settings.theme:`rgb(180 ,181, 185)`,cursor: 'pointer'}"
- class="el-icon-share"
- @click="mesSetting.route?routeClick(row):routeClick2(row)"
- />
- </template>
- </el-table-column>
-
- <!-- <el-table-column-->
- <!-- label="鏁版嵁鏉ユ簮"-->
- <!-- prop="data_sources"-->
- <!-- sortable="custom"-->
- <!-- width="110"-->
- <!-- />-->
- <el-table-column
- label="鍒涘缓浜哄憳"
- prop="lm_user"
- sortable="custom"
- width="110"
- />
- <el-table-column
- label="鍒涘缓鏃堕棿"
- prop="lm_date"
- sortable="custom"
- width="160"
- />
-
- <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"
- :style="{color:$store.state.settings.theme}"
- @click="edit('edit',row)"
- />
- </el-tooltip>
- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
- <i
- class="el-icon-delete"
- :style="{color:$store.state.settings.theme}"
- @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,jumper"
- popper-class="select_bottom"
- @pagination="getTMaterielData($refs.treeLeftRef.getCurrentNode())"
- />
-
- </div>
- </div>
- </div>
-
- <!-- 瀛樿揣绫诲埆鏂板淇敼-->
- <el-dialog
- v-el-drag-dialog
- :title="operation==='add'?'鏂板':'缂栬緫'"
- :visible.sync="dialogClassVisible"
- width="800px"
- :close-on-click-modal="false"
- top="15vh"
- @closed="handleClassClose"
- @close="handleClassClose"
- >
- <el-form ref="dialogClassForm" inline :rules="dialogClassFormRules" :model="dialogClassForm" label-width="80px">
- <el-form-item label="鍒嗙被缂栫爜" prop="inventoryclasscode">
- <el-input v-model="dialogClassForm.inventoryclasscode" :disabled="operation!=='add'" style="width: 200px" />
- </el-form-item>
- <el-form-item label="鍒嗙被鍚嶇О" prop="inventoryclassname">
- <el-input v-model="dialogClassForm.inventoryclassname" style="width: 200px" />
- </el-form-item>
- <el-form-item label="涓婄骇鍒嗙被">
- <el-select
- v-model="dialogClassForm.parentcode"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- :popper-append-to-body="false"
- clearable
- >
- <el-option
- v-for="item in treeLeftArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- </el-form>
-
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleClassCancel">鍙� 娑�</el-button>
- <el-button
- v-waves
- type="primary"
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- @click="dialogVisibleClassConfirm"
- >纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!-- 瀛樿揣妗f鏂板淇敼-->
- <el-dialog
- v-el-drag-dialog
- :title="operation==='add'?'鏂板':'缂栬緫'"
- :visible.sync="dialogVisible"
- width="1200px"
- :close-on-click-modal="false"
- top="15vh"
- @closed="handleClose"
- @close="handleClose"
- >
-
- <el-form ref="dialogForm" class="" inline :rules="dialogFormRules" :model="dialogForm" label-width="110px">
- <el-divider content-position="left">鍩烘湰淇℃伅</el-divider>
- <el-form-item label="瀛樿揣缂栫爜" prop="partcode">
- <el-input v-model="dialogForm.partcode" :disabled="operation!=='add'" style="width: 200px" />
- </el-form-item>
- <el-form-item label="瀛樿揣鍚嶇О" prop="partname">
- <el-input v-model="dialogForm.partname" style="width: 200px" />
- </el-form-item>
- <el-form-item label="瑙勬牸鍨嬪彿">
- <el-input v-model="dialogForm.partspec" style="width: 200px" />
- </el-form-item>
- <el-form-item label="鎵�灞炵被鍒�" prop="inventoryclasscode">
- <el-select
- v-model="dialogForm.inventoryclasscode"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in treeLeftArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="鎵�灞炰粨搴�" prop="idwarehouse">
- <el-select
- v-model="dialogForm.idwarehouse"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in idwarehouseArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item required label="瀛樿揣鐘舵��">
- <el-radio-group v-model="dialogForm.status">
- <el-radio label="0">姝e父</el-radio>
- <el-radio label="1">鍋滅敤</el-radio>
- </el-radio-group>
- </el-form-item>
-
- <el-divider content-position="left">璁¢噺鍗曚綅</el-divider>
- <el-form-item label="璁¢噺鏂瑰紡" required prop="unittypcode">
- <el-select
- v-model="dialogForm.unittypcode"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :popper-append-to-body="false"
- @change="unittypcodeChange"
- >
- <el-option
- v-for="item in unittypcodeArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item :label="dialogForm.unittypcode==='1'? '璁¢噺鍗曚綅':'璁¢噺鍗曚綅缁�'" prop="unitcode">
- <el-select
- v-if="dialogForm.unittypcode==='1'"
- v-model="dialogForm.unitcode"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :popper-append-to-body="false"
- @change="val=>unitcodeChange(val,'1')"
- >
- <el-option
- v-for="item in unitcodeSingleArr"
- :key="item.unitcode"
- :label="item.unitname"
- :value="item.unitcode"
- />
- </el-select>
- <el-select
- v-if="dialogForm.unittypcode!=='1'"
- v-model="dialogForm.unitcode"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :popper-append-to-body="false"
- @change="val=>unitcodeChange(val,'0')"
- >
- <el-option
- v-for="item in unitcodeGroupArr"
- :key="item.unitcode"
- :label="item.unitname"
- :value="item.unitcode"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="鎶ヨ〃杈呭崟浣�">
- <el-select
- v-model="dialogForm.idSubUnitByReport"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :disabled="dialogForm.unittypcode==='1'"
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in idSubUnitByReportArr"
- :key="item.unitcode"
- :label="item.unitname"
- :value="item.unitcode"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="搴撳瓨甯哥敤鍗曚綅">
- <el-select
- v-model="dialogForm.idUnitByStock"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :disabled="dialogForm.unittypcode==='1'"
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in idUnitBvStockArr"
- :key="item.unitcode"
- :label="item.unitname"
- :value="item.unitcode"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="閲囪喘甯哥敤鍗曚綅">
- <el-select
- v-model="dialogForm.idUnitByPurchase"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :disabled="dialogForm.unittypcode==='1'"
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in idUnitBvStockArr"
- :key="item.unitcode"
- :label="item.unitname"
- :value="item.unitcode"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="閿�鍞父鐢ㄥ崟浣�">
- <el-select
- v-model="dialogForm.idUnitBySale"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :disabled="dialogForm.unittypcode==='1'"
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in idUnitBvStockArr"
- :key="item.unitcode"
- :label="item.unitname"
- :value="item.unitcode"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="鐢熶骇甯哥敤鍗曚綅">
- <el-select
- v-model="dialogForm.idunitbymanufacture"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :disabled="dialogForm.unittypcode==='1'"
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in idUnitBvStockArr"
- :key="item.unitcode"
- :label="item.unitname"
- :value="item.unitcode"
- />
- </el-select>
- </el-form-item>
- <el-divider content-position="left">瀛樿揣灞炴��</el-divider>
- <el-checkbox v-model="dialogForm.isPurchase" style="margin-left: 70px;">澶栬喘</el-checkbox>
- <el-checkbox v-model="dialogForm.isSale">閿�鍞�</el-checkbox>
- <el-checkbox v-model="dialogForm.isMadeSelf">鑷埗</el-checkbox>
- <el-checkbox v-model="dialogForm.isMaterial">鐢熶骇娑堣��</el-checkbox>
- <el-checkbox v-model="dialogForm.isMadeRequest">濮斿</el-checkbox>
- <!-- <el-divider content-position="left">瀛樿揣鎻忚堪</el-divider>-->
- <!-- <el-form-item label="瀛樿揣鎻忚堪">-->
- <!-- <el-input-->
- <!-- v-model="dialogForm.username"-->
- <!-- type="textarea"-->
- <!-- :autosize="{ minRows: 2, maxRows: 4}"-->
- <!-- style="width: 490px;"-->
- <!-- />-->
- <!-- </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-waves
- type="primary"
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- @click="dialogVisibleConfirm"
- >纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!-- 宸ヨ壓璺嚎瀵硅瘽妗�-->
- <el-dialog
- v-el-drag-dialog
- :close-on-click-modal="false"
- title="鍏宠仈宸ヨ壓璺嚎"
- :visible.sync="dialogVisibleRoute"
- width="800px"
- top="5vh"
- class="dialogVisibleRoute"
- @closed="handleCloseRoute"
- @close="handleCloseRoute"
- >
- <div>
- <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" /> 浜у搧鍚嶇О锛歿{
- dialogFormRoute.projectName
- }}
- </div>
- <el-divider />
- <div style="margin-bottom: 10px">
- <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 宸ヨ壓璺嚎闆嗗悎
- </div>
-
- <div class="myCheckboxGroup">
- <div
- v-for="item in dialogFormRoute.routeOperationArr"
- :key="item.code"
- :style="{border:item.isSelected1?'1px solid '+$store.state.settings.theme:'1px solid #eee'}"
- class="myCheckbox"
- @click="myCheckboxClick(item)"
- >
- <!-- <input-->
- <!-- class="myCheckboxInput"-->
- <!-- type="checkbox"-->
- <!-- :value="item.code"-->
- <!-- :name="item.name"-->
- <!-- :style="{color:item.isSelected2?'#42b983':'#fff'}"-->
- <!-- @click="myCheckboxInputClick(item)"-->
- <!-- >{{ item.name }}-->
- <!-- 鐖跺瓙鐐瑰嚮浜嬩欢涓嶅奖鍝�-->
- <!-- onClick="event.cancelBubble = true"-->
- <el-checkbox
- :key="item.code"
- v-model="item.isSelected2"
- class="myCheckboxInput"
- :value="item.code"
- :name="item.name"
- :label="item.name"
- :checked="item.isSelected2"
- @change="myCheckboxInputClick(item)"
- />
- <div class="myCheckboxInputLabel">{{ item.name }}</div>
-
- </div>
- </div>
-
- <el-divider />
- <div>
- <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 榛樿宸ヨ壓璺嚎
- </div>
- <div style="margin-top: 20px">
- <el-select
- v-model="defaultroute_code"
- filterable
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- class="defaultroute_code"
- >
- <el-option
- v-for="item in defaultroute_codeArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </div>
- <el-divider />
- <div style="margin-bottom: 10px">
- <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 宸ュ簭鍒楄〃
- </div>
- <div style="overflow-y: scroll">
- <el-table
- ref="projectTableData"
- :data="projectTableData"
- border
- height="280"
- :row-class-name="tableRowClassName"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- >
- <el-table-column
- prop="seq"
- width="100"
- label="宸ュ簭搴忓彿"
- fixed
- />
- <el-table-column
- prop="stepcode"
- show-tooltip-when-overflow
- label="宸ュ簭缂栫爜"
- />
- <el-table-column
- prop="stepname"
- label="宸ュ簭鍚嶇О"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="enable"
- label="鍚敤鐘舵��"
- show-tooltip-when-overflow
- fixed="right"
- >
- <template slot-scope="{row}">
- <div v-if="row.enable==='Y'">
- <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />
- 鏄�
- </div>
- <div v-if="row.enable==='N'">
- <i class="el-icon-info" style="margin-right: 2px" />
- 鍚�
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="routeDialogVisibleCancel">鍙� 娑�</el-button>
- <el-button
- v-waves
- type="primary"
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- @click="routeDialogVisibleConfirm"
- >纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!-- 鎸夊伐鑹鸿蛋 宸ュ簭瀵硅瘽妗�-->
- <el-dialog
- v-el-drag-dialog
- :close-on-click-modal="false"
- title="鍏宠仈宸ュ簭"
- :visible.sync="dialogVisibleStep"
- width="800px"
- top="15vh"
- class="dialogVisibleStep"
- @closed="handleCloseStep"
- @close="handleCloseStep"
- >
-
- <div style="display: flex;align-items: center">
- <div style="font-weight: bolder">宸ュ簭閫夋嫨锛�</div>
- <el-drag-select
- v-model="stepSelectedValue"
- style="width:570px;"
- multiple
- placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"
- >
- <!-- :disabled="!(dialogForm.mesorderstus==='NEW'||dialogForm.mesorderstus==='ALLO')"-->
- <el-option
- v-for="item in stepSelectArr"
- :key="item.stepcode"
- :label="item.stepname"
- :value="item.stepcode"
- />
- </el-drag-select>
- </div>
-
- <el-table
- ref="stepTableDataRef"
- :data="stepTableData"
- border
- :row-class-name="tableRowClassName"
- height="300"
- style="width: 100%;margin-top: 15px;"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- row-key="stepcode"
- >
- <el-table-column
- type="index"
- label="搴忓彿"
- width="50"
- />
- <el-table-column
- prop="stepcode"
- show-tooltip-when-overflow
- label="宸ュ簭缂栫爜"
- />
- <el-table-column
- prop="stepname"
- label="宸ュ簭鍚嶇О"
- show-tooltip-when-overflow
- />
- <!-- <el-table-column-->
- <!-- prop="stepprice"-->
- <!-- label="鐢熶骇鍗曚环"-->
- <!-- show-tooltip-when-overflow-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <el-input-->
- <!-- v-model="row.stepprice"-->
- <!-- placeholder="璇疯緭鍏ュ伐搴忓崟浠�"-->
- <!-- oninput="value=value.replace(/[^0-9.]/g,'')"-->
- <!-- style="width: 100%"-->
- <!-- @click.stop=""-->
- <!-- />-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- label="鎿嶄綔"
- width="120"
- >
- <template slot-scope="{row}">
- <div class="operationClass">
- <!-- <el-tooltip class="item" effect="dark" content="绉诲姩" placement="top">-->
- <i
- class="el-icon-rank"
- :style="{color:$store.state.settings.theme}"
- style="cursor: move"
- />
- <!-- </el-tooltip>-->
- <!-- @click="edit('edit',row)"-->
-
- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
- <i
- class="el-icon-delete"
- :style="{color:$store.state.settings.theme}"
- style="margin-left: 15px;"
- @click="stepDel(row)"
- />
- </el-tooltip>
- </div>
- </template>
- </el-table-column>
- </el-table>
-
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="stepDialogVisibleCancel">鍙� 娑�</el-button>
- <el-button
- v-waves
- type="primary"
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- @click="stepDialogVisibleConfirm"
- >纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
- </div>
-</template>
-
-<script>
-import waves from '@/directive/waves'
-import Pagination from '@/components/Pagination'
-import { validateCode } from '@/utils/global'
-import elDragDialog from '@/directive/el-drag-dialog'
-import {
- SaveTMaterielFile,
- TMaterielAddUpdate,
- TMaterielClassTree,
- TMaterielClassTreeAddUpdate,
- TMaterielClassTreeDelete,
- TMaterielData, TMaterielDelete, TMaterielFileAssociationRoute
-} from '@/api/ProductModel'
-import arrayToTree from 'array-to-tree'
-import { StepData, UnitSerch, WareHouse } from '@/api/GeneralBasicData'
-import { SaveSearchMateriel_Info } from '@/api/ErpSyncMes'
-import $ from 'jquery'
-import Sortable from 'sortablejs'
-import ElDragSelect from '@/components/DragSelect'
-
-export default {
- name: 'InventoryList',
- directives: { waves, elDragDialog },
- components: {
- Pagination, ElDragSelect
- },
- data() {
- return {
- mouseHoverType: 'mouseout',
- isExpandForm: false,
- mainHeight: 0,
- tableHeight: 0,
- operation: '',
-
- treeLeft: [
- {
- code: '-1',
- name: '鍏ㄩ儴'
- }
- ], // 宸︿晶鏍�
- treeLeftArr: [],
- defaultPropsLeft: {
- children: 'children',
- label: 'name'
- },
-
- tableData: [],
- form: {
- inventoryclasscode: '',
- partcode: '',
- partname: '',
- partspec: '',
- page: 1,
- rows: 20,
- prop: 'lm_date', // 鎺掑簭瀛楁
- order: 'desc' // 鎺掑簭瀛楁
- },
- total: 0,
- dialogClassVisible: false,
- dialogClassForm: {
- data_sources: '', // 鏁版嵁鏉ユ簮:ERP/MES
- inventoryclasscode: '', // 瀛樿揣鍒嗙被缂栫爜
- inventoryclassname: '', // 瀛樿揣鍒嗙被鍚嶇О
- parentcode: '', // 涓婄骇鍒嗙被缂栫爜
- OperType: ''// OperType
- },
- classArr: [],
- dialogClassFormRules: {
- inventoryclasscode: [
- { required: true, validator: validateCode, trigger: ['blur', 'change'] }
- ],
- inventoryclassname: [
- { required: true, message: '璇疯緭瀛樿揣绫诲瀷鍚嶇О', trigger: ['blur', 'change'] }
- ]
- },
-
- dialogVisible: false,
- dialogForm: {
- data_sources: 'MES', // 鏁版嵁鏉ユ簮锛汦RP/MES
- partcode: '', // 瀛樿揣缂栫爜
- partname: '', // 瀛樿揣鍚嶇О
- partspec: '', // 瑙勬牸鍨嬪彿
- inventoryclasscode: '', // 瀛樿揣绫诲瀷缂栫爜
- unittypcode: '1', // 璁¢噺鏂瑰紡(0:澶氳閲�,1:鍗曡閲�)
- unitcode: '', // 璁¢噺鍗曚綅缂栫爜/璁¢噺鍗曚綅缁勭紪鐮�
- unitsubcode: '', // 璁¢噺鍗曚綅缁勫瓙椤圭紪鐮侊紙瀵瑰簲鐨勬槸 涓昏閲忓崟浣嶇紪鐮侊級
- idSubUnitByReport: '', // 鎶ヨ〃杈呭崟浣嶇紪鐮�
- idUnitByStock: '', // 搴撳瓨甯哥敤鍗曚綅缂栫爜
- idUnitByPurchase: '', // 閲囪喘甯哥敤鍗曚綅缂栫爜
- idUnitBySale: '', // 閿�鍞父鐢ㄥ崟浣嶇紪鐮�
- idunitbymanufacture: '', // 鐢熶骇甯哥敤鍗曚綅
- isPurchase: false, // 鏄惁澶栬喘: 0(鍚�)1(鏄�)
- isSale: false, // 鏄惁閿�鍞�:0(鍚�)1(鏄�)
- isMadeSelf: false, // 鏄惁鑷埗: 0(鍚�)1(鏄�)
- isMaterial: false, // 鏄惁鐢熶骇鑰楃敤: 0(鍚�)1(鏄�)
- isMadeRequest: false, // 鏄惁濮斿锛�0(鍚�)1(鏄�)
- idwarehouse: '', // 浠撳簱缂栫爜
- status: '0', // 浣跨敤鐘舵��: 姝e父(0)鍋滅敤(1)
- OperType: '' // 鎿嶄綔绫诲瀷
- },
- dialogFormRules: {
- partcode: [
- { required: true, validator: validateCode, trigger: ['blur', 'change'] }
- ],
- partname: [
- { required: true, message: '璇疯緭鍏ョ粍缁囧悕绉�', trigger: ['blur', 'change'] }
- ],
- unitcode: [
- { required: true, message: '璇烽�夋嫨璁¢噺鍗曚綅(缁�)', trigger: ['blur', 'change'] }
- ],
- inventoryclasscode: [
- { required: true, message: '璇烽�夋嫨鎵�灞炲崟浣�', trigger: ['blur', 'change'] }
- ]
- },
- unittypcodeArr: [
- { code: '1', name: '鍗曡閲�' },
- { code: '0', name: '澶氳閲�' }
- ],
- unitcodeSingleArr: [],
- unitcodeGroupArr: [],
- idSubUnitByReportArr: [],
- idUnitBvStockArr: [],
- idwarehouseArr: [],
-
- // 宸ヨ壓
- dialogVisibleRoute: false,
- dialogFormRoute: {
- projectName: '', // 浜у搧鍚嶇О
- projectCode: '', // 浜у搧浠g爜
- routeOperationArr: [] // 宸ヨ壓璺嚎闆嗗悎
- // routeOperationSelectedArr: [] // 宸ヨ壓璺嚎閫変腑闆嗗悎鏁扮粍
- },
- defaultroute_code: '', // 榛樿宸ヨ壓璺嚎閫変腑鍊�
- defaultroute_codeArr: '', // 榛樿宸ヨ壓璺嚎鏁扮粍
- projectTableData: [], // 宸ュ簭鍒楄〃
- mesSetting: JSON.parse(localStorage.getItem('mesSetting')),
-
- // 鎸夊伐搴忚蛋
- dialogVisibleStep: false,
- stepTableData: [],
- sortable: null,
- stepSelectArr: [], // 宸ュ簭涓嬫媺鏁版嵁
- stepSelectedValue: [] // 宸ュ簭涓嬫媺閫変腑鍊�
- }
- },
- watch: {
- 'stepSelectedValue': {
- // deep: true,
- handler: function(val) {
- // do something with the new and old value of stepSelectedValue
- console.log(val, 1)
- const arr = JSON.parse(JSON.stringify(this.stepTableData))
- const arrStepcode = arr.map(i => i.stepcode)
- this.stepTableData = []
- val.forEach(i => {
- this.stepTableData.push(
- {
- stepcode: i,
- stepname: this.stepSelectArr.find(j => j.stepcode === i).stepname
- // stepprice: arrStepcode.includes(i) ? arr.find(j => j.stepcode === i).stepprice : 0
- }
- )
- })
- }
- }
- },
-
- activated() {
window.addEventListener('resize', this.getHeight)
this.getHeight()
},
created() {
-
- },
- mounted() {
- window.addEventListener('resize', this.getHeight)
- this.getHeight()
-
- this.getTMaterielClassTree()
- this.getSelectApi()
- },
- methods: {
- // 宸ヨ壓鐐瑰嚮 ,鎸夊伐搴忚蛋
- async routeClick2(row) {
- this.dialogVisibleStep = true
- this.dialogFormRoute.projectCode = row.partcode
-
- const res = await TMaterielFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode })
- if (res.code === '200' && res.data.length > 0) {
- this.stepSelectedValue = res.data.map(i => i.step_code)
- }
-
- // 鎷栧姩琛ㄦ牸
- this.$nextTick(() => {
- this.setSort()
- })
- },
-
- stepDialogVisibleCancel() {
- this.dialogVisibleStep = false
- },
-
- async stepDialogVisibleConfirm() {
- if (this.stepSelectedValue.length === 0) {
- return this.$message.info('宸ュ簭鑷冲皯瑕佹湁涓�閬擄紒')
- }
- const children = []
- this.stepSelectedValue.forEach((item, index) => {
- const t = this.stepSelectArr.find(i => i.stepcode === item)
- children.push({
- 'code': t.stepcode,
- 'name': t.stepname,
- 'seq': index + 1,
- 'isbott': index === 0 ? 'Y' : 'N',
- 'isend': index === this.stepSelectedValue.length - 1 ? 'Y' : 'N'
- })
- })
- const data = [
- {
- 'partcode': this.dialogFormRoute.projectCode,
- 'defaultroute_code': '',
- 'children': children
- }
- ]
- this.$store.state.app.buttonIsDisabled = true
- const res = await SaveTMaterielFile(data)
- if (res.code === '200') {
- this.dialogVisibleStep = false
- this.$message.success('淇濆瓨鎴愬姛锛�')
- await this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
- this.$store.state.app.buttonIsDisabled = false
- }
- },
- // 宸ュ簭鍒犻櫎
- stepDel(row) {
- const index = this.stepSelectedValue.findIndex(i => i === row.stepcode)
- this.stepSelectedValue.splice(index, 1)
- },
- handleCloseStep() {
- this.stepTableData = []
- this.sortable = null
- this.stepSelectedValue = []
- },
-
- setSort() {
- const el = this.$refs.stepTableDataRef.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
- this.sortable = Sortable.create(el, {
- ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
- setData: function(dataTransfer) {
- // to avoid Firefox bug
- // Detail see : https://github.com/RubaXa/Sortable/issues/1012
- dataTransfer.setData('Text', '')
- },
- onEnd: evt => {
- const targetRow = this.stepTableData.splice(evt.oldIndex, 1)[0]
- this.stepTableData.splice(evt.newIndex, 0, targetRow)
-
- this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
- // for show the changes, you can delete in you code
- // const tempIndex = this.newList.splice(evt.oldIndex, 1)[0]
- // this.newList.splice(evt.newIndex, 0, tempIndex)
- }
- })
- },
-
- tableRowClassName({ row, rowIndex }) {
- return 'custom-row'
- },
-
- /* 鐐瑰嚮鍏宠仈宸ヨ壓璺嚎妯″潡*/
- // 宸ヨ壓璺嚎鐐瑰嚮
- routeClick(row) {
- const loading = this.$loading({
- lock: true,
- text: '姝e湪鍔犺浇鏁版嵁锛岃绋嶇瓑...',
- spinner: 'el-icon-loading',
- customClass: 'osloading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
-
- this.defaultroute_code = row.default_route
- this.dialogFormRoute.projectCode = row.partcode
- this.dialogFormRoute.projectName = row.partname
-
- TMaterielFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode }).then(res => {
- if (res.code === '200') {
- setTimeout(() => {
- loading.close()
- this.dialogVisibleRoute = true
- this.dialogFormRoute.routeOperationArr = res.data
- // let waitFlag = false// 鍥炴樉绛夊緟鏄惁鏀捐
-
- this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
- item.isSelected1 = false
- item.isSelected2 = false
- if (index === 0) {
- item.isSelected1 = true
- this.projectTableData = item.Data
- }
- if (item.flag === 'Y') {
- item.isSelected2 = true
- this.$nextTick(() => {
- $('input:checkbox').eq(index).prop('checked', true)
- })
-
- // const interval = setInterval(() => {
- // if ($('input:checkbox').length > 0) {
- // waitFlag = true
- // }
- // if (waitFlag) {
- // clearInterval(interval)
- // this.$nextTick(() => {
- // $('input:checkbox').eq(index).prop('checked', true)
- // })
- // }
- // }, 100)
- }
- })
-
- this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y')
- }, 1000)
- } else {
- loading.close()
- }
- })
- },
- // 瀵硅瘽妗嗗叧闂�
- handleCloseRoute() {
- this.dialogFormRoute.routeOperationArr = []
- this.defaultroute_codeArr = []
- },
- // 鍙栨秷
- routeDialogVisibleCancel() {
- this.dialogVisibleRoute = false
- },
- // 纭畾
- async routeDialogVisibleConfirm() {
- if (!this.defaultroute_code || this.defaultroute_code === 'null') {
- return this.$message.info('榛樿宸ヨ壓璺嚎涓嶈兘涓虹┖锛�')
- }
-
- // 鎻愪氦鏍煎紡
- const data = []
- this.dialogFormRoute.routeOperationArr.forEach(item => {
- if (item.isSelected2) {
- data.push({ code: item.code, name: item.name })
- }
- })
-
- const D = [{
- 'partcode': this.dialogFormRoute.projectCode,
- 'defaultroute_code': this.defaultroute_code,
- 'children': data
- }]
-
- this.$store.state.app.buttonIsDisabled = true
- const res = await SaveTMaterielFile(D)
- if (res.code === '200') {
- this.dialogVisibleRoute = false
- this.$message.success('淇濆瓨鎴愬姛锛�')
- await this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
- this.$store.state.app.buttonIsDisabled = false
- }
- },
- // 澶х洅瀛愮偣鍑讳簨浠�
- myCheckboxClick(val) {
- console.log(val, 1)
- this.dialogFormRoute.routeOperationArr.forEach(item => {
- item.isSelected1 = val.code === item.code
- })
-
- this.projectTableData = val.Data
- },
- // 灏忕洅瀛愮偣鍑讳簨浠�
- myCheckboxInputClick(val) {
- // console.log(val, 2)
- val.isSelected2 = !!val.isSelected2
-
- this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
- if (val.code === item.code) {
- item.flag = !item.flag
- }
- })
- if (val.code === this.defaultroute_code) {
- this.defaultroute_code = ''
- }
- this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
- },
-
- async getSelectApi() {
- const { data: res } = await UnitSerch({ tunittype: 'M' })
- this.unitcodeGroupArr = res
-
- const { data: res2 } = await UnitSerch({ tunittype: 'S' })
- this.unitcodeSingleArr = res2
-
- const { data: res3 } = await WareHouse()
- this.idwarehouseArr = res3
-
- // 鑾峰彇宸ュ簭
- const { data: res4 } = await StepData()
- this.stepSelectArr = res4
- },
-
- async getTMaterielClassTree() {
- const res = await TMaterielClassTree()
- res.data.forEach(i => {
- i.idparent = i.idparent ? i.idparent : '-1'
- })
- this.treeLeftArr = res.data
- this.treeLeftArr.forEach(e => {
- e.name = e.code + ' ' + e.name
- })
- this.treeLeft = arrayToTree(this.treeLeft.concat(res.data), {
- parentProperty: 'idparent',
- customID: 'code',
- childrenProperty: 'children'
- })
-
- this.$nextTick(() => {
- this.$refs.treeLeftRef.setCurrentKey('-1')
- this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
- })
- },
- async getTMaterielData(node) {
- const result = this.getChildrenCodeMethod(node, [])
- if (result.includes('-1')) {
- result.shift()
- }
- this.form.inventoryclasscode = result.join(',')
- const res = await TMaterielData(this.form)
-
- this.tableData = res.data
- this.total = res.count
- },
-
- // 鑾峰彇椤甸潰楂樺害
- getHeight() {
- this.$nextTick(() => {
- this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 280
- this.$refs.tableDataRef.doLayout()
- })
- },
- 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.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
- },
- // 鏂板鎸夐挳
- add(operation) {
- this.operation = operation
- this.dialogVisible = true
- this.dialogForm.OperType = 'Add'
- },
- // 淇敼鎸夐挳
- async edit(operation, row) {
- this.operation = operation
- this.dialogVisible = true
- this.dialogForm.OperType = 'Update'
-
- this.$nextTick(() => {
- this.dialogForm.data_sources = row.data_sources
- this.dialogForm.partcode = row.partcode
- this.dialogForm.partname = row.partname
- this.dialogForm.partspec = row.partspec
- this.dialogForm.inventoryclasscode = row.idinventoryclasscode
- this.dialogForm.unittypcode = row.isSingleUnit
- // 璁¢噺鏂瑰紡(0:澶氳閲�,1:鍗曡閲�)
- if (this.dialogForm.unittypcode === '1') {
- this.dialogForm.unitcode = row.idunitcode
- this.dialogForm.unitsubcode = ''
- this.dialogForm.idSubUnitByReport = ''
- const unitname = this.unitcodeSingleArr.find(i => i.unitcode === this.dialogForm.unitcode).unitname
-
- this.dialogForm.idUnitByStock = unitname
- this.dialogForm.idUnitByPurchase = unitname
- this.dialogForm.idUnitBySale = unitname
- this.dialogForm.idunitbymanufacture = unitname
- }
-
- if (this.dialogForm.unittypcode === '0') {
- this.dialogForm.unitcode = row.idunitgroupcode
-
- const t = this.unitcodeGroupArr.find(i => i.unitcode === this.dialogForm.unitcode).children
-
- this.idSubUnitByReportArr = t.filter(i => i.isMainUnit !== '1')
- this.idUnitBvStockArr = t
-
- const mainUnitCode = t.find(i => i.isMainUnit === '1').unitcode
- this.dialogForm.unitsubcode = mainUnitCode
- this.dialogForm.idSubUnitByReport = this.idSubUnitByReportArr[0].unitcode
-
- this.dialogForm.idUnitByStock = mainUnitCode
- this.dialogForm.idUnitByPurchase = mainUnitCode
- this.dialogForm.idUnitBySale = mainUnitCode
- this.dialogForm.idunitbymanufacture = mainUnitCode
- }
-
- this.dialogForm.isPurchase = row.isPurchase === '1'
- this.dialogForm.isSale = row.isSale === '1'
- this.dialogForm.isMadeSelf = row.isMadeSelf === '1'
- this.dialogForm.isMaterial = row.isMaterial === '1'
- this.dialogForm.isMadeRequest = row.isMadeRequest === '1'
-
- this.dialogForm.idwarehouse = row.idwarehousecode
- this.dialogForm.status = row.status
- })
- },
- del(row) {
- this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- TMaterielDelete({ partcode: row.partcode, data_sources: row.data_sources }).then(res => {
- if (res.code === '200') {
- this.$notify.success('鍒犻櫎鎴愬姛!')
- this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
- }
- })
- }).catch(() => {
- this.$notify.info('宸插彇娑堝垹闄�')
- })
- },
- reset() {
- this.form.inventoryclasscode = ''
- this.form.partcode = ''
- this.form.partname = ''
- this.form.partspec = ''
- this.$refs.treeLeftRef.setCurrentKey('-1')
- this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
- },
- // 瀵硅瘽妗嗗叧闂簨浠�
- handleClose() {
- this.dialogForm.data_sources = 'MES'
- this.dialogForm.partcode = ''
- this.dialogForm.partname = ''
- this.dialogForm.partspec = ''
- this.dialogForm.inventoryclasscode = ''
- this.dialogForm.unittypcode = '1'
- this.dialogForm.unitcode = ''
- this.dialogForm.unitsubcode = ''
- this.dialogForm.idSubUnitByReport = ''
- this.dialogForm.idUnitByStock = ''
- this.dialogForm.idUnitByPurchase = ''
- this.dialogForm.idUnitBySale = ''
- this.dialogForm.idunitbymanufacture = ''
- this.dialogForm.isPurchase = false
- this.dialogForm.isSale = false
- this.dialogForm.isMadeSelf = false
- this.dialogForm.isMaterial = false
- this.dialogForm.isMadeRequest = false
- this.dialogForm.idwarehouse = ''
- this.dialogForm.status = '0'
- this.$refs.dialogForm.clearValidate()
- },
- // 瀵硅瘽妗嗗彇娑�
- dialogVisibleCancel() {
- this.dialogVisible = false
- },
- // 瀵硅瘽妗嗙‘璁�
- dialogVisibleConfirm() {
- this.$refs.dialogForm.validate(valid => {
- if (valid) {
- if (!(this.dialogForm.isPurchase || this.dialogForm.isSale || this.dialogForm.isMadeSelf || this.dialogForm.isMaterial || this.dialogForm.isMadeRequest)) {
- return this.$message.info('瀛樿揣灞炴�т笉鑳戒负绌猴紒')
- }
- this.dialogForm.isPurchase = this.dialogForm.isPurchase ? '1' : '0'
- this.dialogForm.isSale = this.dialogForm.isSale ? '1' : '0'
- this.dialogForm.isMadeSelf = this.dialogForm.isMadeSelf ? '1' : '0'
- this.dialogForm.isMaterial = this.dialogForm.isMaterial ? '1' : '0'
- this.dialogForm.isMadeRequest = this.dialogForm.isMadeRequest ? '1' : '0'
- // console.log(JSON.parse(JSON.stringify(this.dialogForm)), 1)
-
- if (this.dialogForm.unittypcode === '1') {
- this.dialogForm.idUnitByStock = this.dialogForm.unitcode
- this.dialogForm.idUnitByPurchase = this.dialogForm.unitcode
- this.dialogForm.idUnitBySale = this.dialogForm.unitcode
- this.dialogForm.idunitbymanufacture = this.dialogForm.unitcode
- }
- this.$store.state.app.buttonIsDisabled = true
- TMaterielAddUpdate(this.dialogForm).then(res => {
- if (res.code === '200') {
- this.$notify.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
- this.dialogVisible = false
- this.$store.state.app.buttonIsDisabled = false
- this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
- } else {
- this.$store.state.app.buttonIsDisabled = false
- this.$notify.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
- }
- })
- }
- })
- },
-
- // 閫掑綊鍙栧瓙闆嗙殑鎵�鏈塩ode
- getChildrenCodeMethod(node, result) {
- result.push(node.code)
- if (node.children && node.children.length > 0) {
- node.children.forEach(i => {
- this.getChildrenCodeMethod(i, result)
- })
- }
- return result
- },
-
- treeEditClick(node, data, operation) {
- this.dialogClassForm.data_sources = data.data_sources
- this.dialogClassForm.inventoryclasscode = data.code
- this.dialogClassForm.inventoryclassname = data.name.split(' ')[1]
- this.dialogClassForm.parentcode = data.idparent === '-1' ? '' : data.idparent
- this.dialogClassForm.OperType = 'Update'
- this.operation = operation
- this.dialogClassVisible = true
- },
- treeDeleteClick(node, data) {
- this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- const result = this.getChildrenCodeMethod(data, [])
- TMaterielClassTreeDelete({ inventoryclasscode: result.join(',') }).then(res => {
- if (res.code === '200') {
- this.$notify.success('鍒犻櫎鎴愬姛!')
- this.getTMaterielClassTree()
- }
- })
- }).catch(() => {
- this.$notify.info('宸插彇娑堝垹闄�')
- })
- },
- treeAddClick(operation) {
- this.operation = operation
- this.dialogClassVisible = true
- this.dialogClassForm.OperType = 'Add'
- this.dialogClassForm.data_sources = 'MES'
- },
-
- handleClassClose() {
- this.dialogClassForm.data_sources = ''
- this.dialogClassForm.inventoryclasscode = ''
- this.dialogClassForm.inventoryclassname = ''
- this.dialogClassForm.parentcode = ''
- this.dialogClassForm.OperType = ''
- this.$refs.dialogClassForm.clearValidate()
- },
- dialogVisibleClassCancel() {
- this.dialogClassVisible = false
- },
- dialogVisibleClassConfirm() {
- this.$refs.dialogClassForm.validate(valid => {
- if (valid) {
- TMaterielClassTreeAddUpdate(this.dialogClassForm).then(res => {
- if (res.code === '200') {
- this.$notify.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
- this.dialogClassVisible = false
- this.$store.state.app.buttonIsDisabled = false
- this.getTMaterielClassTree()
- } else {
- this.$store.state.app.buttonIsDisabled = false
- this.$notify.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
- }
- })
- }
- })
- },
- unittypcodeChange(val) {
- console.log(val)
-
- this.dialogForm.unitcode = ''
- this.dialogForm.unitsubcode = ''
- this.dialogForm.idSubUnitByReport = ''
- this.dialogForm.idUnitByStock = ''
- this.dialogForm.idUnitByPurchase = ''
- this.dialogForm.idUnitBySale = ''
- this.dialogForm.idunitbymanufacture = ''
- // this.$refs.dialogForm.clearValidate()
- // this.$forceUpdate()
- },
- unitcodeChange(val, type) {
- console.log(val)
-
- if (type === '1') {
- // this.dialogForm.unitcode = val
- this.dialogForm.unitsubcode = ''
- this.dialogForm.idSubUnitByReport = ''
-
- const unitname = this.unitcodeSingleArr.find(i => i.unitcode === val).unitname
-
- this.dialogForm.idUnitByStock = unitname
- this.dialogForm.idUnitByPurchase = unitname
- this.dialogForm.idUnitBySale = unitname
- this.dialogForm.idunitbymanufacture = unitname
- }
-
- if (type === '0') {
- const t = this.unitcodeGroupArr.find(i => i.unitcode === val).children
-
- this.idSubUnitByReportArr = t.filter(i => i.isMainUnit !== '1')
- this.idUnitBvStockArr = t
-
- const mainUnitCode = t.find(i => i.isMainUnit === '1').unitcode
- this.dialogForm.unitsubcode = mainUnitCode
- this.dialogForm.idSubUnitByReport = this.idSubUnitByReportArr[0].unitcode
-
- this.dialogForm.idUnitByStock = mainUnitCode
- this.dialogForm.idUnitByPurchase = mainUnitCode
- this.dialogForm.idUnitBySale = mainUnitCode
- this.dialogForm.idunitbymanufacture = mainUnitCode
- }
- },
- // 鍚屾ERP
- syncERP() {
- const loading = this.$loading({
- lock: true,
- text: '姝e湪鍚屾ERP锛岃绋嶇瓑...',
- spinner: 'el-icon-loading',
- customClass: 'osloading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
-
- SaveSearchMateriel_Info().then(res => {
- if (res.code === '200') {
- setTimeout(() => {
- this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
- this.getTMaterielClassTree()
- loading.close()
- this.$notify.success('鍚屾鎴愬姛锛�')
- }, 2000)
- }
- // else if (res.code === '300') {
- // setTimeout(() => {
- // loading.close()
- // this.$message.error('鍚屾澶辫触锛�')
- // }, 10000)
- // }
- }).catch(e => {
- loading.close()
- })
- }
- }
-}
-</script>
-
-<style scoped lang="scss">
-$main_color: #42b983;
-.custom-tree-node {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 14px;
- padding-right: 8px;
-}
-
-//::v-deep .el-checkbox__label {
-// width: 55px;
-//}
-//
-.el-icon-plus:hover, .el-icon-edit:hover, .el-icon-delete:hover {
- color: #000 !important;
-}
-
-.dialogVisibleRoute {
- .myCheckboxGroup {
- display: flex;
- flex-wrap: wrap;
-
- .myCheckbox {
- //border: 1px solid $main_color;
- border: 1px solid #eee;
- display: flex;
- min-width: 100px;
- padding: 10px;
- margin: 10px 30px 0 0;
- border-radius: 5px;
- cursor: default;
- position: relative;
-
- .myCheckboxInput {
- margin: 1px 5px 0 0;
- cursor: pointer;
- }
-
- .myCheckboxInputLabel {
- position: absolute;
- left: 29px;
- padding: 5px;
- top: 6px;
- color: transparent;
- }
-
- }
-
- //.myCheckbox{
- // border: 1px solid $main_color;
- //}
-
- input[type=checkbox] {
- cursor: pointer;
- position: relative;
- width: 14px;
- height: 14px;
- font-size: 14px;
- }
-
- input[type=checkbox]::after {
- position: absolute;
- top: 0;
- //color: rgb(130, 35, 35);
- color: $main_color;
- width: 14px;
- height: 14px;
- display: inline-block;
- visibility: visible;
- padding-left: 0px;
- text-align: center;
- content: ' ';
- border-radius: 3px
- }
-
- input[type=checkbox]:checked::after {
- //content: "鉁�";
- content: "鈭�";
- color: #fff;
- font-size: 12px;
- font-weight: bold;
- background-color: $main_color;
- }
- }
-}
-
-.defaultroute_code ::v-deep .el-input__suffix-inner {
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: -3px;
-}
-
-::v-deep .el-select__caret {
- display: flex !important;
- justify-content: center !important;
- align-items: center !important;
-}
-
-</style>
+<template>
+ <div>
+ <div class="body" :style="{height:mainHeight+'px'}">
+
+ <div style="display: flex">
+ <div style="width: 300px;margin: 10px 10px 0 0;background:#fff">
+
+ <div style="margin: 20px 10px 0 10px;display: flex;justify-content: space-between;">
+ <div style="display: flex;">
+ <div
+ style="width: 5px;height: 100%;border-radius: 5px;"
+ :style="{background:$store.state.settings.theme}"
+ />
+ <div style="margin-left: 8px;">瀛樿揣妗f</div>
+ </div>
+
+ <div style="margin-right:10px">
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="鏂板" placement="top">
+ <i class="el-icon-plus" style="cursor: pointer;color: #999" @click="treeAddClick('add')" />
+ </el-tooltip>
+ </div>
+
+ </div>
+
+ <el-tree
+ ref="treeLeftRef"
+ style="padding: 10px;overflow: auto"
+ :style="{height:(tableHeight+222)+'px'}"
+ :data="treeLeft"
+ node-key="code"
+ highlight-current
+ :props="defaultPropsLeft"
+ :default-expand-all="true"
+ :expand-on-click-node="false"
+ @node-click="getTMaterielData"
+ >
+ <span slot-scope="{ node, data }" class="custom-tree-node">
+ <span v-if="!data.isEdit" class="ellipsis" style="width:150px;">{{ data.name }}</span>
+ <span v-if="!data.isEdit">
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="缂栬緫" placement="top">
+ <i
+ v-if="data.code!=='-1'"
+ class="el-icon-edit"
+ style="margin-right:10px;color: #999"
+ @click.stop="treeEditClick(node,data,'edit')"
+ />
+ </el-tooltip>
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
+ <i
+ v-if="data.code!=='-1'"
+ class="el-icon-delete"
+ style="margin-right: 4px;color: #999"
+ @click.stop="treeDeleteClick(node,data)"
+ />
+ </el-tooltip>
+ </span>
+ </span>
+ </el-tree>
+ </div>
+
+ <div
+ style=" width:calc(100% - 300px);"
+ >
+ <div class="bodyTopButtonGroup" style="justify-content: space-between">
+ <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
+ <div style="display: flex">
+ <el-button
+ v-waves
+ type="success"
+ icon="el-icon-download"
+ @click="$router.push('./../systemSetting/dataImport?fileCode=8')"
+ >瀵煎叆
+ </el-button>
+ <el-button v-waves icon="el-icon-refresh-right" @click="syncERP">鍚屾瀛樿揣妗f</el-button>
+ </div>
+ </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-input v-model="form.partcode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="瀛樿揣鍚嶇О" style=" display: flex;">
+ <el-input v-model="form.partname" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="瀛樿揣瑙勬牸" style=" display: flex;">
+ <el-input v-model="form.partspec" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <!-- <el-form-item label="鐢ㄦ埛缂栫爜" style=" display: flex;">-->
+ <!-- <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">-->
+ <!-- <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛缂栫爜" style=" display: flex;">-->
+ <!-- <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">-->
+ <!-- <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛缂栫爜" style=" display: flex;">-->
+ <!-- <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">-->
+ <!-- <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </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="getTMaterielData($refs.treeLeftRef.getCurrentNode())"
+ >鏌ヨ
+ </el-button>
+ <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
+ </div>
+ </el-form>
+ <div
+ class="bodyTopFormExpand"
+ style="height: 5px;"
+ >
+ <!-- <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+80)+'px'"
+ border
+ row-class-name="custom-row"
+ :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px',}"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ @sort-change="sortChange"
+ >
+ <!-- prop="RowNum"-->
+ <el-table-column
+ prop="rowNum"
+ width="50"
+ fixed
+ label="搴忓彿"
+ />
+ <el-table-column
+ prop="partcode"
+ label="瀛樿揣缂栫爜"
+ sortable="custom"
+ width="110"
+ />
+ <el-table-column
+ prop="partname"
+ label="瀛樿揣鍚嶇О"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="200"
+ />
+ <el-table-column
+ prop="partspec"
+ label="瑙勬牸鍨嬪彿"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.partspec ? row.partspec : '/' }}
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ prop="priuserdefnvc1"
+ label="瀹㈡埛鍚嶇О"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc1 ? row.priuserdefnvc1 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc6"
+ label="瀹㈡埛缂栫爜"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc6 ? row.priuserdefnvc6 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc2"
+ label="瀵瑰唴鍚嶇О"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc2 ? row.priuserdefnvc2 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc3"
+ label="CTP鏃ユ湡"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc3 ? row.priuserdefnvc3 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc4"
+ label="閽㈠垁缂栧彿"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc4 ? row.priuserdefnvc4 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc5"
+ label="鐩掑瀷"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc5 ? row.priuserdefnvc5 : '/' }}
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ prop="idinventoryclassname"
+ label="鎵�灞炵被鍒�"
+ sortable="custom"
+ width="110"
+ />
+ <el-table-column
+ label="璁¢噺鍗曚綅"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.isSingleUnit === '0' ? row.idunitgroupname : row.idunitname }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="status"
+ label="瀛樿揣鐘舵��"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ <el-tag v-if="row.status==='0'" size="small" type="success">姝e父</el-tag>
+ <el-tag v-if="row.status==='1'" size="small" type="danger">鍋滅敤</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="瀛樿揣灞炴��"
+ sortable="custom"
+ min-width="220"
+ >
+ <template slot-scope="{row}">
+ {{ row.isPurchase === '1' ? '澶栬喘' : '' }}
+ {{ row.isSale === '1' ? '閿�鍞�' : '' }}
+ {{ row.isMadeSelf === '1' ? '鑷埗' : '' }}
+ {{ row.isMaterial === '1' ? '鐢熶骇娑堣��' : '' }}
+ {{ row.isMadeRequest === '1' ? '濮斿' : '' }}
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ label="宸ヨ壓"
+ prop=""
+
+ width="110"
+ >
+ <template slot-scope="{row}">
+
+ <!-- <i-->
+ <!-- v-if="row.is_retdproc==='Y'"-->
+ <!-- :style="{color:$store.state.settings.theme}"-->
+ <!-- class="el-icon-share"-->
+ <!-- style="cursor: pointer"-->
+ <!-- @click="routeClick(row)"-->
+ <!-- />-->
+
+ <i
+ :style="{color:row.is_retdproc==='Y'?$store.state.settings.theme:`rgb(180 ,181, 185)`,cursor: 'pointer'}"
+ class="el-icon-share"
+ @click="mesSetting.route?routeClick(row):routeClick2(row)"
+ />
+ </template>
+ </el-table-column>
+
+ <!-- <el-table-column-->
+ <!-- label="鏁版嵁鏉ユ簮"-->
+ <!-- prop="data_sources"-->
+ <!-- sortable="custom"-->
+ <!-- width="110"-->
+ <!-- />-->
+ <el-table-column
+ label="鍒涘缓浜哄憳"
+ prop="lm_user"
+ sortable="custom"
+ width="110"
+ />
+ <el-table-column
+ label="鍒涘缓鏃堕棿"
+ prop="lm_date"
+ sortable="custom"
+ width="160"
+ />
+
+ <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"
+ :style="{color:$store.state.settings.theme}"
+ @click="edit('edit',row)"
+ />
+ </el-tooltip>
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
+ <i
+ class="el-icon-delete"
+ :style="{color:$store.state.settings.theme}"
+ @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,jumper"
+ popper-class="select_bottom"
+ @pagination="getTMaterielData($refs.treeLeftRef.getCurrentNode())"
+ />
+
+ </div>
+ </div>
+ </div>
+
+ <!-- 瀛樿揣绫诲埆鏂板淇敼-->
+ <el-dialog
+ v-el-drag-dialog
+ :title="operation==='add'?'鏂板':'缂栬緫'"
+ :visible.sync="dialogClassVisible"
+ width="800px"
+ :close-on-click-modal="false"
+ top="15vh"
+ @closed="handleClassClose"
+ @close="handleClassClose"
+ >
+ <el-form ref="dialogClassForm" inline :rules="dialogClassFormRules" :model="dialogClassForm" label-width="80px">
+ <el-form-item label="鍒嗙被缂栫爜" prop="inventoryclasscode">
+ <el-input v-model="dialogClassForm.inventoryclasscode" :disabled="operation!=='add'" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="鍒嗙被鍚嶇О" prop="inventoryclassname">
+ <el-input v-model="dialogClassForm.inventoryclassname" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="涓婄骇鍒嗙被">
+ <el-select
+ v-model="dialogClassForm.parentcode"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ :popper-append-to-body="false"
+ clearable
+ >
+ <el-option
+ v-for="item in treeLeftArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ </el-form>
+
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleClassCancel">鍙� 娑�</el-button>
+ <el-button
+ v-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="dialogVisibleClassConfirm"
+ >纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!-- 瀛樿揣妗f鏂板淇敼-->
+ <el-dialog
+ v-el-drag-dialog
+ :title="operation==='add'?'鏂板':'缂栬緫'"
+ :visible.sync="dialogVisible"
+ width="1200px"
+ :close-on-click-modal="false"
+ top="15vh"
+ @closed="handleClose"
+ @close="handleClose"
+ >
+
+ <el-form ref="dialogForm" class="" inline :rules="dialogFormRules" :model="dialogForm" label-width="110px">
+ <el-divider content-position="left">鍩烘湰淇℃伅</el-divider>
+ <el-form-item label="瀛樿揣缂栫爜" prop="partcode">
+ <el-input v-model="dialogForm.partcode" :disabled="operation!=='add'" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="瀛樿揣鍚嶇О" prop="partname">
+ <el-input v-model="dialogForm.partname" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="瑙勬牸鍨嬪彿">
+ <el-input v-model="dialogForm.partspec" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="鎵�灞炵被鍒�" prop="inventoryclasscode">
+ <el-select
+ v-model="dialogForm.inventoryclasscode"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in treeLeftArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鎵�灞炰粨搴�" prop="idwarehouse">
+ <el-select
+ v-model="dialogForm.idwarehouse"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in idwarehouseArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item required label="瀛樿揣鐘舵��">
+ <el-radio-group v-model="dialogForm.status">
+ <el-radio label="0">姝e父</el-radio>
+ <el-radio label="1">鍋滅敤</el-radio>
+ </el-radio-group>
+ </el-form-item>
+
+ <el-divider content-position="left">璁¢噺鍗曚綅</el-divider>
+ <el-form-item label="璁¢噺鏂瑰紡" required prop="unittypcode">
+ <el-select
+ v-model="dialogForm.unittypcode"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :popper-append-to-body="false"
+ @change="unittypcodeChange"
+ >
+ <el-option
+ v-for="item in unittypcodeArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item :label="dialogForm.unittypcode==='1'? '璁¢噺鍗曚綅':'璁¢噺鍗曚綅缁�'" prop="unitcode">
+ <el-select
+ v-if="dialogForm.unittypcode==='1'"
+ v-model="dialogForm.unitcode"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :popper-append-to-body="false"
+ @change="val=>unitcodeChange(val,'1')"
+ >
+ <el-option
+ v-for="item in unitcodeSingleArr"
+ :key="item.unitcode"
+ :label="item.unitname"
+ :value="item.unitcode"
+ />
+ </el-select>
+ <el-select
+ v-if="dialogForm.unittypcode!=='1'"
+ v-model="dialogForm.unitcode"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :popper-append-to-body="false"
+ @change="val=>unitcodeChange(val,'0')"
+ >
+ <el-option
+ v-for="item in unitcodeGroupArr"
+ :key="item.unitcode"
+ :label="item.unitname"
+ :value="item.unitcode"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鎶ヨ〃杈呭崟浣�">
+ <el-select
+ v-model="dialogForm.idSubUnitByReport"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :disabled="dialogForm.unittypcode==='1'"
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in idSubUnitByReportArr"
+ :key="item.unitcode"
+ :label="item.unitname"
+ :value="item.unitcode"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="搴撳瓨甯哥敤鍗曚綅">
+ <el-select
+ v-model="dialogForm.idUnitByStock"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :disabled="dialogForm.unittypcode==='1'"
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in idUnitBvStockArr"
+ :key="item.unitcode"
+ :label="item.unitname"
+ :value="item.unitcode"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="閲囪喘甯哥敤鍗曚綅">
+ <el-select
+ v-model="dialogForm.idUnitByPurchase"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :disabled="dialogForm.unittypcode==='1'"
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in idUnitBvStockArr"
+ :key="item.unitcode"
+ :label="item.unitname"
+ :value="item.unitcode"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="閿�鍞父鐢ㄥ崟浣�">
+ <el-select
+ v-model="dialogForm.idUnitBySale"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :disabled="dialogForm.unittypcode==='1'"
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in idUnitBvStockArr"
+ :key="item.unitcode"
+ :label="item.unitname"
+ :value="item.unitcode"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鐢熶骇甯哥敤鍗曚綅">
+ <el-select
+ v-model="dialogForm.idunitbymanufacture"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :disabled="dialogForm.unittypcode==='1'"
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in idUnitBvStockArr"
+ :key="item.unitcode"
+ :label="item.unitname"
+ :value="item.unitcode"
+ />
+ </el-select>
+ </el-form-item>
+ <el-divider content-position="left">瀛樿揣灞炴��</el-divider>
+ <el-checkbox v-model="dialogForm.isPurchase" style="margin-left: 70px;">澶栬喘</el-checkbox>
+ <el-checkbox v-model="dialogForm.isSale">閿�鍞�</el-checkbox>
+ <el-checkbox v-model="dialogForm.isMadeSelf">鑷埗</el-checkbox>
+ <el-checkbox v-model="dialogForm.isMaterial">鐢熶骇娑堣��</el-checkbox>
+ <el-checkbox v-model="dialogForm.isMadeRequest">濮斿</el-checkbox>
+ <!-- <el-divider content-position="left">瀛樿揣鎻忚堪</el-divider>-->
+ <!-- <el-form-item label="瀛樿揣鎻忚堪">-->
+ <!-- <el-input-->
+ <!-- v-model="dialogForm.username"-->
+ <!-- type="textarea"-->
+ <!-- :autosize="{ minRows: 2, maxRows: 4}"-->
+ <!-- style="width: 490px;"-->
+ <!-- />-->
+ <!-- </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-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="dialogVisibleConfirm"
+ >纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!-- 宸ヨ壓璺嚎瀵硅瘽妗�-->
+ <el-dialog
+ v-el-drag-dialog
+ :close-on-click-modal="false"
+ title="鍏宠仈宸ヨ壓璺嚎"
+ :visible.sync="dialogVisibleRoute"
+ width="800px"
+ top="5vh"
+ class="dialogVisibleRoute"
+ @closed="handleCloseRoute"
+ @close="handleCloseRoute"
+ >
+ <div>
+ <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" /> 浜у搧鍚嶇О锛歿{
+ dialogFormRoute.projectName
+ }}
+ </div>
+ <el-divider />
+ <div style="margin-bottom: 10px">
+ <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 宸ヨ壓璺嚎闆嗗悎
+ </div>
+
+ <div class="myCheckboxGroup">
+ <div
+ v-for="item in dialogFormRoute.routeOperationArr"
+ :key="item.code"
+ :style="{border:item.isSelected1?'1px solid '+$store.state.settings.theme:'1px solid #eee'}"
+ class="myCheckbox"
+ @click="myCheckboxClick(item)"
+ >
+ <!-- <input-->
+ <!-- class="myCheckboxInput"-->
+ <!-- type="checkbox"-->
+ <!-- :value="item.code"-->
+ <!-- :name="item.name"-->
+ <!-- :style="{color:item.isSelected2?'#42b983':'#fff'}"-->
+ <!-- @click="myCheckboxInputClick(item)"-->
+ <!-- >{{ item.name }}-->
+ <!-- 鐖跺瓙鐐瑰嚮浜嬩欢涓嶅奖鍝�-->
+ <!-- onClick="event.cancelBubble = true"-->
+ <el-checkbox
+ :key="item.code"
+ v-model="item.isSelected2"
+ class="myCheckboxInput"
+ :value="item.code"
+ :name="item.name"
+ :label="item.name"
+ :checked="item.isSelected2"
+ @change="myCheckboxInputClick(item)"
+ />
+ <div class="myCheckboxInputLabel">{{ item.name }}</div>
+
+ </div>
+ </div>
+
+ <el-divider />
+ <div>
+ <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 榛樿宸ヨ壓璺嚎
+ </div>
+ <div style="margin-top: 20px">
+ <el-select
+ v-model="defaultroute_code"
+ filterable
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ class="defaultroute_code"
+ >
+ <el-option
+ v-for="item in defaultroute_codeArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </div>
+ <el-divider />
+ <div style="margin-bottom: 10px">
+ <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 宸ュ簭鍒楄〃
+ </div>
+ <div style="overflow-y: scroll">
+ <el-table
+ ref="projectTableData"
+ :data="projectTableData"
+ border
+ height="280"
+ :row-class-name="tableRowClassName"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ >
+ <el-table-column
+ prop="seq"
+ width="100"
+ label="宸ュ簭搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="stepcode"
+ show-tooltip-when-overflow
+ label="宸ュ簭缂栫爜"
+ />
+ <el-table-column
+ prop="stepname"
+ label="宸ュ簭鍚嶇О"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="enable"
+ label="鍚敤鐘舵��"
+ show-tooltip-when-overflow
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.enable==='Y'">
+ <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />
+ 鏄�
+ </div>
+ <div v-if="row.enable==='N'">
+ <i class="el-icon-info" style="margin-right: 2px" />
+ 鍚�
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="routeDialogVisibleCancel">鍙� 娑�</el-button>
+ <el-button
+ v-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="routeDialogVisibleConfirm"
+ >纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!-- 鎸夊伐鑹鸿蛋 宸ュ簭瀵硅瘽妗�-->
+ <el-dialog
+ v-el-drag-dialog
+ :close-on-click-modal="false"
+ title="鍏宠仈宸ュ簭"
+ :visible.sync="dialogVisibleStep"
+ width="800px"
+ top="15vh"
+ class="dialogVisibleStep"
+ @closed="handleCloseStep"
+ @close="handleCloseStep"
+ >
+
+ <div style="display: flex;align-items: center">
+ <div style="font-weight: bolder">宸ュ簭閫夋嫨锛�</div>
+ <el-drag-select
+ v-model="stepSelectedValue"
+ style="width:570px;"
+ multiple
+ placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"
+ >
+ <!-- :disabled="!(dialogForm.mesorderstus==='NEW'||dialogForm.mesorderstus==='ALLO')"-->
+ <el-option
+ v-for="item in stepSelectArr"
+ :key="item.stepcode"
+ :label="item.stepname"
+ :value="item.stepcode"
+ />
+ </el-drag-select>
+ </div>
+
+ <el-table
+ ref="stepTableDataRef"
+ :data="stepTableData"
+ border
+ :row-class-name="tableRowClassName"
+ height="300"
+ style="width: 100%;margin-top: 15px;"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ row-key="stepcode"
+ >
+ <el-table-column
+ type="index"
+ label="搴忓彿"
+ width="50"
+ />
+ <el-table-column
+ prop="stepcode"
+ show-tooltip-when-overflow
+ label="宸ュ簭缂栫爜"
+ />
+ <el-table-column
+ prop="stepname"
+ label="宸ュ簭鍚嶇О"
+ show-tooltip-when-overflow
+ />
+ <!-- <el-table-column-->
+ <!-- prop="stepprice"-->
+ <!-- label="鐢熶骇鍗曚环"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <el-input-->
+ <!-- v-model="row.stepprice"-->
+ <!-- placeholder="璇疯緭鍏ュ伐搴忓崟浠�"-->
+ <!-- oninput="value=value.replace(/[^0-9.]/g,'')"-->
+ <!-- style="width: 100%"-->
+ <!-- @click.stop=""-->
+ <!-- />-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <el-table-column
+ label="鎿嶄綔"
+ width="120"
+ >
+ <template slot-scope="{row}">
+ <div class="operationClass">
+ <!-- <el-tooltip class="item" effect="dark" content="绉诲姩" placement="top">-->
+ <i
+ class="el-icon-rank"
+ :style="{color:$store.state.settings.theme}"
+ style="cursor: move"
+ />
+ <!-- </el-tooltip>-->
+ <!-- @click="edit('edit',row)"-->
+
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
+ <i
+ class="el-icon-delete"
+ :style="{color:$store.state.settings.theme}"
+ style="margin-left: 15px;"
+ @click="stepDel(row)"
+ />
+ </el-tooltip>
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="stepDialogVisibleCancel">鍙� 娑�</el-button>
+ <el-button
+ v-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="stepDialogVisibleConfirm"
+ >纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import waves from '@/directive/waves'
+import Pagination from '@/components/Pagination'
+import { validateCode } from '@/utils/global'
+import elDragDialog from '@/directive/el-drag-dialog'
+import {
+ SaveTMaterielFile,
+ TMaterielAddUpdate,
+ TMaterielClassTree,
+ TMaterielClassTreeAddUpdate,
+ TMaterielClassTreeDelete,
+ TMaterielData, TMaterielDelete, TMaterielFileAssociationRoute
+} from '@/api/ProductModel'
+import arrayToTree from 'array-to-tree'
+import { StepData, UnitSerch, WareHouse } from '@/api/GeneralBasicData'
+import { SaveSearchMateriel_Info } from '@/api/ErpSyncMes'
+import $ from 'jquery'
+import Sortable from 'sortablejs'
+import ElDragSelect from '@/components/DragSelect'
+
+export default {
+ name: 'InventoryList',
+ directives: { waves, elDragDialog },
+ components: {
+ Pagination, ElDragSelect
+ },
+ data() {
+ return {
+ mouseHoverType: 'mouseout',
+ isExpandForm: false,
+ mainHeight: 0,
+ tableHeight: 0,
+ operation: '',
+
+ treeLeft: [
+ {
+ code: '-1',
+ name: '鍏ㄩ儴'
+ }
+ ], // 宸︿晶鏍�
+ treeLeftArr: [],
+ defaultPropsLeft: {
+ children: 'children',
+ label: 'name'
+ },
+
+ tableData: [],
+ form: {
+ inventoryclasscode: '',
+ partcode: '',
+ partname: '',
+ partspec: '',
+ page: 1,
+ rows: 20,
+ prop: 'lm_date', // 鎺掑簭瀛楁
+ order: 'desc' // 鎺掑簭瀛楁
+ },
+ total: 0,
+ dialogClassVisible: false,
+ dialogClassForm: {
+ data_sources: '', // 鏁版嵁鏉ユ簮:ERP/MES
+ inventoryclasscode: '', // 瀛樿揣鍒嗙被缂栫爜
+ inventoryclassname: '', // 瀛樿揣鍒嗙被鍚嶇О
+ parentcode: '', // 涓婄骇鍒嗙被缂栫爜
+ OperType: ''// OperType
+ },
+ classArr: [],
+ dialogClassFormRules: {
+ inventoryclasscode: [
+ { required: true, validator: validateCode, trigger: ['blur', 'change'] }
+ ],
+ inventoryclassname: [
+ { required: true, message: '璇疯緭瀛樿揣绫诲瀷鍚嶇О', trigger: ['blur', 'change'] }
+ ]
+ },
+
+ dialogVisible: false,
+ dialogForm: {
+ data_sources: 'MES', // 鏁版嵁鏉ユ簮锛汦RP/MES
+ partcode: '', // 瀛樿揣缂栫爜
+ partname: '', // 瀛樿揣鍚嶇О
+ partspec: '', // 瑙勬牸鍨嬪彿
+ inventoryclasscode: '', // 瀛樿揣绫诲瀷缂栫爜
+ unittypcode: '1', // 璁¢噺鏂瑰紡(0:澶氳閲�,1:鍗曡閲�)
+ unitcode: '', // 璁¢噺鍗曚綅缂栫爜/璁¢噺鍗曚綅缁勭紪鐮�
+ unitsubcode: '', // 璁¢噺鍗曚綅缁勫瓙椤圭紪鐮侊紙瀵瑰簲鐨勬槸 涓昏閲忓崟浣嶇紪鐮侊級
+ idSubUnitByReport: '', // 鎶ヨ〃杈呭崟浣嶇紪鐮�
+ idUnitByStock: '', // 搴撳瓨甯哥敤鍗曚綅缂栫爜
+ idUnitByPurchase: '', // 閲囪喘甯哥敤鍗曚綅缂栫爜
+ idUnitBySale: '', // 閿�鍞父鐢ㄥ崟浣嶇紪鐮�
+ idunitbymanufacture: '', // 鐢熶骇甯哥敤鍗曚綅
+ isPurchase: false, // 鏄惁澶栬喘: 0(鍚�)1(鏄�)
+ isSale: false, // 鏄惁閿�鍞�:0(鍚�)1(鏄�)
+ isMadeSelf: false, // 鏄惁鑷埗: 0(鍚�)1(鏄�)
+ isMaterial: false, // 鏄惁鐢熶骇鑰楃敤: 0(鍚�)1(鏄�)
+ isMadeRequest: false, // 鏄惁濮斿锛�0(鍚�)1(鏄�)
+ idwarehouse: '', // 浠撳簱缂栫爜
+ status: '0', // 浣跨敤鐘舵��: 姝e父(0)鍋滅敤(1)
+ OperType: '' // 鎿嶄綔绫诲瀷
+ },
+ dialogFormRules: {
+ partcode: [
+ { required: true, validator: validateCode, trigger: ['blur', 'change'] }
+ ],
+ partname: [
+ { required: true, message: '璇疯緭鍏ョ粍缁囧悕绉�', trigger: ['blur', 'change'] }
+ ],
+ unitcode: [
+ { required: true, message: '璇烽�夋嫨璁¢噺鍗曚綅(缁�)', trigger: ['blur', 'change'] }
+ ],
+ inventoryclasscode: [
+ { required: true, message: '璇烽�夋嫨鎵�灞炲崟浣�', trigger: ['blur', 'change'] }
+ ]
+ },
+ unittypcodeArr: [
+ { code: '1', name: '鍗曡閲�' },
+ { code: '0', name: '澶氳閲�' }
+ ],
+ unitcodeSingleArr: [],
+ unitcodeGroupArr: [],
+ idSubUnitByReportArr: [],
+ idUnitBvStockArr: [],
+ idwarehouseArr: [],
+
+ // 宸ヨ壓
+ dialogVisibleRoute: false,
+ dialogFormRoute: {
+ projectName: '', // 浜у搧鍚嶇О
+ projectCode: '', // 浜у搧浠g爜
+ routeOperationArr: [] // 宸ヨ壓璺嚎闆嗗悎
+ // routeOperationSelectedArr: [] // 宸ヨ壓璺嚎閫変腑闆嗗悎鏁扮粍
+ },
+ defaultroute_code: '', // 榛樿宸ヨ壓璺嚎閫変腑鍊�
+ defaultroute_codeArr: '', // 榛樿宸ヨ壓璺嚎鏁扮粍
+ projectTableData: [], // 宸ュ簭鍒楄〃
+ mesSetting: JSON.parse(localStorage.getItem('mesSetting')),
+
+ // 鎸夊伐搴忚蛋
+ dialogVisibleStep: false,
+ stepTableData: [],
+ sortable: null,
+ stepSelectArr: [], // 宸ュ簭涓嬫媺鏁版嵁
+ stepSelectedValue: [] // 宸ュ簭涓嬫媺閫変腑鍊�
+ }
+ },
+ watch: {
+ 'stepSelectedValue': {
+ // deep: true,
+ handler: function(val) {
+ // do something with the new and old value of stepSelectedValue
+ console.log(val, 1)
+ const arr = JSON.parse(JSON.stringify(this.stepTableData))
+ const arrStepcode = arr.map(i => i.stepcode)
+ this.stepTableData = []
+ val.forEach(i => {
+ this.stepTableData.push(
+ {
+ stepcode: i,
+ stepname: this.stepSelectArr.find(j => j.stepcode === i).stepname
+ // stepprice: arrStepcode.includes(i) ? arr.find(j => j.stepcode === i).stepprice : 0
+ }
+ )
+ })
+ }
+ }
+ },
+
+ activated() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+ },
+ created() {
+
+ },
+ mounted() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+
+ this.getTMaterielClassTree()
+ this.getSelectApi()
+ },
+ methods: {
+ // 宸ヨ壓鐐瑰嚮 ,鎸夊伐搴忚蛋
+ async routeClick2(row) {
+ this.dialogVisibleStep = true
+ this.dialogFormRoute.projectCode = row.partcode
+
+ const res = await TMaterielFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode })
+ if (res.code === '200' && res.data.length > 0) {
+ this.stepSelectedValue = res.data.map(i => i.step_code)
+ }
+
+ // 鎷栧姩琛ㄦ牸
+ this.$nextTick(() => {
+ this.setSort()
+ })
+ },
+
+ stepDialogVisibleCancel() {
+ this.dialogVisibleStep = false
+ },
+
+ async stepDialogVisibleConfirm() {
+ if (this.stepSelectedValue.length === 0) {
+ return this.$message.info('宸ュ簭鑷冲皯瑕佹湁涓�閬擄紒')
+ }
+ const children = []
+ this.stepSelectedValue.forEach((item, index) => {
+ const t = this.stepSelectArr.find(i => i.stepcode === item)
+ children.push({
+ 'code': t.stepcode,
+ 'name': t.stepname,
+ 'seq': index + 1,
+ 'isbott': index === 0 ? 'Y' : 'N',
+ 'isend': index === this.stepSelectedValue.length - 1 ? 'Y' : 'N'
+ })
+ })
+ const data = [
+ {
+ 'partcode': this.dialogFormRoute.projectCode,
+ 'defaultroute_code': '',
+ 'children': children
+ }
+ ]
+ this.$store.state.app.buttonIsDisabled = true
+ const res = await SaveTMaterielFile(data)
+ if (res.code === '200') {
+ this.dialogVisibleStep = false
+ this.$message.success('淇濆瓨鎴愬姛锛�')
+ await this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
+ this.$store.state.app.buttonIsDisabled = false
+ }
+ },
+ // 宸ュ簭鍒犻櫎
+ stepDel(row) {
+ const index = this.stepSelectedValue.findIndex(i => i === row.stepcode)
+ this.stepSelectedValue.splice(index, 1)
+ },
+ handleCloseStep() {
+ this.stepTableData = []
+ this.sortable = null
+ this.stepSelectedValue = []
+ },
+
+ setSort() {
+ const el = this.$refs.stepTableDataRef.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
+ this.sortable = Sortable.create(el, {
+ ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
+ setData: function(dataTransfer) {
+ // to avoid Firefox bug
+ // Detail see : https://github.com/RubaXa/Sortable/issues/1012
+ dataTransfer.setData('Text', '')
+ },
+ onEnd: evt => {
+ const targetRow = this.stepTableData.splice(evt.oldIndex, 1)[0]
+ this.stepTableData.splice(evt.newIndex, 0, targetRow)
+
+ this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ // for show the changes, you can delete in you code
+ // const tempIndex = this.newList.splice(evt.oldIndex, 1)[0]
+ // this.newList.splice(evt.newIndex, 0, tempIndex)
+ }
+ })
+ },
+
+ tableRowClassName({ row, rowIndex }) {
+ return 'custom-row'
+ },
+
+ /* 鐐瑰嚮鍏宠仈宸ヨ壓璺嚎妯″潡*/
+ // 宸ヨ壓璺嚎鐐瑰嚮
+ routeClick(row) {
+ const loading = this.$loading({
+ lock: true,
+ text: '姝e湪鍔犺浇鏁版嵁锛岃绋嶇瓑...',
+ spinner: 'el-icon-loading',
+ customClass: 'osloading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+
+ this.defaultroute_code = row.default_route
+ this.dialogFormRoute.projectCode = row.partcode
+ this.dialogFormRoute.projectName = row.partname
+
+ TMaterielFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode }).then(res => {
+ if (res.code === '200') {
+ setTimeout(() => {
+ loading.close()
+ this.dialogVisibleRoute = true
+ this.dialogFormRoute.routeOperationArr = res.data
+ // let waitFlag = false// 鍥炴樉绛夊緟鏄惁鏀捐
+
+ this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
+ item.isSelected1 = false
+ item.isSelected2 = false
+ if (index === 0) {
+ item.isSelected1 = true
+ this.projectTableData = item.Data
+ }
+ if (item.flag === 'Y') {
+ item.isSelected2 = true
+ this.$nextTick(() => {
+ $('input:checkbox').eq(index).prop('checked', true)
+ })
+
+ // const interval = setInterval(() => {
+ // if ($('input:checkbox').length > 0) {
+ // waitFlag = true
+ // }
+ // if (waitFlag) {
+ // clearInterval(interval)
+ // this.$nextTick(() => {
+ // $('input:checkbox').eq(index).prop('checked', true)
+ // })
+ // }
+ // }, 100)
+ }
+ })
+
+ this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y')
+ }, 1000)
+ } else {
+ loading.close()
+ }
+ })
+ },
+ // 瀵硅瘽妗嗗叧闂�
+ handleCloseRoute() {
+ this.dialogFormRoute.routeOperationArr = []
+ this.defaultroute_codeArr = []
+ },
+ // 鍙栨秷
+ routeDialogVisibleCancel() {
+ this.dialogVisibleRoute = false
+ },
+ // 纭畾
+ async routeDialogVisibleConfirm() {
+ if (!this.defaultroute_code || this.defaultroute_code === 'null') {
+ return this.$message.info('榛樿宸ヨ壓璺嚎涓嶈兘涓虹┖锛�')
+ }
+
+ // 鎻愪氦鏍煎紡
+ const data = []
+ this.dialogFormRoute.routeOperationArr.forEach(item => {
+ if (item.isSelected2) {
+ data.push({ code: item.code, name: item.name })
+ }
+ })
+
+ const D = [{
+ 'partcode': this.dialogFormRoute.projectCode,
+ 'defaultroute_code': this.defaultroute_code,
+ 'children': data
+ }]
+
+ this.$store.state.app.buttonIsDisabled = true
+ const res = await SaveTMaterielFile(D)
+ if (res.code === '200') {
+ this.dialogVisibleRoute = false
+ this.$message.success('淇濆瓨鎴愬姛锛�')
+ await this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
+ this.$store.state.app.buttonIsDisabled = false
+ }
+ },
+ // 澶х洅瀛愮偣鍑讳簨浠�
+ myCheckboxClick(val) {
+ console.log(val, 1)
+ this.dialogFormRoute.routeOperationArr.forEach(item => {
+ item.isSelected1 = val.code === item.code
+ })
+
+ this.projectTableData = val.Data
+ },
+ // 灏忕洅瀛愮偣鍑讳簨浠�
+ myCheckboxInputClick(val) {
+ // console.log(val, 2)
+ val.isSelected2 = !!val.isSelected2
+
+ this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
+ if (val.code === item.code) {
+ item.flag = !item.flag
+ }
+ })
+ if (val.code === this.defaultroute_code) {
+ this.defaultroute_code = ''
+ }
+ this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
+ },
+
+ async getSelectApi() {
+ const { data: res } = await UnitSerch({ tunittype: 'M' })
+ this.unitcodeGroupArr = res
+
+ const { data: res2 } = await UnitSerch({ tunittype: 'S' })
+ this.unitcodeSingleArr = res2
+
+ const { data: res3 } = await WareHouse()
+ this.idwarehouseArr = res3
+
+ // 鑾峰彇宸ュ簭
+ const { data: res4 } = await StepData()
+ this.stepSelectArr = res4
+ },
+
+ async getTMaterielClassTree() {
+ const res = await TMaterielClassTree()
+ res.data.forEach(i => {
+ i.idparent = i.idparent ? i.idparent : '-1'
+ })
+ this.treeLeftArr = res.data
+ this.treeLeftArr.forEach(e => {
+ e.name = e.code + ' ' + e.name
+ })
+ this.treeLeft = arrayToTree(this.treeLeft.concat(res.data), {
+ parentProperty: 'idparent',
+ customID: 'code',
+ childrenProperty: 'children'
+ })
+
+ this.$nextTick(() => {
+ this.$refs.treeLeftRef.setCurrentKey('-1')
+ this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
+ })
+ },
+ async getTMaterielData(node) {
+ const result = this.getChildrenCodeMethod(node, [])
+ if (result.includes('-1')) {
+ result.shift()
+ }
+ this.form.inventoryclasscode = result.join(',')
+ const res = await TMaterielData(this.form)
+
+ this.tableData = res.data
+ this.total = res.count
+ },
+
+ // 鑾峰彇椤甸潰楂樺害
+ getHeight() {
+ this.$nextTick(() => {
+ this.mainHeight = window.innerHeight - 85
+ this.tableHeight = this.mainHeight - 280
+ this.$refs.tableDataRef.doLayout()
+ })
+ },
+ 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.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
+ },
+ // 鏂板鎸夐挳
+ add(operation) {
+ this.operation = operation
+ this.dialogVisible = true
+ this.dialogForm.OperType = 'Add'
+ },
+ // 淇敼鎸夐挳
+ async edit(operation, row) {
+ this.operation = operation
+ this.dialogVisible = true
+ this.dialogForm.OperType = 'Update'
+
+ this.$nextTick(() => {
+ this.dialogForm.data_sources = row.data_sources
+ this.dialogForm.partcode = row.partcode
+ this.dialogForm.partname = row.partname
+ this.dialogForm.partspec = row.partspec
+ this.dialogForm.inventoryclasscode = row.idinventoryclasscode
+ this.dialogForm.unittypcode = row.isSingleUnit
+ // 璁¢噺鏂瑰紡(0:澶氳閲�,1:鍗曡閲�)
+ if (this.dialogForm.unittypcode === '1') {
+ this.dialogForm.unitcode = row.idunitcode
+ this.dialogForm.unitsubcode = ''
+ this.dialogForm.idSubUnitByReport = ''
+ const unitname = this.unitcodeSingleArr.find(i => i.unitcode === this.dialogForm.unitcode).unitname
+
+ this.dialogForm.idUnitByStock = unitname
+ this.dialogForm.idUnitByPurchase = unitname
+ this.dialogForm.idUnitBySale = unitname
+ this.dialogForm.idunitbymanufacture = unitname
+ }
+
+ if (this.dialogForm.unittypcode === '0') {
+ this.dialogForm.unitcode = row.idunitgroupcode
+
+ const t = this.unitcodeGroupArr.find(i => i.unitcode === this.dialogForm.unitcode).children
+
+ this.idSubUnitByReportArr = t.filter(i => i.isMainUnit !== '1')
+ this.idUnitBvStockArr = t
+
+ const mainUnitCode = t.find(i => i.isMainUnit === '1').unitcode
+ this.dialogForm.unitsubcode = mainUnitCode
+ this.dialogForm.idSubUnitByReport = this.idSubUnitByReportArr[0].unitcode
+
+ this.dialogForm.idUnitByStock = mainUnitCode
+ this.dialogForm.idUnitByPurchase = mainUnitCode
+ this.dialogForm.idUnitBySale = mainUnitCode
+ this.dialogForm.idunitbymanufacture = mainUnitCode
+ }
+
+ this.dialogForm.isPurchase = row.isPurchase === '1'
+ this.dialogForm.isSale = row.isSale === '1'
+ this.dialogForm.isMadeSelf = row.isMadeSelf === '1'
+ this.dialogForm.isMaterial = row.isMaterial === '1'
+ this.dialogForm.isMadeRequest = row.isMadeRequest === '1'
+
+ this.dialogForm.idwarehouse = row.idwarehousecode
+ this.dialogForm.status = row.status
+ })
+ },
+ del(row) {
+ this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ TMaterielDelete({ partcode: row.partcode, data_sources: row.data_sources }).then(res => {
+ if (res.code === '200') {
+ this.$notify.success('鍒犻櫎鎴愬姛!')
+ this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
+ }
+ })
+ }).catch(() => {
+ this.$notify.info('宸插彇娑堝垹闄�')
+ })
+ },
+ reset() {
+ this.form.inventoryclasscode = ''
+ this.form.partcode = ''
+ this.form.partname = ''
+ this.form.partspec = ''
+ this.$refs.treeLeftRef.setCurrentKey('-1')
+ this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
+ },
+ // 瀵硅瘽妗嗗叧闂簨浠�
+ handleClose() {
+ this.dialogForm.data_sources = 'MES'
+ this.dialogForm.partcode = ''
+ this.dialogForm.partname = ''
+ this.dialogForm.partspec = ''
+ this.dialogForm.inventoryclasscode = ''
+ this.dialogForm.unittypcode = '1'
+ this.dialogForm.unitcode = ''
+ this.dialogForm.unitsubcode = ''
+ this.dialogForm.idSubUnitByReport = ''
+ this.dialogForm.idUnitByStock = ''
+ this.dialogForm.idUnitByPurchase = ''
+ this.dialogForm.idUnitBySale = ''
+ this.dialogForm.idunitbymanufacture = ''
+ this.dialogForm.isPurchase = false
+ this.dialogForm.isSale = false
+ this.dialogForm.isMadeSelf = false
+ this.dialogForm.isMaterial = false
+ this.dialogForm.isMadeRequest = false
+ this.dialogForm.idwarehouse = ''
+ this.dialogForm.status = '0'
+ this.$refs.dialogForm.clearValidate()
+ },
+ // 瀵硅瘽妗嗗彇娑�
+ dialogVisibleCancel() {
+ this.dialogVisible = false
+ },
+ // 瀵硅瘽妗嗙‘璁�
+ dialogVisibleConfirm() {
+ this.$refs.dialogForm.validate(valid => {
+ if (valid) {
+ if (!(this.dialogForm.isPurchase || this.dialogForm.isSale || this.dialogForm.isMadeSelf || this.dialogForm.isMaterial || this.dialogForm.isMadeRequest)) {
+ return this.$message.info('瀛樿揣灞炴�т笉鑳戒负绌猴紒')
+ }
+ this.dialogForm.isPurchase = this.dialogForm.isPurchase ? '1' : '0'
+ this.dialogForm.isSale = this.dialogForm.isSale ? '1' : '0'
+ this.dialogForm.isMadeSelf = this.dialogForm.isMadeSelf ? '1' : '0'
+ this.dialogForm.isMaterial = this.dialogForm.isMaterial ? '1' : '0'
+ this.dialogForm.isMadeRequest = this.dialogForm.isMadeRequest ? '1' : '0'
+ // console.log(JSON.parse(JSON.stringify(this.dialogForm)), 1)
+
+ if (this.dialogForm.unittypcode === '1') {
+ this.dialogForm.idUnitByStock = this.dialogForm.unitcode
+ this.dialogForm.idUnitByPurchase = this.dialogForm.unitcode
+ this.dialogForm.idUnitBySale = this.dialogForm.unitcode
+ this.dialogForm.idunitbymanufacture = this.dialogForm.unitcode
+ }
+ this.$store.state.app.buttonIsDisabled = true
+ TMaterielAddUpdate(this.dialogForm).then(res => {
+ if (res.code === '200') {
+ this.$notify.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
+ this.dialogVisible = false
+ this.$store.state.app.buttonIsDisabled = false
+ this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
+ } else {
+ this.$store.state.app.buttonIsDisabled = false
+ this.$notify.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
+ }
+ })
+ }
+ })
+ },
+
+ // 閫掑綊鍙栧瓙闆嗙殑鎵�鏈塩ode
+ getChildrenCodeMethod(node, result) {
+ result.push(node.code)
+ if (node.children && node.children.length > 0) {
+ node.children.forEach(i => {
+ this.getChildrenCodeMethod(i, result)
+ })
+ }
+ return result
+ },
+
+ treeEditClick(node, data, operation) {
+ this.dialogClassForm.data_sources = data.data_sources
+ this.dialogClassForm.inventoryclasscode = data.code
+ this.dialogClassForm.inventoryclassname = data.name.split(' ')[1]
+ this.dialogClassForm.parentcode = data.idparent === '-1' ? '' : data.idparent
+ this.dialogClassForm.OperType = 'Update'
+ this.operation = operation
+ this.dialogClassVisible = true
+ },
+ treeDeleteClick(node, data) {
+ this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ const result = this.getChildrenCodeMethod(data, [])
+ TMaterielClassTreeDelete({ inventoryclasscode: result.join(',') }).then(res => {
+ if (res.code === '200') {
+ this.$notify.success('鍒犻櫎鎴愬姛!')
+ this.getTMaterielClassTree()
+ }
+ })
+ }).catch(() => {
+ this.$notify.info('宸插彇娑堝垹闄�')
+ })
+ },
+ treeAddClick(operation) {
+ this.operation = operation
+ this.dialogClassVisible = true
+ this.dialogClassForm.OperType = 'Add'
+ this.dialogClassForm.data_sources = 'MES'
+ },
+
+ handleClassClose() {
+ this.dialogClassForm.data_sources = ''
+ this.dialogClassForm.inventoryclasscode = ''
+ this.dialogClassForm.inventoryclassname = ''
+ this.dialogClassForm.parentcode = ''
+ this.dialogClassForm.OperType = ''
+ this.$refs.dialogClassForm.clearValidate()
+ },
+ dialogVisibleClassCancel() {
+ this.dialogClassVisible = false
+ },
+ dialogVisibleClassConfirm() {
+ this.$refs.dialogClassForm.validate(valid => {
+ if (valid) {
+ TMaterielClassTreeAddUpdate(this.dialogClassForm).then(res => {
+ if (res.code === '200') {
+ this.$notify.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
+ this.dialogClassVisible = false
+ this.$store.state.app.buttonIsDisabled = false
+ this.getTMaterielClassTree()
+ } else {
+ this.$store.state.app.buttonIsDisabled = false
+ this.$notify.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
+ }
+ })
+ }
+ })
+ },
+ unittypcodeChange(val) {
+ console.log(val)
+
+ this.dialogForm.unitcode = ''
+ this.dialogForm.unitsubcode = ''
+ this.dialogForm.idSubUnitByReport = ''
+ this.dialogForm.idUnitByStock = ''
+ this.dialogForm.idUnitByPurchase = ''
+ this.dialogForm.idUnitBySale = ''
+ this.dialogForm.idunitbymanufacture = ''
+ // this.$refs.dialogForm.clearValidate()
+ // this.$forceUpdate()
+ },
+ unitcodeChange(val, type) {
+ console.log(val)
+
+ if (type === '1') {
+ // this.dialogForm.unitcode = val
+ this.dialogForm.unitsubcode = ''
+ this.dialogForm.idSubUnitByReport = ''
+
+ const unitname = this.unitcodeSingleArr.find(i => i.unitcode === val).unitname
+
+ this.dialogForm.idUnitByStock = unitname
+ this.dialogForm.idUnitByPurchase = unitname
+ this.dialogForm.idUnitBySale = unitname
+ this.dialogForm.idunitbymanufacture = unitname
+ }
+
+ if (type === '0') {
+ const t = this.unitcodeGroupArr.find(i => i.unitcode === val).children
+
+ this.idSubUnitByReportArr = t.filter(i => i.isMainUnit !== '1')
+ this.idUnitBvStockArr = t
+
+ const mainUnitCode = t.find(i => i.isMainUnit === '1').unitcode
+ this.dialogForm.unitsubcode = mainUnitCode
+ this.dialogForm.idSubUnitByReport = this.idSubUnitByReportArr[0].unitcode
+
+ this.dialogForm.idUnitByStock = mainUnitCode
+ this.dialogForm.idUnitByPurchase = mainUnitCode
+ this.dialogForm.idUnitBySale = mainUnitCode
+ this.dialogForm.idunitbymanufacture = mainUnitCode
+ }
+ },
+ // 鍚屾ERP
+ syncERP() {
+ const loading = this.$loading({
+ lock: true,
+ text: '姝e湪鍚屾ERP锛岃绋嶇瓑...',
+ spinner: 'el-icon-loading',
+ customClass: 'osloading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+
+ SaveSearchMateriel_Info().then(res => {
+ if (res.code === '200') {
+ setTimeout(() => {
+ this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
+ this.getTMaterielClassTree()
+ loading.close()
+ this.$notify.success('鍚屾鎴愬姛锛�')
+ }, 2000)
+ }
+ // else if (res.code === '300') {
+ // setTimeout(() => {
+ // loading.close()
+ // this.$message.error('鍚屾澶辫触锛�')
+ // }, 10000)
+ // }
+ }).catch(e => {
+ loading.close()
+ })
+ }
+ }
+}
+</script>
+
+<style scoped lang="scss">
+$main_color: #42b983;
+.custom-tree-node {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-size: 14px;
+ padding-right: 8px;
+}
+
+//::v-deep .el-checkbox__label {
+// width: 55px;
+//}
+//
+.el-icon-plus:hover, .el-icon-edit:hover, .el-icon-delete:hover {
+ color: #000 !important;
+}
+
+.dialogVisibleRoute {
+ .myCheckboxGroup {
+ display: flex;
+ flex-wrap: wrap;
+
+ .myCheckbox {
+ //border: 1px solid $main_color;
+ border: 1px solid #eee;
+ display: flex;
+ min-width: 100px;
+ padding: 10px;
+ margin: 10px 30px 0 0;
+ border-radius: 5px;
+ cursor: default;
+ position: relative;
+
+ .myCheckboxInput {
+ margin: 1px 5px 0 0;
+ cursor: pointer;
+ }
+
+ .myCheckboxInputLabel {
+ position: absolute;
+ left: 29px;
+ padding: 5px;
+ top: 6px;
+ color: transparent;
+ }
+
+ }
+
+ //.myCheckbox{
+ // border: 1px solid $main_color;
+ //}
+
+ input[type=checkbox] {
+ cursor: pointer;
+ position: relative;
+ width: 14px;
+ height: 14px;
+ font-size: 14px;
+ }
+
+ input[type=checkbox]::after {
+ position: absolute;
+ top: 0;
+ //color: rgb(130, 35, 35);
+ color: $main_color;
+ width: 14px;
+ height: 14px;
+ display: inline-block;
+ visibility: visible;
+ padding-left: 0px;
+ text-align: center;
+ content: ' ';
+ border-radius: 3px
+ }
+
+ input[type=checkbox]:checked::after {
+ //content: "鉁�";
+ content: "鈭�";
+ color: #fff;
+ font-size: 12px;
+ font-weight: bold;
+ background-color: $main_color;
+ }
+ }
+}
+
+.defaultroute_code ::v-deep .el-input__suffix-inner {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-top: -3px;
+}
+
+::v-deep .el-select__caret {
+ display: flex !important;
+ justify-content: center !important;
+ align-items: center !important;
+}
+
+</style>
diff --git a/src/views/produce/stepReport.vue b/src/views/produce/stepReport.vue
index 3779137..e9ae386 100644
--- a/src/views/produce/stepReport.vue
+++ b/src/views/produce/stepReport.vue
@@ -1,1682 +1,1748 @@
-<template>
- <div>
- <div class="body" style="padding-top: 10px;" :style="{height:mainHeight+'px'}">
-
- <div style="position: absolute;right:36px;z-index: 2;top: 13px">
- <el-button
- v-if="activeName==='鐢熶骇鍒楄〃'&&tableData.length>0"
- v-waves
- icon="el-icon-thumb"
- type="primary"
- :disabled="radioSelected===''"
- @click="report()"
- >鎶ュ伐
- </el-button>
- <el-button
- v-if="activeName==='澶栧崗鍙戞枡'&&tableData.length>0"
- v-waves
- type="primary"
- icon="el-icon-thumb"
- :disabled="radioSelected===''"
- @click="sendOut()"
- >鍙戞枡
- </el-button>
- <el-button
- v-if="activeName==='澶栧崗鏀舵枡'&&tableData.length>0"
- v-waves
- type="primary"
- icon="el-icon-thumb"
- :disabled="radioSelected===''"
- @click="takeIn()"
- >鏀舵枡
- </el-button>
- <el-button
- v-if="activeName==='涓嶈壇寰呭鐞�'&&tableData.length>0"
- v-waves
- type="primary"
- icon="el-icon-thumb"
- :disabled="radioSelected===''"
- @click="handleBad()"
- >澶勭悊
- </el-button>
- </div>
-
- <div v-if="form.wocode" style="position: absolute;left: 460px;z-index: 2;top: 23px;font-weight: bolder">
- 褰撳墠宸ュ崟鍙蜂负锛歿{ form.wocode }}
- </div>
-
- <el-tabs
- ref="elTabs"
- v-model="activeName"
- type="border-card"
- @tab-click="tabClick"
- >
-
- <el-tab-pane
- v-for="item in elTabsArr"
- :key="item.code"
- :label="item.name"
- :name="item.name"
- >
-
- <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-input
- v-model="workOrderCurrentValue"
- :name="'produceCode'+item.code"
- placeholder="璇锋壂鎻忔垨杈撳叆"
- style="width: 300px"
-
- @keyup.enter.native="val=>enterNative(val,'produceCode' + item.code)"
- />
- </el-form-item>
- <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
- <el-input
- v-model="form.partcode"
- placeholder="璇疯緭鍏�"
- style="width: 200px"
-
- @keyup.enter.native="val=>enterNative(val,'produceCode' + item.code)"
- />
- </el-form-item>
- <el-form-item label="浜у搧鍚嶇О" style=" display: flex;">
- <el-input
- v-model="form.partname"
- placeholder="璇疯緭鍏�"
-
- style="width: 200px"
- @keyup.enter.native="val=>enterNative(val,'produceCode' + item.code)"
- />
- </el-form-item>
- <el-form-item label="杞﹂棿鍚嶇О" style=" display: flex;">
- <el-select
- v-model="form.wkshopcode"
- filterable
- :popper-append-to-body="false"
- style="width: 200px"
-
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in wkshopcodeArr"
- :key="item.torg_code"
- :label="item.torg_name"
- :value="item.torg_code"
- />
- </el-select>
- </el-form-item>
-
- <!-- <el-form-item label="瑙勬牸鍨嬪彿" style=" display: flex;">-->
- <!-- <el-input v-model="form.partspec" placeholder="璇疯緭鍏�" style="width: 200px" />-->
- <!-- </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"
- style="height:5px"
- >
- <!-- <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"
- :key="'tableDataRef'+item.code"
- class="tableFixed"
- :data="tableData"
- :height="tableHeight+50"
- border
- row-class-name="custom-row"
- :style="{width: 100+'%',height:tableHeight+'px'}"
- highlight-current-row
- :header-cell-style="headerCellStyle()"
- :cell-style="cellStyle()"
- @sort-change="sortChange"
- @row-click="rowClick"
- >
- <el-table-column
- width="50"
- fixed
- >
- <template slot-scope="{row}">
- <el-radio
- v-model="radioSelected"
- :label="row.id"
- style="color: transparent;padding-left: 10px;"
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="rowNum"
- width="50"
- label="搴忓彿"
- fixed
- />
- <el-table-column
- v-if="activeName!=='涓嶈壇寰呭鐞�'"
- 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="宸ュ崟鍙�"
- min-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"
- min-width="110"
- show-tooltip-when-overflow
- label="浜у搧鍚嶇О"
- sortable="custom"
- />
- <el-table-column
- prop="partspec"
- min-width="110"
- show-tooltip-when-overflow
- label="瑙勬牸鍨嬪彿"
- sortable="custom"
- >
- <template slot-scope="{row}">
- {{ row.partspec ? row.partspec : '/' }}
- </template>
- </el-table-column>
- <el-table-column
- prop="wkshp_name"
- min-width="110"
- 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="plan_qty"
- label="浠诲姟鏁伴噺"
- width="110"
- sortable="custom"
- show-tooltip-when-overflow
- />
- <el-table-column
- v-if="activeName==='澶栧崗鍙戞枡'||activeName==='澶栧崗鏀舵枡'"
- prop="fqty"
- show-tooltip-when-overflow
- label="宸插彂鏂欐暟閲�"
- sortable="custom"
- width="120"
- />
- <el-table-column
- prop="good_qty"
- show-tooltip-when-overflow
- :label="activeName==='澶栧崗鍙戞枡'||activeName==='澶栧崗鏀舵枡'?'宸叉敹鏂欐暟閲�':'鍚堟牸鏁伴噺'"
- sortable="custom"
- width="120"
- />
- <el-table-column
- prop="ng_qty"
- label="涓嶈壇鏁伴噺"
- show-tooltip-when-overflow
- width="120"
- sortable="custom"
- />
- <el-table-column
- prop="laborbad_qty"
- label="宸ュ簾鏁伴噺"
- width="120"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <el-table-column
- prop="materielbad_qty"
- label="鏂欏簾鏁伴噺"
- width="120"
- show-tooltip-when-overflow
- sortable="custom"
- />
-
- <el-table-column
- label="鎿嶄綔"
- width="120"
- fixed="right"
- >
- <template slot-scope="{row}">
- <div class="operationClass">
- <el-button v-if="activeName==='鐢熶骇鍒楄〃'" v-waves icon="el-icon-thumb" type="text" @click="report(row)">
- 鎶ュ伐
- </el-button>
- <el-button
- v-if="activeName==='澶栧崗鍙戞枡'"
- v-waves
- icon="el-icon-thumb"
- type="text"
- @click="sendOut(row)"
- >鍙戞枡
- </el-button>
- <el-button v-if="activeName==='澶栧崗鏀舵枡'" v-waves icon="el-icon-thumb" type="text" @click="takeIn(row)">
- 鏀舵枡
- </el-button>
- <el-button
- v-if="activeName==='涓嶈壇寰呭鐞�'"
- v-waves
- icon="el-icon-thumb"
- type="text"
- @click="handleBad(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="search"
- />
- </el-tab-pane>
-
- </el-tabs>
-
- </div>
-
- <!-- 寮�鎶ュ伐銆佸鍗忋�佷笉鑹鐞�-->
- <el-dialog
- v-el-drag-dialog
- :title="dialogTitle"
- :visible.sync="dialogVisible"
- width="1160px"
- :close-on-click-modal="false"
- :top="activeName==='鐢熶骇鍒楄〃'||activeName==='澶栧崗鏀舵枡'? '6vh':'15vh'"
- @closed="handleClose"
- @close="handleClose"
- >
- <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="110px">
- <!-- <el-divider v-if="activeName==='鐢熶骇鍒楄〃'||activeName==='澶栧崗鏀舵枡'||activeName==='涓嶈壇寰呭鐞�'" content-position="left">鍩烘湰淇℃伅</el-divider>-->
- <el-divider v-if="activeName==='鐢熶骇鍒楄〃'" content-position="left">鎶ュ伐淇℃伅</el-divider>
- <el-divider v-if="activeName==='澶栧崗鏀舵枡'" content-position="left">鏀舵枡淇℃伅</el-divider>
- <el-divider v-if="activeName==='涓嶈壇寰呭鐞�'" content-position="left">寰呭鐞嗕俊鎭�</el-divider>
- <el-form-item label="宸ュ崟缂栧彿" class="dialogFormItem">
- <div class="dialogFormItemDiv">{{ dialogForm.wo_code }}</div>
- </el-form-item>
- <el-form-item label="浜у搧缂栫爜" class="dialogFormItem">
- <div class="dialogFormItemDiv">{{ dialogForm.partnumber }}</div>
- </el-form-item>
- <el-form-item label="浜у搧鍚嶇О" class="dialogFormItem">
- <div class="dialogFormItemDiv">{{ dialogForm.partname }}</div>
- </el-form-item>
- <el-form-item label="瑙勬牸鍨嬪彿" class="dialogFormItem">
- <div class="dialogFormItemDiv">{{ dialogForm.partspec ? dialogForm.partspec : '/' }}</div>
- </el-form-item>
- <el-form-item label="褰撳墠宸ュ簭" class="dialogFormItem">
- <div class="dialogFormItemDiv">{{ dialogForm.stepname }}</div>
- </el-form-item>
- <el-form-item label="涓嬮亾宸ュ簭" class="dialogFormItem">
- <div class="dialogFormItemDiv">{{ dialogForm.nextstepname ? dialogForm.nextstepname : '/' }}</div>
- </el-form-item>
- <el-form-item label="浠诲姟鏁伴噺" class="dialogFormItem">
- <div class="dialogFormItemDiv">{{ dialogForm.planqty }}</div>
- </el-form-item>
-
- <el-form-item v-if="activeName==='涓嶈壇寰呭鐞�'" label="鍚堟牸鏁伴噺" class="dialogFormItem">
- <div class="dialogFormItemDiv">{{ dialogForm.noreportqty }}</div>
- </el-form-item>
- <el-form-item v-if="activeName==='涓嶈壇寰呭鐞�'" label="涓嶈壇鏁伴噺" class="dialogFormItem">
- <div class="dialogFormItemDiv">{{ dialogForm.noputqty }}</div>
- </el-form-item>
-
- <el-form-item
- v-if="activeName!=='涓嶈壇寰呭鐞�'"
- :label="activeName==='鐢熶骇鍒楄〃'? '鏈姤/宸叉姤':(activeName==='澶栧崗鍙戞枡'?'鏈彂/宸插彂':'鏈敹/宸叉敹')"
- class="dialogFormItem"
- >
- <div class="dialogFormItemDiv">{{ dialogForm.noreportqty + '/' + dialogForm.reportqty }}</div>
- </el-form-item>
-
- <el-form-item v-if="activeName==='鐢熶骇鍒楄〃'||activeName==='澶栧崗鏀舵枡'" label="涓嶈壇鏁伴噺" class="dialogFormItem">
- <div class="dialogFormItemDiv" style="color:red;">{{ dialogForm.noputqty }}</div>
- </el-form-item>
-
- <el-form-item v-if="activeName==='鐢熶骇鍒楄〃'" label="鎶ュ伐璁惧" class="dialogFormItem">
- <el-select
- v-model="dialogForm.eqpcode"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- clearable
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in eqpArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
-
- <el-form-item v-if="activeName==='鐢熶骇鍒楄〃'" label="璁′欢鏂瑰紡" class="dialogFormItem">
- <el-radio-group
- v-model="dialogForm.reckway"
- style="width: 200px;"
- @change="reckwayChange"
- >
- <el-radio label="person">涓汉</el-radio>
- <el-radio label="group">鐝粍</el-radio>
- </el-radio-group>
- </el-form-item>
-
- <el-form-item
- v-if="activeName==='鐢熶骇鍒楄〃'"
- :prop="dialogForm.reckway==='group'?'usergroupcode':''"
- label="鎶ュ伐鐝粍"
- class="dialogFormItem"
- >
- <el-select
- v-model="dialogForm.usergroupcode"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :disabled="dialogForm.reckway!=='group'"
- :popper-append-to-body="false"
- @change="usergroupChange"
- >
- <el-option
- v-for="item in usergroupArr"
- :key="item.usergroupcode"
- :label="item.usergroupname"
- :value="item.usergroupcode"
- />
- </el-select>
- </el-form-item>
- <el-form-item v-if="activeName==='鐢熶骇鍒楄〃'" prop="reportuser" label="鎶ュ伐浜哄憳" class="dialogFormItem">
- <el-select
- v-model="dialogForm.reportuser"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- multiple
- collapse-tags
- :multiple-limit="dialogForm.reckway==='group'?0:1"
- :disabled="dialogForm.reckway==='group'&&dialogForm.usergroupcode===''"
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in reportuserArr"
- :key="item.usercode"
- :label="item.username"
- :value="item.usercode"
- />
- </el-select>
- </el-form-item>
- <el-form-item v-if="activeName==='鐢熶骇鍒楄〃'" prop="startqty" label="鍚堟牸鏁伴噺" class="dialogFormItem">
- <el-input v-model="dialogForm.startqty" oninput="value=value.replace(/[^\d]/g,'')" style="width: 200px" />
- </el-form-item>
-
- <el-form-item v-if="activeName==='澶栧崗鍙戞枡'||activeName==='澶栧崗鏀舵枡'" prop="wxcode" label="澶栧崗渚涙柟" class="dialogFormItem">
- <el-select
- v-model="dialogForm.wxcode"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in wxArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item v-if="activeName==='澶栧崗鍙戞枡'" prop="outuser" label="鍙戞枡浜哄憳" class="dialogFormItem">
- <el-select
- v-model="dialogForm.outuser"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in reportuserArr"
- :key="item.usercode"
- :label="item.username"
- :value="item.usercode"
- />
- </el-select>
- </el-form-item>
- <el-form-item v-if="activeName==='澶栧崗鍙戞枡'" prop="fqty" label="鍙戞枡鏁伴噺" class="dialogFormItem">
- <el-input v-model="dialogForm.fqty" oninput="value=value.replace(/[^\d]/g,'')" style="width: 200px" />
- </el-form-item>
-
- <el-form-item v-if="activeName==='澶栧崗鏀舵枡'" prop="inuser" label="鏀舵枡浜哄憳" class="dialogFormItem">
- <el-select
- v-model="dialogForm.inuser"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :popper-append-to-body="false"
- >
- <el-option
- v-for="item in reportuserArr"
- :key="item.usercode"
- :label="item.username"
- :value="item.usercode"
- />
- </el-select>
- </el-form-item>
- <el-form-item v-if="activeName==='澶栧崗鏀舵枡'" prop="sqty" label="鏀舵枡鏁伴噺" class="dialogFormItem">
- <el-input v-model="dialogForm.sqty" oninput="value=value.replace(/[^\d]/g,'')" style="width: 200px" />
- </el-form-item>
-
- <el-divider v-if="activeName==='鐢熶骇鍒楄〃'||activeName==='澶栧崗鏀舵枡'" content-position="left">涓嶈壇鏄庣粏淇℃伅</el-divider>
- <el-button
- v-if="activeName==='鐢熶骇鍒楄〃'||activeName==='澶栧崗鏀舵枡'"
- v-waves
- type="primary"
- icon="el-icon-circle-plus-outline"
- @click="addDefect"
- >鏂板
- </el-button>
- <el-table
- v-if="activeName==='鐢熶骇鍒楄〃'||activeName==='澶栧崗鏀舵枡'"
- ref="defectTableDataRef"
- key="defectTableDataKey"
- :data="defectTableData"
- border
- row-class-name="custom-row"
- height="200"
- style="width: 100%;margin-top: 15px;"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- >
- <el-table-column
- type="index"
- label="搴忓彿"
- align="center"
- width="50"
- />
- <el-table-column
- prop="stepcode"
- label="缂洪櫡缂栫爜/鍚嶇О"
- align="center"
- min-width="450"
- >
- <template slot-scope="{row}">
- <el-select
- v-model="row.code"
- style="width: 100%"
- placeholder="璇烽�夋嫨"
- multiple
- filterable
- >
- <!-- collapse-tags-->
- <el-option
- v-for="item in defectArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </template>
- </el-table-column>
-
- <el-table-column
- prop="badqty"
- label="涓嶈壇鏁伴噺"
- align="center"
- >
- <template slot-scope="{row}">
- <el-input
- v-model="row.badqty"
- placeholder="璇疯緭鍏ユ暟閲�"
- oninput="value=value.replace(/[^0-9]/g,'')"
- style="width: 100%"
- @click.stop=""
- @change="badqtyChange"
- />
- </template>
- </el-table-column>
- <el-table-column
- label="鎿嶄綔"
- width="50"
- align="center"
- >
- <template slot-scope="{row}">
- <div class="operationClass">
- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
- <i
- class="el-icon-delete"
- :style="{color:$store.state.settings.theme}"
- style="margin-left: 7px;"
- @click="defectDel(row)"
- />
- </el-tooltip>
- </div>
- </template>
- </el-table-column>
- </el-table>
-
- <el-divider v-if="activeName==='澶栧崗鏀舵枡'" content-position="left">鍙敹鏂欎緵搴斿晢</el-divider>
- <div
- v-for="(item,index) in dialogForm.list"
- v-if="item.fqty>0"
- :key="item.name"
- style="display: flex;line-height: 26px;height: 26px;margin-left:30px;align-items: center"
- >
- <div
- style="color: #fff;width: 22px;height: 22px;display: flex;justify-content: center;align-items: center;border-radius: 50%"
- :style="{backgroundColor:$store.state.settings.theme}"
- >{{ index + 1 }}
- </div>
- <div style="margin-left:30px;width: 160px;" class="ellipsis">
- {{ item.tp }}
- </div>
- <div style="margin-left:30px;">
- 鍙敹鏁伴噺锛歿{ item.acceptQty }}
- </div>
- </div>
-
- <el-divider v-if="activeName==='涓嶈壇寰呭鐞�'" content-position="left">涓嶈壇淇℃伅鏄庣粏</el-divider>
- <el-table
- v-if="activeName==='涓嶈壇寰呭鐞�'"
- ref="badTableDataDataRef"
- key="badTableDataDataKey"
- :data="badTableData"
- border
- row-class-name="custom-row"
- height="300"
- style="width: 100%;margin-top: 15px;"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- >
- <el-table-column
- type="index"
- label="搴忓彿"
- align="center"
- width="50"
- />
- <!-- <el-table-column-->
- <!-- prop="step_code"-->
- <!-- label="宸ュ簭缂栫爜"-->
- <!-- show-tooltip-when-overflow-->
- <!-- align="center"-->
- <!-- />-->
- <el-table-column
- prop="stepname"
- label="宸ュ簭鍚嶇О"
- show-tooltip-when-overflow
- align="center"
- />
- <el-table-column
- prop="plan_qty"
- label="浠诲姟鏁伴噺"
- show-tooltip-when-overflow
- align="center"
- />
- <el-table-column
- prop="report_qty"
- label="鍚堟牸鏁伴噺"
- show-tooltip-when-overflow
- align="center"
- />
- <el-table-column
- prop="ng_qty"
- label="涓嶈壇鏁伴噺"
- show-tooltip-when-overflow
- align="center"
- />
- <el-table-column
- prop="defect_name"
- label="涓嶈壇鍘熷洜"
- show-tooltip-when-overflow
- align="center"
- />
- <el-table-column
- prop="repair_qty"
- label="缁翠慨鍚堟牸鏁伴噺"
- align="center"
- >
- <template slot-scope="{row}">
- <el-input
- v-model="row.repair_qty"
- placeholder="璇疯緭鍏ユ暟閲�"
- oninput="value=value.replace(/[^0-9]/g,'')"
- style="width: 100%"
- @click.stop=""
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="laborbad_qty"
- label="宸ュ簾鏁伴噺"
- align="center"
- >
- <template slot-scope="{row}">
- <el-input
- v-model="row.laborbad_qty"
- placeholder="璇疯緭鍏ユ暟閲�"
- oninput="value=value.replace(/[^0-9]/g,'')"
- style="width: 100%"
- @click.stop=""
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="materielbad_qty"
- label="鏂欏簾鏁伴噺"
- align="center"
- >
- <template slot-scope="{row}">
- <el-input
- v-model="row.materielbad_qty"
- placeholder="璇疯緭鍏ユ暟閲�"
- oninput="value=value.replace(/[^0-9]/g,'')"
- style="width: 100%"
- @click.stop=""
- />
- </template>
- </el-table-column>
-
- <!-- <el-table-column-->
- <!-- prop="badqty"-->
- <!-- label="涓嶈壇鏁伴噺"-->
- <!-- show-tooltip-when-overflow-->
- <!-- align="center"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <el-input-->
- <!-- v-model="row.badqty"-->
- <!-- placeholder="璇疯緭鍏ユ暟閲�"-->
- <!-- oninput="value=value.replace(/[^0-9]/g,'')"-->
- <!-- style="width: 100%"-->
- <!-- @click.stop=""-->
- <!-- @change="badqtyChange"-->
- <!-- />-->
- <!-- </template>-->
- <!-- </el-table-column>-->
-
- <!-- <el-table-column-->
- <!-- label="鎿嶄綔"-->
- <!-- width="50"-->
- <!-- align="center"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div class="operationClass">-->
- <!-- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">-->
- <!-- <i-->
- <!-- class="el-icon-delete"-->
- <!-- :style="{color:$store.state.settings.theme}"-->
- <!-- style="margin-left: 7px;"-->
- <!-- @click="defectDel(row)"-->
- <!-- />-->
- <!-- </el-tooltip>-->
- <!-- </div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
-
- </el-table>
- </el-form>
-
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <el-button
- v-waves
- type="primary"
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- @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>
-
- </div>
-</template>
-
-<script>
-import Pagination from '@/components/Pagination'
-import $ from 'jquery'
-import elDragDialog from '@/directive/el-drag-dialog'
-import waves from '@/directive/waves'
-import {
- EditOrderNgStepSeave,
- MesOrderNgStepSearch,
- MesOrderNgSubStepSearch,
- MesOrderStepSearch, MesOrderStepStart,
- MesOrderWxStepSearch, SavaMesOrderStepIn, SavaMesOrderStepOut, SavaMesOrderStepReport
-} from '@/api/WorkOrder'
-import {
- CustomerPermissions,
- DefectPermissions,
- EqpPermissions,
- GroupsPermissions,
- GroupsPersonPermissions,
- PersonPermissions, PrentOrganizationNoCompany
-} from '@/api/GeneralBasicData'
-import { nanoid } from 'nanoid'
-import { LabelBarCode } from '@/api/systemSetting'
-import { getCookie } from '@/utils/auth'
-import { handleDatetime2 } from '@/utils/global'
-import QRCode from 'qrcodejs2'
-export default {
- name: 'StepReport',
- components: {
- Pagination
- },
- directives: { elDragDialog, waves },
- data() {
- return {
- mainHeight: 0,
- tableHeight: 0,
- form: {
- wkshopcode: '',
- wocode: '', // 宸ュ崟鍙�
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
- prop: 'lm_date', // 鎺掑簭瀛楁
- order: 'desc', // 鎺掑簭瀛楁
- page: 1, // 绗嚑椤�
- rows: 20 // 姣忛〉澶氬皯鏉�
- },
- wkshopcodeArr: [],
- total: 10,
- tableData: [],
- activeName: '鐢熶骇鍒楄〃',
- elTabsArr: [
- { code: 'ZZ', name: '鐢熶骇鍒楄〃' },
- { code: 'OUT', name: '澶栧崗鍙戞枡' },
- { code: 'IN', name: '澶栧崗鏀舵枡' },
- { code: 'BAD', name: '涓嶈壇寰呭鐞�' }
- ],
-
- radioSelected: '', // 澶氶�夋閫変腑鍊�
-
- dialogVisible: false,
- dialogTitle: '', // 瀵硅瘽妗嗗皬鏍囬
-
- dialogForm: {
- 'wo_code': '',
- 'partnumber': '',
- 'partname': '',
- 'partspec': '',
- 'seq': '',
- 'stepcode': '',
- 'stepname': '',
- 'stepprice': '', // 宸ュ簭鍗曚环
- 'nextstepcode': '',
- 'nextstepname': '',
- 'nextstepprice': '',
- 'stepdesc': '',
- 'planqty': 0,
- 'startqty': 0, //
- 'noreportqty': 0, // 鏈姤鏁伴噺
- 'reportqty': 0, // 宸叉姤鏁伴噺
- 'noputqty': 0, // 涓嶈壇鏁伴噺
- 'wkshopcode': '',
- 'wkshopname': '',
- 'eqpcode': '',
- 'eqpname': '',
-
- remarks: '', // 澶囨敞
- inbarcode: '', // 鍏ュ簱鏉$爜
- defectlist: '', // 涓嶈壇姹囨��
- reckway: 'person', // 璁′欢鏂瑰紡(鐝粍:group銆佷釜浜�:person)
- usergroupcode: '', // 鐝粍缂栫爜
- reportuser: [], // 鎶ュ伐浜哄憳
-
- wxcode: '',
- outuser: '',
- fqty: '',
- inuser: '',
- sqty: '',
- list: ''
-
- },
- dialogFormRules: {
- eqpcode: [
- { required: true, message: '璇烽�夋嫨鎶ュ伐璁惧', trigger: ['blur', 'change'] }
- ],
- usergroupcode: [
- { required: true, message: '璇烽�夋嫨鎶ュ伐鐝粍', trigger: ['blur', 'change'] }
- ],
- reportuser: [
- { required: true, message: '璇烽�夋嫨鎶ュ伐浜哄憳', trigger: ['blur', 'change'] }
- ],
- startqty: [
- { required: true, message: '璇疯緭鍏ュ悎鏍兼暟閲�', trigger: ['blur', 'change'] }
- ],
- wxcode: [
- { required: true, message: '璇烽�夋嫨澶栧崗渚涙柟', trigger: ['blur', 'change'] }
- ],
- outuser: [
- { required: true, message: '璇烽�夋嫨鍙戞枡浜哄憳', trigger: ['blur', 'change'] }
- ],
- inuser: [
- { required: true, message: '璇烽�夋嫨鏀舵枡浜哄憳', trigger: ['blur', 'change'] }
- ],
- fqty: [
- { required: true, message: '璇疯緭鍏ュ彂鏂欐暟閲�', trigger: ['blur', 'change'] }
- ],
- sqty: [
- { required: true, message: '璇疯緭鍏ユ敹鏂欐暟閲�', trigger: ['blur', 'change'] }
- ]
-
- },
- reckwayArr: [// 鎶ュ伐绫诲瀷
- { code: 'group', name: '鐝粍' },
- { code: 'person', name: '涓汉' }
- ],
- reportuserArr: [], // 鎶ュ伐浜哄憳
- usergroupArr: [], // 鎶ュ伐鐝粍
- eqpArr: [], // 鎶ュ伐璁惧
- defectArr: [], // 涓嶈壇缂洪櫡
- wxArr: [], // 寰�鏉ュ崟浣嶄笅鎷�
-
- defectTableData: [],
- badTableData: [],
- workOrderCurrentValue: '',
-
- dialogVisible2: false, //
- qrForm: { // 鎵撳嵃鍐呭
- qrvalue: '',
- startqty: '',
- wo_code: '',
- partcode: '',
- partname: '',
- partspec: '',
- nextstepname: '',
- operator: '', // 鎿嶄綔浜�
- operatorTime: ''// 鎿嶄綔鏃堕棿
- },
- 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('鎵撳紑涔嬪墠')
- },
- openCallback(vue) {
- vue.printLoading = false
- console.log('鎵ц浜嗘墦鍗�')
- }
- },
- xx: ''
- }
- },
- activated() {
window.addEventListener('resize', this.getHeight)
this.getHeight()
},
created() {
-
- },
- mounted() {
- window.addEventListener('resize', this.getHeight)
- this.getHeight()
-
- this.tabClick()
-
- this.getAllSelectArr()
- },
- methods: {
-
- async getAllSelectArr() {
- const { data: res1 } = await GroupsPermissions()// 鐝粍
- this.usergroupArr = res1
-
- const { data: res2 } = await PersonPermissions() // 浜哄憳
- this.reportuserArr = res2
-
- const { data: res3 } = await DefectPermissions() // 缂洪櫡
- this.defectArr = res3
-
- const { data: res4 } = await EqpPermissions() // 璁惧
- this.eqpArr = res4
-
- const { data: res5 } = await CustomerPermissions() // 寰�鏉ュ崟浣�
- this.wxArr = res5
-
- const { data: res6 } = await PrentOrganizationNoCompany()// 鏃犲叕鍙哥殑缁勭粐涓嬫媺
- this.wkshopcodeArr = res6
- },
- tabClick() {
- let belong
- switch (this.activeName) {
- case '鐢熶骇鍒楄〃':
- belong = 'produceCodeZZ'
- this.dialogTitle = '鎶ュ伐'
- break
- case '澶栧崗鍙戞枡':
- belong = 'produceCodeOUT'
- this.dialogTitle = '鍙戞枡'
- break
- case '澶栧崗鏀舵枡':
- belong = 'produceCodeIN'
- this.dialogTitle = '鏀舵枡'
- break
- case '涓嶈壇寰呭鐞�':
- belong = 'produceCodeBAD'
- this.dialogTitle = '涓嶈壇澶勭悊'
- break
- }
- this.enterNative(this.form.wocode, belong)
-
- this.radioSelected = ''
- },
- enterNative(val, belong) {
- if (belong === 'produceCodeZZ') {
- this.$nextTick(() => {
- $('input[name=\'produceCodeZZ\']')[0].focus()
- })
- }
- if (belong === 'produceCodeOUT') {
- this.$nextTick(() => {
- $('input[name=\'produceCodeOUT\']')[0].focus()
- })
- }
- if (belong === 'produceCodeIN') {
- this.$nextTick(() => {
- $('input[name=\'produceCodeIN\']')[0].focus()
- })
- }
- if (belong === 'produceCodeBAD') {
- this.$nextTick(() => {
- $('input[name=\'produceCodeBAD\']')[0].focus()
- })
- }
- this.search()
- },
- // 鎺掑簭鏀瑰彉鏃�
- 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.search()
- },
- // 鏌ヨ
- async search() {
- this.form.wocode = this.workOrderCurrentValue
- this.workOrderCurrentValue = ''
- if (this.activeName === '鐢熶骇鍒楄〃') {
- const res = await MesOrderStepSearch(this.form)
- this.tableData = res.data
- this.total = res.count
- }
- if (this.activeName === '澶栧崗鍙戞枡' || this.activeName === '澶栧崗鏀舵枡') {
- const res = await MesOrderWxStepSearch(this.form)
- this.tableData = res.data
- this.total = res.count
- }
-
- if (this.activeName === '涓嶈壇寰呭鐞�') {
- const res = await MesOrderNgStepSearch(this.form)
- this.tableData = res.data
- this.total = res.count
- }
- },
- // 鎶ュ伐
- report(row) {
- if (row) {
- this.getMesOrderStepStart('ZZ', '', row.wo_code, row.stepcode)
- } else {
- const temp = this.tableData.find(i => i.id === this.radioSelected)
- this.getMesOrderStepStart('ZZ', '', temp.wo_code, temp.stepcode)
- }
- },
- // 鍙戞枡
- sendOut(row) {
- if (row) {
- this.getMesOrderStepStart('WX', 'OUT', row.wo_code, row.stepcode)
- } else {
- const temp = this.tableData.find(i => i.id === this.radioSelected)
- this.getMesOrderStepStart('WX', 'OUT', temp.wo_code, temp.stepcode)
- }
- },
- // 鏀舵枡
- takeIn(row) {
- if (row) {
- this.getMesOrderStepStart('WX', 'IN', row.wo_code, row.stepcode)
- } else {
- const temp = this.tableData.find(i => i.id === this.radioSelected)
- this.getMesOrderStepStart('WX', 'IN', temp.wo_code, temp.stepcode)
- }
- },
- // 涓嶈壇澶勭悊 鐢熶骇寮�鎶ュ伐鎵爜鑾峰彇宸ュ崟瀵瑰簲宸ュ簭浠诲姟(涓嶈壇鏄庣粏)
- async handleBad(row) {
- const data = {
- wocode: row ? row.wo_code : this.tableData.find(i => i.id === this.radioSelected).wo_code,
- stepcode: row ? row.stepcode : this.tableData.find(i => i.id === this.radioSelected).stepcode
- }
- let res = await MesOrderNgSubStepSearch(data)
- if (res.code === '200') {
- res = res.data
- this.dialogForm.wo_code = res.data1.wo_code
- this.dialogForm.partnumber = res.data1.partnumber
- this.dialogForm.partname = res.data1.partname
- this.dialogForm.partspec = res.data1.partspec
- this.dialogForm.seq = res.data1.seq
- this.dialogForm.stepcode = res.data1.stepcode
- this.dialogForm.stepname = res.data1.stepname
- this.dialogForm.stepprice = res.data1.stepprice
- this.dialogForm.nextstepcode = res.data1.nextstepcode
- this.dialogForm.nextstepname = res.data1.nextstepname
- this.dialogForm.nextstepprice = res.data1.nextstepprice
- this.dialogForm.stepdesc = res.data1.stepdesc
- this.dialogForm.planqty = res.data1.planqty
- this.dialogForm.startqty = res.data1.startqty
- this.dialogForm.noreportqty = res.data1.noreportqty // 鍚堟牸鏁伴噺
- this.dialogForm.reportqty = res.data1.reportqty
- this.dialogForm.noputqty = res.data1.noputqty // 涓嶈壇鏁伴噺
- this.dialogForm.wkshopcode = res.data1.wkshopcode
- this.dialogForm.wkshopname = res.data1.wkshopname
- this.dialogForm.eqpcode = res.data1.eqpcode
- this.dialogForm.eqpname = res.data1.eqpname
-
- res.data2.forEach(item => {
- item.repair_qty = 0
- item.laborbad_qty = 0
- item.materielbad_qty = 0
- })
-
- this.badTableData = res.data2
-
- this.dialogVisible = true
- }
- },
- // 鐢熶骇寮�鎶ュ伐锛氭姤宸�/澶栧崗(鍙戞枡/鏀舵枡)鏃舵潯浠跺垽鏂強鏁版嵁杩斿洖鎺ュ彛
- async getMesOrderStepStart(OperType, SelectType, wocode, stepcode) {
- const data = {
- OperType, SelectType, wocode, stepcode
- }
- let res = await MesOrderStepStart(data)
- if (res.code === '200') {
- res = res.data
- this.dialogForm.wo_code = res.wo_code
- this.dialogForm.partnumber = res.partnumber
- this.dialogForm.partname = res.partname
- this.dialogForm.partspec = res.partspec
- this.dialogForm.seq = res.seq
- this.dialogForm.stepcode = res.stepcode
- this.dialogForm.stepname = res.stepname
- this.dialogForm.stepprice = res.stepprice
- this.dialogForm.nextstepcode = res.nextstepcode
- this.dialogForm.nextstepname = res.nextstepname
- this.dialogForm.nextstepprice = res.nextstepprice
- this.dialogForm.stepdesc = res.stepdesc
- this.dialogForm.planqty = res.planqty
- this.dialogForm.startqty = res.startqty
- this.dialogForm.noreportqty = res.noreportqty// 鏈姤鏁伴噺
- this.dialogForm.reportqty = res.reportqty // 宸叉姤鏁伴噺
- this.dialogForm.noputqty = res.noputqty
- this.dialogForm.wkshopcode = res.wkshopcode
- this.dialogForm.wkshopname = res.wkshopname
- this.dialogForm.eqpcode = res.eqpcode
- this.dialogForm.eqpname = res.eqpname
-
- if (this.activeName === '澶栧崗鏀舵枡') {
- this.dialogForm.list = []
- res.list.forEach(i => {
- i.acceptQty = parseFloat(i.fqty) - parseFloat(i.sqty) - parseFloat(i.ng_qty) - parseFloat(i.laborbad_qty) - parseFloat(i.materielbad_qty)
- if (i.acceptQty > 0) {
- this.dialogForm.list.push(i)
- }
- })
- }
-
- // this.dialogForm.list = res.list
-
- this.dialogVisible = true
- }
- },
- // 瀵硅瘽妗嗗叧闂簨浠�
- handleClose() {
- this.dialogForm = {
- 'wo_code': '',
- 'partnumber': '',
- 'partname': '',
- 'partspec': '',
- 'seq': '',
- 'stepcode': '',
- 'stepname': '',
- 'stepprice': '', // 宸ュ簭鍗曚环
- 'nextstepcode': '',
- 'nextstepname': '',
- 'nextstepprice': '',
- 'stepdesc': '',
- 'planqty': 0,
- 'startqty': 0, //
- 'noreportqty': 0, // 鏈姤鏁伴噺
- 'reportqty': 0, // 宸叉姤鏁伴噺
- 'noputqty': 0, // 涓嶈壇鏁伴噺
- 'wkshopcode': '',
- 'wkshopname': '',
- 'eqpcode': '',
- 'eqpname': '',
-
- wxcode: '',
- outuser: '',
- fqty: '',
- inuser: '',
- sqty: '',
- list: '',
-
- remarks: '', // 澶囨敞
- inbarcode: '', // 鍏ュ簱鏉$爜
- defectlist: '', // 涓嶈壇姹囨��
- reckway: 'person', // 璁′欢鏂瑰紡(鐝粍:group銆佷釜浜�:person)
- usergroupcode: '', // 鐝粍缂栫爜
- reportuser: [] // 鎶ュ伐浜哄憳
-
- }
-
- this.defectTableData = []
- this.badTableData = []
-
- this.$refs.dialogForm.clearValidate()
- },
- // 瀵硅瘽妗嗗彇娑�
- dialogVisibleCancel() {
- this.dialogVisible = false
- this.tabClick()
- },
- // 瀵硅瘽妗嗙‘璁�
- dialogVisibleConfirm() {
- this.$refs.dialogForm.validate(async valid => {
- if (valid) {
- if (this.activeName === '鐢熶骇鍒楄〃') {
- if (this.defectTableData.find(i => i.code.length === 0)) {
- return this.$message.info('缂洪櫡缂栫爜/鍚嶇О涓嶈兘涓虹┖锛�')
- }
- if (this.defectTableData.find(i => i.badqty.toString().trim() === '' || parseFloat(i.badqty) === 0)) {
- return this.$message.info('涓嶈壇鏁伴噺涓嶈兘涓虹┖鎴栦负闆讹紒')
- }
-
- if (parseFloat(this.dialogForm.noreportqty) < parseFloat(this.dialogForm.startqty) + parseFloat(this.dialogForm.noputqty)) {
- return this.$message.info('鍚堟牸鏁伴噺鍔犱笉鑹暟閲忎笉鑳藉ぇ浜庝簡鏈姤鏁伴噺!')
- }
- let inbarcode = ''
- if (this.tableData.find(i => i.id === this.radioSelected).isend === 'Y') {
- const data1 = {
- rightcode: getCookie('ruleCode'),
- partcode: this.dialogForm.partnumber,
- qty: this.dialogForm.startqty,
- onelabqty: this.dialogForm.startqty
- }
-
- const res1 = await LabelBarCode(data1)
- inbarcode = res1.data[0].labcode
- }
-
- const defectlist = []
- this.defectTableData.forEach(i => {
- defectlist.push({
- defect_code: i.code.join(','),
- badqty: i.badqty
- })
- })
- const data = {
- mesordercode: this.dialogForm.wo_code,
- partcode: this.dialogForm.partnumber,
- stepseq: this.dialogForm.seq,
- stepcode: this.dialogForm.stepcode,
- stepprice: this.dialogForm.stepprice,
- eqpcode: this.dialogForm.eqpcode,
- inbarcode,
- reckway: this.dialogForm.reckway,
- usergroupcode: this.dialogForm.usergroupcode,
- reportuser: this.dialogForm.reportuser.join(','),
- taskqty: this.dialogForm.planqty,
- // startqty: this.dialogForm.startqty,
- // reportqty: this.dialogForm.reportqty,
-
- startqty: this.dialogForm.startqty,
- reportqty: this.dialogForm.startqty, // 鎶ュ伐鏁伴噺
-
- defectlist,
- remarks: ''
- }
- // console.log(JSON.parse(JSON.stringify(this.defectTableData)))
- // console.log(JSON.parse(JSON.stringify(data)))
-
- this.$store.state.app.buttonIsDisabled = true
- const res = await SavaMesOrderStepReport(data)
- if (res.code === '200') {
- this.$notify.success('鎶ュ伐鎴愬姛锛�')
- // await this.search()
- await this.tabClick()
- this.$store.state.app.buttonIsDisabled = false
- this.dialogVisible = false
-
- // 鑷埗鎶ュ伐鎵撳嵃鏍囩鍙e瓙宸插紑濂�
- // if (JSON.parse(localStorage.getItem('mesSetting')).every) {
- // this.dialogVisible2 = true
- // this.ZZprint2(localStorage.getItem('username'))
- // }
- } else {
- this.$store.state.app.buttonIsDisabled = false
- this.$notify.error('鎶ュ伐澶辫触锛�')
- }
- }
-
- if (this.activeName === '澶栧崗鍙戞枡') {
- if (parseFloat(this.dialogForm.fqty) < 1) {
- return this.$message.info('鍙戞枡鏁伴噺涓嶈兘涓洪浂锛�')
- }
- if (parseFloat(this.dialogForm.fqty) > parseFloat(this.dialogForm.noreportqty)) {
- return this.$message.info('鍙戞枡鏁伴噺涓嶈兘澶т簬鏈彂鏁伴噺!')
- }
- const data = {
- mesordercode: this.dialogForm.wo_code,
- partcode: this.dialogForm.partnumber,
- stepseq: this.dialogForm.seq,
- stepcode: this.dialogForm.stepcode,
-
- wxcode: this.dialogForm.wxcode,
- outuser: this.dialogForm.outuser,
- taskqty: this.dialogForm.planqty,
- fqty: this.dialogForm.fqty
- }
- // console.log(JSON.stringify(data))
-
- this.$store.state.app.buttonIsDisabled = true
- const res = await SavaMesOrderStepOut(data)
- if (res.code === '200') {
- this.$notify.success('鍙戞枡鎴愬姛锛�')
- // await this.search()
- await this.tabClick()
- this.$store.state.app.buttonIsDisabled = false
- this.dialogVisible = false
- } else {
- this.$store.state.app.buttonIsDisabled = false
- this.$notify.error('鍙戞枡澶辫触锛�')
- }
- }
-
- if (this.activeName === '澶栧崗鏀舵枡') {
- if (this.defectTableData.find(i => i.code.length === 0)) {
- return this.$message.info('缂洪櫡缂栫爜/鍚嶇О涓嶈兘涓虹┖锛�')
- }
- if (this.defectTableData.find(i => i.badqty.toString().trim() === '' || parseFloat(i.badqty) === 0)) {
- return this.$message.info('涓嶈壇鏁伴噺涓嶈兘涓虹┖鎴栦负闆讹紒')
- }
-
- if (parseFloat(this.dialogForm.noreportqty) < parseFloat(this.dialogForm.sqty) + parseFloat(this.dialogForm.noputqty)) {
- return this.$message.info('鏀舵枡鏁伴噺鍔犱笉鑹暟閲忎笉鑳藉ぇ浜庝簡鍙敹鏁伴噺!')
- }
-
- if (this.dialogForm.list.find(i => i.Name === this.dialogForm.wxcode)) {
- if (this.dialogForm.list.find(i => i.Name === this.dialogForm.wxcode).acceptQty < parseFloat(this.dialogForm.sqty) + parseFloat(this.dialogForm.noputqty)) {
- return this.$message.info('鏀舵枡鏁伴噺鍔犱笉鑹暟閲忎笉鑳藉ぇ浜庤渚涘簲鍟嗗彲鏀舵暟閲�!')
- }
- } else {
- return this.$message.info('姝や緵搴斿晢鏃犲彲鏀舵暟閲�!')
- }
-
- let inbarcode = ''
- if (this.tableData.find(i => i.id === this.radioSelected).isend === 'Y') {
- const data1 = {
- rightcode: getCookie('ruleCode'),
- partcode: this.dialogForm.partnumber,
- qty: this.dialogForm.startqty,
- onelabqty: this.dialogForm.startqty
- }
-
- const res1 = await LabelBarCode(data1)
- inbarcode = res1.data[0].labcode
- }
- const defectlist = []
- this.defectTableData.forEach(i => {
- defectlist.push({
- defect_code: i.code.join(','),
- badqty: i.badqty
- })
- })
-
- const data = {
- mesordercode: this.dialogForm.wo_code,
- partcode: this.dialogForm.partnumber,
- stepseq: this.dialogForm.seq,
- stepcode: this.dialogForm.stepcode,
-
- wxcode: this.dialogForm.wxcode,
- inbarcode,
- inuser: this.dialogForm.inuser,
- taskqty: this.dialogForm.planqty,
- sqty: this.dialogForm.sqty,
- defectlist,
- remarks: ''
- }
- // console.log(JSON.parse(JSON.stringify(data)), 1)
- this.$store.state.app.buttonIsDisabled = true
- const res = await SavaMesOrderStepIn(data)
- if (res.code === '200') {
- this.$notify.success('鏀舵枡鎴愬姛锛�')
- // await this.search()
- await this.tabClick()
- this.$store.state.app.buttonIsDisabled = false
- this.dialogVisible = false
- } else {
- this.$store.state.app.buttonIsDisabled = false
- this.$notify.error('鏀舵枡澶辫触锛�')
- }
- }
-
- if (this.activeName === '涓嶈壇寰呭鐞�') {
- let flag = false
- this.badTableData.forEach(i => {
- if (parseFloat(i.repair_qty) + parseFloat(i.laborbad_qty) + parseFloat(i.materielbad_qty) > parseFloat(i.ng_qty)) {
- flag = true
- }
- })
- if (flag) {
- return this.$message.info('缁翠慨鍚堟牸鏁伴噺+宸ュ簾鏁伴噺+鏂欏簾鏁伴噺涓嶈兘澶т簬涓嶈壇鏁伴噺锛�')
- }
- this.$store.state.app.buttonIsDisabled = true
- const res = await EditOrderNgStepSeave({ Data: this.badTableData })
- if (res.code === '200') {
- this.$notify.success('鎻愪氦鎴愬姛锛�')
- // await this.search()
- await this.tabClick()
- this.$store.state.app.buttonIsDisabled = false
- this.dialogVisible = false
- } else {
- this.$store.state.app.buttonIsDisabled = false
- this.$notify.error('鎻愪氦澶辫触锛�')
- }
- }
- }
- })
- },
-
- 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 = ''
- },
-
- 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.partnumber
- 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)
- })
- },
- // 鐢熸垚浜岀淮鐮�
- 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
- })
- },
- // 缂洪櫡鏂板
- addDefect() {
- if (this.defectTableData.find(i => i.code.length === 0)) {
- return this.$message.info('缂洪櫡缂栫爜/鍚嶇О涓嶈兘涓虹┖锛�')
- }
- if (this.defectTableData.find(i => i.badqty.toString().trim() === '' || parseFloat(i.badqty) === 0)) {
- return this.$message.info('涓嶈壇鏁伴噺涓嶈兘涓虹┖鎴栦负闆讹紒')
- }
-
- this.defectTableData.push({
- uuid: nanoid(), code: [], badqty: ''
- })
- },
- // 缂洪櫡鍒犻櫎
- defectDel(row) {
- this.defectTableData = this.defectTableData.filter(i => i.uuid !== row.uuid)
-
- this.dialogForm.noputqty = 0
- this.defectTableData.forEach(i => {
- this.dialogForm.noputqty += parseFloat(i.badqty)
- })
- },
- badqtyChange(val) {
- this.dialogForm.noputqty = 0
- this.defectTableData.forEach(i => {
- this.dialogForm.noputqty += parseFloat(i.badqty)
- })
- },
- reckwayChange(val) {
- // console.log(val)
- this.dialogForm.usergroupcode = ''
- this.dialogForm.reportuser = []
- },
- async usergroupChange(val) {
- const { data: res } = await GroupsPersonPermissions({ groupcode: val })
- this.dialogForm.reportuser = res[0].usercode_list ? res[0].usercode_list.split(',') : []
- },
- rowClick(row, event, column) {
- this.radioSelected = row.id
- },
- // 鑾峰彇椤甸潰楂樺害
- getHeight() {
- this.$nextTick(() => {
- this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 275
- // this.$refs.tableDataRef.doLayout()
- })
- },
- reset() {
- this.form.wkshopcode = ''
- this.form.wocode = ''
- this.form.workOrderCurrentValue = ''
- this.form.partcode = ''
- this.form.partname = ''
- this.form.partspec = ''
- this.search()
- },
-
- headerCellStyle() {
- return this.$headerCellStyle
- },
- cellStyle() {
- return this.$cellStyle
- }
- }
-}
-</script>
-<style lang="scss" scoped>
-
-::v-deep .elTableDiv .el-radio__label {
- display: none !important;
-}
-
-.dialogFormItem {
- margin: 0 10px 0 0;
-}
-
-.dialogFormItemDiv {
- width: 200px;
-}
-
-::v-deep .el-select__caret {
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-::v-deep .el-dialog .el-form-item__label {
- font-weight: lighter !important;
-}
-
-::v-deep .el-dialog .el-divider__text {
- font-weight: bolder !important;
-}
-
-</style>
+<template>
+ <div>
+ <div class="body" style="padding-top: 10px;" :style="{height:mainHeight+'px'}">
+
+ <div style="position: absolute;right:36px;z-index: 2;top: 13px">
+ <el-button
+ v-if="activeName==='鐢熶骇鍒楄〃'&&tableData.length>0"
+ v-waves
+ icon="el-icon-thumb"
+ type="primary"
+ :disabled="radioSelected===''"
+ @click="report()"
+ >鎶ュ伐
+ </el-button>
+ <el-button
+ v-if="activeName==='澶栧崗鍙戞枡'&&tableData.length>0"
+ v-waves
+ type="primary"
+ icon="el-icon-thumb"
+ :disabled="radioSelected===''"
+ @click="sendOut()"
+ >鍙戞枡
+ </el-button>
+ <el-button
+ v-if="activeName==='澶栧崗鏀舵枡'&&tableData.length>0"
+ v-waves
+ type="primary"
+ icon="el-icon-thumb"
+ :disabled="radioSelected===''"
+ @click="takeIn()"
+ >鏀舵枡
+ </el-button>
+ <el-button
+ v-if="activeName==='涓嶈壇寰呭鐞�'&&tableData.length>0"
+ v-waves
+ type="primary"
+ icon="el-icon-thumb"
+ :disabled="radioSelected===''"
+ @click="handleBad()"
+ >澶勭悊
+ </el-button>
+ </div>
+
+ <div v-if="form.wocode" style="position: absolute;left: 460px;z-index: 2;top: 23px;font-weight: bolder">
+ 褰撳墠宸ュ崟鍙蜂负锛歿{ form.wocode }}
+ </div>
+
+ <el-tabs
+ ref="elTabs"
+ v-model="activeName"
+ type="border-card"
+ @tab-click="tabClick"
+ >
+
+ <el-tab-pane
+ v-for="item in elTabsArr"
+ :key="item.code"
+ :label="item.name"
+ :name="item.name"
+ >
+
+ <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-input
+ v-model="workOrderCurrentValue"
+ :name="'produceCode'+item.code"
+ placeholder="璇锋壂鎻忔垨杈撳叆"
+ style="width: 300px"
+
+ @keyup.enter.native="val=>enterNative(val,'produceCode' + item.code)"
+ />
+ </el-form-item>
+ <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
+ <el-input
+ v-model="form.partcode"
+ placeholder="璇疯緭鍏�"
+ style="width: 200px"
+
+ @keyup.enter.native="val=>enterNative(val,'produceCode' + item.code)"
+ />
+ </el-form-item>
+ <el-form-item label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-input
+ v-model="form.partname"
+ placeholder="璇疯緭鍏�"
+
+ style="width: 200px"
+ @keyup.enter.native="val=>enterNative(val,'produceCode' + item.code)"
+ />
+ </el-form-item>
+ <el-form-item label="杞﹂棿鍚嶇О" style=" display: flex;">
+ <el-select
+ v-model="form.wkshopcode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in wkshopcodeArr"
+ :key="item.torg_code"
+ :label="item.torg_name"
+ :value="item.torg_code"
+ />
+ </el-select>
+ </el-form-item>
+
+ <!-- <el-form-item label="瑙勬牸鍨嬪彿" style=" display: flex;">-->
+ <!-- <el-input v-model="form.partspec" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </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"
+ style="height:5px"
+ >
+ <!-- <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"
+ :key="'tableDataRef'+item.code"
+ class="tableFixed"
+ :data="tableData"
+ :height="tableHeight+50"
+ border
+ row-class-name="custom-row"
+ :style="{width: 100+'%',height:tableHeight+'px'}"
+ highlight-current-row
+ :header-cell-style="headerCellStyle()"
+ :cell-style="cellStyle()"
+ @sort-change="sortChange"
+ @row-click="rowClick"
+ >
+ <el-table-column
+ width="50"
+ fixed
+ >
+ <template slot-scope="{row}">
+ <el-radio
+ v-model="radioSelected"
+ :label="row.id"
+ style="color: transparent;padding-left: 10px;"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="rowNum"
+ width="50"
+ label="搴忓彿"
+ fixed
+ />
+ <el-table-column
+ v-if="activeName!=='涓嶈壇寰呭鐞�'"
+ 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="宸ュ崟鍙�"
+ min-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"
+ min-width="110"
+ show-tooltip-when-overflow
+ label="浜у搧鍚嶇О"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partspec"
+ min-width="110"
+ show-tooltip-when-overflow
+ label="瑙勬牸鍨嬪彿"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.partspec ? row.partspec : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wkshp_name"
+ min-width="110"
+ 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="plan_qty"
+ label="浠诲姟鏁伴噺"
+ width="110"
+ sortable="custom"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ v-if="activeName==='澶栧崗鍙戞枡'||activeName==='澶栧崗鏀舵枡'"
+ prop="fqty"
+ show-tooltip-when-overflow
+ label="宸插彂鏂欐暟閲�"
+ sortable="custom"
+ width="120"
+ />
+ <el-table-column
+ prop="good_qty"
+ show-tooltip-when-overflow
+ :label="activeName==='澶栧崗鍙戞枡'||activeName==='澶栧崗鏀舵枡'?'宸叉敹鏂欐暟閲�':'鍚堟牸鏁伴噺'"
+ sortable="custom"
+ width="120"
+ />
+ <el-table-column
+ prop="ng_qty"
+ label="涓嶈壇鏁伴噺"
+ show-tooltip-when-overflow
+ width="120"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="laborbad_qty"
+ label="宸ュ簾鏁伴噺"
+ width="120"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+ <el-table-column
+ prop="materielbad_qty"
+ label="鏂欏簾鏁伴噺"
+ width="120"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+ <el-table-column
+ prop="priuserdefnvc1"
+ label="瀹㈡埛鍚嶇О"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc1 ? row.priuserdefnvc1 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc6"
+ label="瀹㈡埛缂栫爜"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc6 ? row.priuserdefnvc6 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc2"
+ label="瀵瑰唴鍚嶇О"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc2 ? row.priuserdefnvc2 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc3"
+ label="CTP鏃ユ湡"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc3 ? row.priuserdefnvc3 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc4"
+ label="閽㈠垁缂栧彿"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc4 ? row.priuserdefnvc4 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc5"
+ label="鐩掑瀷"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc5 ? row.priuserdefnvc5 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎿嶄綔"
+ width="120"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <div class="operationClass">
+ <el-button v-if="activeName==='鐢熶骇鍒楄〃'" v-waves icon="el-icon-thumb" type="text" @click="report(row)">
+ 鎶ュ伐
+ </el-button>
+ <el-button
+ v-if="activeName==='澶栧崗鍙戞枡'"
+ v-waves
+ icon="el-icon-thumb"
+ type="text"
+ @click="sendOut(row)"
+ >鍙戞枡
+ </el-button>
+ <el-button v-if="activeName==='澶栧崗鏀舵枡'" v-waves icon="el-icon-thumb" type="text" @click="takeIn(row)">
+ 鏀舵枡
+ </el-button>
+ <el-button
+ v-if="activeName==='涓嶈壇寰呭鐞�'"
+ v-waves
+ icon="el-icon-thumb"
+ type="text"
+ @click="handleBad(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="search"
+ />
+ </el-tab-pane>
+
+ </el-tabs>
+
+ </div>
+
+ <!-- 寮�鎶ュ伐銆佸鍗忋�佷笉鑹鐞�-->
+ <el-dialog
+ v-el-drag-dialog
+ :title="dialogTitle"
+ :visible.sync="dialogVisible"
+ width="1160px"
+ :close-on-click-modal="false"
+ :top="activeName==='鐢熶骇鍒楄〃'||activeName==='澶栧崗鏀舵枡'? '6vh':'15vh'"
+ @closed="handleClose"
+ @close="handleClose"
+ >
+ <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="110px">
+ <!-- <el-divider v-if="activeName==='鐢熶骇鍒楄〃'||activeName==='澶栧崗鏀舵枡'||activeName==='涓嶈壇寰呭鐞�'" content-position="left">鍩烘湰淇℃伅</el-divider>-->
+ <el-divider v-if="activeName==='鐢熶骇鍒楄〃'" content-position="left">鎶ュ伐淇℃伅</el-divider>
+ <el-divider v-if="activeName==='澶栧崗鏀舵枡'" content-position="left">鏀舵枡淇℃伅</el-divider>
+ <el-divider v-if="activeName==='涓嶈壇寰呭鐞�'" content-position="left">寰呭鐞嗕俊鎭�</el-divider>
+ <el-form-item label="宸ュ崟缂栧彿" class="dialogFormItem">
+ <div class="dialogFormItemDiv">{{ dialogForm.wo_code }}</div>
+ </el-form-item>
+ <el-form-item label="浜у搧缂栫爜" class="dialogFormItem">
+ <div class="dialogFormItemDiv">{{ dialogForm.partnumber }}</div>
+ </el-form-item>
+ <el-form-item label="浜у搧鍚嶇О" class="dialogFormItem">
+ <div class="dialogFormItemDiv">{{ dialogForm.partname }}</div>
+ </el-form-item>
+ <el-form-item label="瑙勬牸鍨嬪彿" class="dialogFormItem">
+ <div class="dialogFormItemDiv">{{ dialogForm.partspec ? dialogForm.partspec : '/' }}</div>
+ </el-form-item>
+ <el-form-item label="褰撳墠宸ュ簭" class="dialogFormItem">
+ <div class="dialogFormItemDiv">{{ dialogForm.stepname }}</div>
+ </el-form-item>
+ <el-form-item label="涓嬮亾宸ュ簭" class="dialogFormItem">
+ <div class="dialogFormItemDiv">{{ dialogForm.nextstepname ? dialogForm.nextstepname : '/' }}</div>
+ </el-form-item>
+ <el-form-item label="浠诲姟鏁伴噺" class="dialogFormItem">
+ <div class="dialogFormItemDiv">{{ dialogForm.planqty }}</div>
+ </el-form-item>
+
+ <el-form-item v-if="activeName==='涓嶈壇寰呭鐞�'" label="鍚堟牸鏁伴噺" class="dialogFormItem">
+ <div class="dialogFormItemDiv">{{ dialogForm.noreportqty }}</div>
+ </el-form-item>
+ <el-form-item v-if="activeName==='涓嶈壇寰呭鐞�'" label="涓嶈壇鏁伴噺" class="dialogFormItem">
+ <div class="dialogFormItemDiv">{{ dialogForm.noputqty }}</div>
+ </el-form-item>
+
+ <el-form-item
+ v-if="activeName!=='涓嶈壇寰呭鐞�'"
+ :label="activeName==='鐢熶骇鍒楄〃'? '鏈姤/宸叉姤':(activeName==='澶栧崗鍙戞枡'?'鏈彂/宸插彂':'鏈敹/宸叉敹')"
+ class="dialogFormItem"
+ >
+ <div class="dialogFormItemDiv">{{ dialogForm.noreportqty + '/' + dialogForm.reportqty }}</div>
+ </el-form-item>
+
+ <el-form-item v-if="activeName==='鐢熶骇鍒楄〃'||activeName==='澶栧崗鏀舵枡'" label="涓嶈壇鏁伴噺" class="dialogFormItem">
+ <div class="dialogFormItemDiv" style="color:red;">{{ dialogForm.noputqty }}</div>
+ </el-form-item>
+
+ <el-form-item v-if="activeName==='鐢熶骇鍒楄〃'" label="鎶ュ伐璁惧" class="dialogFormItem">
+ <el-select
+ v-model="dialogForm.eqpcode"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ clearable
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in eqpArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item v-if="activeName==='鐢熶骇鍒楄〃'" label="璁′欢鏂瑰紡" class="dialogFormItem">
+ <el-radio-group
+ v-model="dialogForm.reckway"
+ style="width: 200px;"
+ @change="reckwayChange"
+ >
+ <el-radio label="person">涓汉</el-radio>
+ <el-radio label="group">鐝粍</el-radio>
+ </el-radio-group>
+ </el-form-item>
+
+ <el-form-item
+ v-if="activeName==='鐢熶骇鍒楄〃'"
+ :prop="dialogForm.reckway==='group'?'usergroupcode':''"
+ label="鎶ュ伐鐝粍"
+ class="dialogFormItem"
+ >
+ <el-select
+ v-model="dialogForm.usergroupcode"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :disabled="dialogForm.reckway!=='group'"
+ :popper-append-to-body="false"
+ @change="usergroupChange"
+ >
+ <el-option
+ v-for="item in usergroupArr"
+ :key="item.usergroupcode"
+ :label="item.usergroupname"
+ :value="item.usergroupcode"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item v-if="activeName==='鐢熶骇鍒楄〃'" prop="reportuser" label="鎶ュ伐浜哄憳" class="dialogFormItem">
+ <el-select
+ v-model="dialogForm.reportuser"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ multiple
+ collapse-tags
+ :multiple-limit="dialogForm.reckway==='group'?0:1"
+ :disabled="dialogForm.reckway==='group'&&dialogForm.usergroupcode===''"
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in reportuserArr"
+ :key="item.usercode"
+ :label="item.username"
+ :value="item.usercode"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item v-if="activeName==='鐢熶骇鍒楄〃'" prop="startqty" label="鍚堟牸鏁伴噺" class="dialogFormItem">
+ <el-input v-model="dialogForm.startqty" oninput="value=value.replace(/[^\d]/g,'')" style="width: 200px" />
+ </el-form-item>
+
+ <el-form-item v-if="activeName==='澶栧崗鍙戞枡'||activeName==='澶栧崗鏀舵枡'" prop="wxcode" label="澶栧崗渚涙柟" class="dialogFormItem">
+ <el-select
+ v-model="dialogForm.wxcode"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in wxArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item v-if="activeName==='澶栧崗鍙戞枡'" prop="outuser" label="鍙戞枡浜哄憳" class="dialogFormItem">
+ <el-select
+ v-model="dialogForm.outuser"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in reportuserArr"
+ :key="item.usercode"
+ :label="item.username"
+ :value="item.usercode"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item v-if="activeName==='澶栧崗鍙戞枡'" prop="fqty" label="鍙戞枡鏁伴噺" class="dialogFormItem">
+ <el-input v-model="dialogForm.fqty" oninput="value=value.replace(/[^\d]/g,'')" style="width: 200px" />
+ </el-form-item>
+
+ <el-form-item v-if="activeName==='澶栧崗鏀舵枡'" prop="inuser" label="鏀舵枡浜哄憳" class="dialogFormItem">
+ <el-select
+ v-model="dialogForm.inuser"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in reportuserArr"
+ :key="item.usercode"
+ :label="item.username"
+ :value="item.usercode"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item v-if="activeName==='澶栧崗鏀舵枡'" prop="sqty" label="鏀舵枡鏁伴噺" class="dialogFormItem">
+ <el-input v-model="dialogForm.sqty" oninput="value=value.replace(/[^\d]/g,'')" style="width: 200px" />
+ </el-form-item>
+
+ <el-divider v-if="activeName==='鐢熶骇鍒楄〃'||activeName==='澶栧崗鏀舵枡'" content-position="left">涓嶈壇鏄庣粏淇℃伅</el-divider>
+ <el-button
+ v-if="activeName==='鐢熶骇鍒楄〃'||activeName==='澶栧崗鏀舵枡'"
+ v-waves
+ type="primary"
+ icon="el-icon-circle-plus-outline"
+ @click="addDefect"
+ >鏂板
+ </el-button>
+ <el-table
+ v-if="activeName==='鐢熶骇鍒楄〃'||activeName==='澶栧崗鏀舵枡'"
+ ref="defectTableDataRef"
+ key="defectTableDataKey"
+ :data="defectTableData"
+ border
+ row-class-name="custom-row"
+ height="200"
+ style="width: 100%;margin-top: 15px;"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ >
+ <el-table-column
+ type="index"
+ label="搴忓彿"
+ align="center"
+ width="50"
+ />
+ <el-table-column
+ prop="stepcode"
+ label="缂洪櫡缂栫爜/鍚嶇О"
+ align="center"
+ min-width="450"
+ >
+ <template slot-scope="{row}">
+ <el-select
+ v-model="row.code"
+ style="width: 100%"
+ placeholder="璇烽�夋嫨"
+ multiple
+ filterable
+ >
+ <!-- collapse-tags-->
+ <el-option
+ v-for="item in defectArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ prop="badqty"
+ label="涓嶈壇鏁伴噺"
+ align="center"
+ >
+ <template slot-scope="{row}">
+ <el-input
+ v-model="row.badqty"
+ placeholder="璇疯緭鍏ユ暟閲�"
+ oninput="value=value.replace(/[^0-9]/g,'')"
+ style="width: 100%"
+ @click.stop=""
+ @change="badqtyChange"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎿嶄綔"
+ width="50"
+ align="center"
+ >
+ <template slot-scope="{row}">
+ <div class="operationClass">
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
+ <i
+ class="el-icon-delete"
+ :style="{color:$store.state.settings.theme}"
+ style="margin-left: 7px;"
+ @click="defectDel(row)"
+ />
+ </el-tooltip>
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <el-divider v-if="activeName==='澶栧崗鏀舵枡'" content-position="left">鍙敹鏂欎緵搴斿晢</el-divider>
+ <div
+ v-for="(item,index) in dialogForm.list"
+ v-if="item.fqty>0"
+ :key="item.name"
+ style="display: flex;line-height: 26px;height: 26px;margin-left:30px;align-items: center"
+ >
+ <div
+ style="color: #fff;width: 22px;height: 22px;display: flex;justify-content: center;align-items: center;border-radius: 50%"
+ :style="{backgroundColor:$store.state.settings.theme}"
+ >{{ index + 1 }}
+ </div>
+ <div style="margin-left:30px;width: 160px;" class="ellipsis">
+ {{ item.tp }}
+ </div>
+ <div style="margin-left:30px;">
+ 鍙敹鏁伴噺锛歿{ item.acceptQty }}
+ </div>
+ </div>
+
+ <el-divider v-if="activeName==='涓嶈壇寰呭鐞�'" content-position="left">涓嶈壇淇℃伅鏄庣粏</el-divider>
+ <el-table
+ v-if="activeName==='涓嶈壇寰呭鐞�'"
+ ref="badTableDataDataRef"
+ key="badTableDataDataKey"
+ :data="badTableData"
+ border
+ row-class-name="custom-row"
+ height="300"
+ style="width: 100%;margin-top: 15px;"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ >
+ <el-table-column
+ type="index"
+ label="搴忓彿"
+ align="center"
+ width="50"
+ />
+ <!-- <el-table-column-->
+ <!-- prop="step_code"-->
+ <!-- label="宸ュ簭缂栫爜"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- align="center"-->
+ <!-- />-->
+ <el-table-column
+ prop="stepname"
+ label="宸ュ簭鍚嶇О"
+ show-tooltip-when-overflow
+ align="center"
+ />
+ <el-table-column
+ prop="plan_qty"
+ label="浠诲姟鏁伴噺"
+ show-tooltip-when-overflow
+ align="center"
+ />
+ <el-table-column
+ prop="report_qty"
+ label="鍚堟牸鏁伴噺"
+ show-tooltip-when-overflow
+ align="center"
+ />
+ <el-table-column
+ prop="ng_qty"
+ label="涓嶈壇鏁伴噺"
+ show-tooltip-when-overflow
+ align="center"
+ />
+ <el-table-column
+ prop="defect_name"
+ label="涓嶈壇鍘熷洜"
+ show-tooltip-when-overflow
+ align="center"
+ />
+ <el-table-column
+ prop="repair_qty"
+ label="缁翠慨鍚堟牸鏁伴噺"
+ align="center"
+ >
+ <template slot-scope="{row}">
+ <el-input
+ v-model="row.repair_qty"
+ placeholder="璇疯緭鍏ユ暟閲�"
+ oninput="value=value.replace(/[^0-9]/g,'')"
+ style="width: 100%"
+ @click.stop=""
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="laborbad_qty"
+ label="宸ュ簾鏁伴噺"
+ align="center"
+ >
+ <template slot-scope="{row}">
+ <el-input
+ v-model="row.laborbad_qty"
+ placeholder="璇疯緭鍏ユ暟閲�"
+ oninput="value=value.replace(/[^0-9]/g,'')"
+ style="width: 100%"
+ @click.stop=""
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="materielbad_qty"
+ label="鏂欏簾鏁伴噺"
+ align="center"
+ >
+ <template slot-scope="{row}">
+ <el-input
+ v-model="row.materielbad_qty"
+ placeholder="璇疯緭鍏ユ暟閲�"
+ oninput="value=value.replace(/[^0-9]/g,'')"
+ style="width: 100%"
+ @click.stop=""
+ />
+ </template>
+ </el-table-column>
+
+ <!-- <el-table-column-->
+ <!-- prop="badqty"-->
+ <!-- label="涓嶈壇鏁伴噺"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- align="center"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <el-input-->
+ <!-- v-model="row.badqty"-->
+ <!-- placeholder="璇疯緭鍏ユ暟閲�"-->
+ <!-- oninput="value=value.replace(/[^0-9]/g,'')"-->
+ <!-- style="width: 100%"-->
+ <!-- @click.stop=""-->
+ <!-- @change="badqtyChange"-->
+ <!-- />-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+
+ <!-- <el-table-column-->
+ <!-- label="鎿嶄綔"-->
+ <!-- width="50"-->
+ <!-- align="center"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div class="operationClass">-->
+ <!-- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">-->
+ <!-- <i-->
+ <!-- class="el-icon-delete"-->
+ <!-- :style="{color:$store.state.settings.theme}"-->
+ <!-- style="margin-left: 7px;"-->
+ <!-- @click="defectDel(row)"-->
+ <!-- />-->
+ <!-- </el-tooltip>-->
+ <!-- </div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+
+ </el-table>
+ </el-form>
+
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
+ <el-button
+ v-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @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>
+
+ </div>
+</template>
+
+<script>
+import Pagination from '@/components/Pagination'
+import $ from 'jquery'
+import elDragDialog from '@/directive/el-drag-dialog'
+import waves from '@/directive/waves'
+import {
+ EditOrderNgStepSeave,
+ MesOrderNgStepSearch,
+ MesOrderNgSubStepSearch,
+ MesOrderStepSearch, MesOrderStepStart,
+ MesOrderWxStepSearch, SavaMesOrderStepIn, SavaMesOrderStepOut, SavaMesOrderStepReport
+} from '@/api/WorkOrder'
+import {
+ CustomerPermissions,
+ DefectPermissions,
+ EqpPermissions,
+ GroupsPermissions,
+ GroupsPersonPermissions,
+ PersonPermissions, PrentOrganizationNoCompany
+} from '@/api/GeneralBasicData'
+import { nanoid } from 'nanoid'
+import { LabelBarCode } from '@/api/systemSetting'
+import { getCookie } from '@/utils/auth'
+import { handleDatetime2 } from '@/utils/global'
+import QRCode from 'qrcodejs2'
+export default {
+ name: 'StepReport',
+ components: {
+ Pagination
+ },
+ directives: { elDragDialog, waves },
+ data() {
+ return {
+ mainHeight: 0,
+ tableHeight: 0,
+ form: {
+ wkshopcode: '',
+ wocode: '', // 宸ュ崟鍙�
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+ prop: 'lm_date', // 鎺掑簭瀛楁
+ order: 'desc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ },
+ wkshopcodeArr: [],
+ total: 10,
+ tableData: [],
+ activeName: '鐢熶骇鍒楄〃',
+ elTabsArr: [
+ { code: 'ZZ', name: '鐢熶骇鍒楄〃' },
+ { code: 'OUT', name: '澶栧崗鍙戞枡' },
+ { code: 'IN', name: '澶栧崗鏀舵枡' },
+ { code: 'BAD', name: '涓嶈壇寰呭鐞�' }
+ ],
+
+ radioSelected: '', // 澶氶�夋閫変腑鍊�
+
+ dialogVisible: false,
+ dialogTitle: '', // 瀵硅瘽妗嗗皬鏍囬
+
+ dialogForm: {
+ 'wo_code': '',
+ 'partnumber': '',
+ 'partname': '',
+ 'partspec': '',
+ 'seq': '',
+ 'stepcode': '',
+ 'stepname': '',
+ 'stepprice': '', // 宸ュ簭鍗曚环
+ 'nextstepcode': '',
+ 'nextstepname': '',
+ 'nextstepprice': '',
+ 'stepdesc': '',
+ 'planqty': 0,
+ 'startqty': 0, //
+ 'noreportqty': 0, // 鏈姤鏁伴噺
+ 'reportqty': 0, // 宸叉姤鏁伴噺
+ 'noputqty': 0, // 涓嶈壇鏁伴噺
+ 'wkshopcode': '',
+ 'wkshopname': '',
+ 'eqpcode': '',
+ 'eqpname': '',
+
+ remarks: '', // 澶囨敞
+ inbarcode: '', // 鍏ュ簱鏉$爜
+ defectlist: '', // 涓嶈壇姹囨��
+ reckway: 'person', // 璁′欢鏂瑰紡(鐝粍:group銆佷釜浜�:person)
+ usergroupcode: '', // 鐝粍缂栫爜
+ reportuser: [], // 鎶ュ伐浜哄憳
+
+ wxcode: '',
+ outuser: '',
+ fqty: '',
+ inuser: '',
+ sqty: '',
+ list: ''
+
+ },
+ dialogFormRules: {
+ eqpcode: [
+ { required: true, message: '璇烽�夋嫨鎶ュ伐璁惧', trigger: ['blur', 'change'] }
+ ],
+ usergroupcode: [
+ { required: true, message: '璇烽�夋嫨鎶ュ伐鐝粍', trigger: ['blur', 'change'] }
+ ],
+ reportuser: [
+ { required: true, message: '璇烽�夋嫨鎶ュ伐浜哄憳', trigger: ['blur', 'change'] }
+ ],
+ startqty: [
+ { required: true, message: '璇疯緭鍏ュ悎鏍兼暟閲�', trigger: ['blur', 'change'] }
+ ],
+ wxcode: [
+ { required: true, message: '璇烽�夋嫨澶栧崗渚涙柟', trigger: ['blur', 'change'] }
+ ],
+ outuser: [
+ { required: true, message: '璇烽�夋嫨鍙戞枡浜哄憳', trigger: ['blur', 'change'] }
+ ],
+ inuser: [
+ { required: true, message: '璇烽�夋嫨鏀舵枡浜哄憳', trigger: ['blur', 'change'] }
+ ],
+ fqty: [
+ { required: true, message: '璇疯緭鍏ュ彂鏂欐暟閲�', trigger: ['blur', 'change'] }
+ ],
+ sqty: [
+ { required: true, message: '璇疯緭鍏ユ敹鏂欐暟閲�', trigger: ['blur', 'change'] }
+ ]
+
+ },
+ reckwayArr: [// 鎶ュ伐绫诲瀷
+ { code: 'group', name: '鐝粍' },
+ { code: 'person', name: '涓汉' }
+ ],
+ reportuserArr: [], // 鎶ュ伐浜哄憳
+ usergroupArr: [], // 鎶ュ伐鐝粍
+ eqpArr: [], // 鎶ュ伐璁惧
+ defectArr: [], // 涓嶈壇缂洪櫡
+ wxArr: [], // 寰�鏉ュ崟浣嶄笅鎷�
+
+ defectTableData: [],
+ badTableData: [],
+ workOrderCurrentValue: '',
+
+ dialogVisible2: false, //
+ qrForm: { // 鎵撳嵃鍐呭
+ qrvalue: '',
+ startqty: '',
+ wo_code: '',
+ partcode: '',
+ partname: '',
+ partspec: '',
+ nextstepname: '',
+ operator: '', // 鎿嶄綔浜�
+ operatorTime: ''// 鎿嶄綔鏃堕棿
+ },
+ 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('鎵撳紑涔嬪墠')
+ },
+ openCallback(vue) {
+ vue.printLoading = false
+ console.log('鎵ц浜嗘墦鍗�')
+ }
+ },
+ xx: ''
+ }
+ },
+ activated() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+ },
+ created() {
+
+ },
+ mounted() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+
+ this.tabClick()
+
+ this.getAllSelectArr()
+ },
+ methods: {
+
+ async getAllSelectArr() {
+ const { data: res1 } = await GroupsPermissions()// 鐝粍
+ this.usergroupArr = res1
+
+ const { data: res2 } = await PersonPermissions() // 浜哄憳
+ this.reportuserArr = res2
+
+ const { data: res3 } = await DefectPermissions() // 缂洪櫡
+ this.defectArr = res3
+
+ const { data: res4 } = await EqpPermissions() // 璁惧
+ this.eqpArr = res4
+
+ const { data: res5 } = await CustomerPermissions() // 寰�鏉ュ崟浣�
+ this.wxArr = res5
+
+ const { data: res6 } = await PrentOrganizationNoCompany()// 鏃犲叕鍙哥殑缁勭粐涓嬫媺
+ this.wkshopcodeArr = res6
+ },
+ tabClick() {
+ let belong
+ switch (this.activeName) {
+ case '鐢熶骇鍒楄〃':
+ belong = 'produceCodeZZ'
+ this.dialogTitle = '鎶ュ伐'
+ break
+ case '澶栧崗鍙戞枡':
+ belong = 'produceCodeOUT'
+ this.dialogTitle = '鍙戞枡'
+ break
+ case '澶栧崗鏀舵枡':
+ belong = 'produceCodeIN'
+ this.dialogTitle = '鏀舵枡'
+ break
+ case '涓嶈壇寰呭鐞�':
+ belong = 'produceCodeBAD'
+ this.dialogTitle = '涓嶈壇澶勭悊'
+ break
+ }
+ this.enterNative(this.form.wocode, belong)
+
+ this.radioSelected = ''
+ },
+ enterNative(val, belong) {
+ if (belong === 'produceCodeZZ') {
+ this.$nextTick(() => {
+ $('input[name=\'produceCodeZZ\']')[0].focus()
+ })
+ }
+ if (belong === 'produceCodeOUT') {
+ this.$nextTick(() => {
+ $('input[name=\'produceCodeOUT\']')[0].focus()
+ })
+ }
+ if (belong === 'produceCodeIN') {
+ this.$nextTick(() => {
+ $('input[name=\'produceCodeIN\']')[0].focus()
+ })
+ }
+ if (belong === 'produceCodeBAD') {
+ this.$nextTick(() => {
+ $('input[name=\'produceCodeBAD\']')[0].focus()
+ })
+ }
+ this.search()
+ },
+ // 鎺掑簭鏀瑰彉鏃�
+ 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.search()
+ },
+ // 鏌ヨ
+ async search() {
+ this.form.wocode = this.workOrderCurrentValue
+ this.workOrderCurrentValue = ''
+ if (this.activeName === '鐢熶骇鍒楄〃') {
+ const res = await MesOrderStepSearch(this.form)
+ this.tableData = res.data
+ this.total = res.count
+ }
+ if (this.activeName === '澶栧崗鍙戞枡' || this.activeName === '澶栧崗鏀舵枡') {
+ const res = await MesOrderWxStepSearch(this.form)
+ this.tableData = res.data
+ this.total = res.count
+ }
+
+ if (this.activeName === '涓嶈壇寰呭鐞�') {
+ const res = await MesOrderNgStepSearch(this.form)
+ this.tableData = res.data
+ this.total = res.count
+ }
+ },
+ // 鎶ュ伐
+ report(row) {
+ if (row) {
+ this.getMesOrderStepStart('ZZ', '', row.wo_code, row.stepcode)
+ } else {
+ const temp = this.tableData.find(i => i.id === this.radioSelected)
+ this.getMesOrderStepStart('ZZ', '', temp.wo_code, temp.stepcode)
+ }
+ },
+ // 鍙戞枡
+ sendOut(row) {
+ if (row) {
+ this.getMesOrderStepStart('WX', 'OUT', row.wo_code, row.stepcode)
+ } else {
+ const temp = this.tableData.find(i => i.id === this.radioSelected)
+ this.getMesOrderStepStart('WX', 'OUT', temp.wo_code, temp.stepcode)
+ }
+ },
+ // 鏀舵枡
+ takeIn(row) {
+ if (row) {
+ this.getMesOrderStepStart('WX', 'IN', row.wo_code, row.stepcode)
+ } else {
+ const temp = this.tableData.find(i => i.id === this.radioSelected)
+ this.getMesOrderStepStart('WX', 'IN', temp.wo_code, temp.stepcode)
+ }
+ },
+ // 涓嶈壇澶勭悊 鐢熶骇寮�鎶ュ伐鎵爜鑾峰彇宸ュ崟瀵瑰簲宸ュ簭浠诲姟(涓嶈壇鏄庣粏)
+ async handleBad(row) {
+ const data = {
+ wocode: row ? row.wo_code : this.tableData.find(i => i.id === this.radioSelected).wo_code,
+ stepcode: row ? row.stepcode : this.tableData.find(i => i.id === this.radioSelected).stepcode
+ }
+ let res = await MesOrderNgSubStepSearch(data)
+ if (res.code === '200') {
+ res = res.data
+ this.dialogForm.wo_code = res.data1.wo_code
+ this.dialogForm.partnumber = res.data1.partnumber
+ this.dialogForm.partname = res.data1.partname
+ this.dialogForm.partspec = res.data1.partspec
+ this.dialogForm.seq = res.data1.seq
+ this.dialogForm.stepcode = res.data1.stepcode
+ this.dialogForm.stepname = res.data1.stepname
+ this.dialogForm.stepprice = res.data1.stepprice
+ this.dialogForm.nextstepcode = res.data1.nextstepcode
+ this.dialogForm.nextstepname = res.data1.nextstepname
+ this.dialogForm.nextstepprice = res.data1.nextstepprice
+ this.dialogForm.stepdesc = res.data1.stepdesc
+ this.dialogForm.planqty = res.data1.planqty
+ this.dialogForm.startqty = res.data1.startqty
+ this.dialogForm.noreportqty = res.data1.noreportqty // 鍚堟牸鏁伴噺
+ this.dialogForm.reportqty = res.data1.reportqty
+ this.dialogForm.noputqty = res.data1.noputqty // 涓嶈壇鏁伴噺
+ this.dialogForm.wkshopcode = res.data1.wkshopcode
+ this.dialogForm.wkshopname = res.data1.wkshopname
+ this.dialogForm.eqpcode = res.data1.eqpcode
+ this.dialogForm.eqpname = res.data1.eqpname
+
+ res.data2.forEach(item => {
+ item.repair_qty = 0
+ item.laborbad_qty = 0
+ item.materielbad_qty = 0
+ })
+
+ this.badTableData = res.data2
+
+ this.dialogVisible = true
+ }
+ },
+ // 鐢熶骇寮�鎶ュ伐锛氭姤宸�/澶栧崗(鍙戞枡/鏀舵枡)鏃舵潯浠跺垽鏂強鏁版嵁杩斿洖鎺ュ彛
+ async getMesOrderStepStart(OperType, SelectType, wocode, stepcode) {
+ const data = {
+ OperType, SelectType, wocode, stepcode
+ }
+ let res = await MesOrderStepStart(data)
+ if (res.code === '200') {
+ res = res.data
+ this.dialogForm.wo_code = res.wo_code
+ this.dialogForm.partnumber = res.partnumber
+ this.dialogForm.partname = res.partname
+ this.dialogForm.partspec = res.partspec
+ this.dialogForm.seq = res.seq
+ this.dialogForm.stepcode = res.stepcode
+ this.dialogForm.stepname = res.stepname
+ this.dialogForm.stepprice = res.stepprice
+ this.dialogForm.nextstepcode = res.nextstepcode
+ this.dialogForm.nextstepname = res.nextstepname
+ this.dialogForm.nextstepprice = res.nextstepprice
+ this.dialogForm.stepdesc = res.stepdesc
+ this.dialogForm.planqty = res.planqty
+ this.dialogForm.startqty = res.startqty
+ this.dialogForm.noreportqty = res.noreportqty// 鏈姤鏁伴噺
+ this.dialogForm.reportqty = res.reportqty // 宸叉姤鏁伴噺
+ this.dialogForm.noputqty = res.noputqty
+ this.dialogForm.wkshopcode = res.wkshopcode
+ this.dialogForm.wkshopname = res.wkshopname
+ this.dialogForm.eqpcode = res.eqpcode
+ this.dialogForm.eqpname = res.eqpname
+
+ if (this.activeName === '澶栧崗鏀舵枡') {
+ this.dialogForm.list = []
+ res.list.forEach(i => {
+ i.acceptQty = parseFloat(i.fqty) - parseFloat(i.sqty) - parseFloat(i.ng_qty) - parseFloat(i.laborbad_qty) - parseFloat(i.materielbad_qty)
+ if (i.acceptQty > 0) {
+ this.dialogForm.list.push(i)
+ }
+ })
+ }
+
+ // this.dialogForm.list = res.list
+
+ this.dialogVisible = true
+ }
+ },
+ // 瀵硅瘽妗嗗叧闂簨浠�
+ handleClose() {
+ this.dialogForm = {
+ 'wo_code': '',
+ 'partnumber': '',
+ 'partname': '',
+ 'partspec': '',
+ 'seq': '',
+ 'stepcode': '',
+ 'stepname': '',
+ 'stepprice': '', // 宸ュ簭鍗曚环
+ 'nextstepcode': '',
+ 'nextstepname': '',
+ 'nextstepprice': '',
+ 'stepdesc': '',
+ 'planqty': 0,
+ 'startqty': 0, //
+ 'noreportqty': 0, // 鏈姤鏁伴噺
+ 'reportqty': 0, // 宸叉姤鏁伴噺
+ 'noputqty': 0, // 涓嶈壇鏁伴噺
+ 'wkshopcode': '',
+ 'wkshopname': '',
+ 'eqpcode': '',
+ 'eqpname': '',
+
+ wxcode: '',
+ outuser: '',
+ fqty: '',
+ inuser: '',
+ sqty: '',
+ list: '',
+
+ remarks: '', // 澶囨敞
+ inbarcode: '', // 鍏ュ簱鏉$爜
+ defectlist: '', // 涓嶈壇姹囨��
+ reckway: 'person', // 璁′欢鏂瑰紡(鐝粍:group銆佷釜浜�:person)
+ usergroupcode: '', // 鐝粍缂栫爜
+ reportuser: [] // 鎶ュ伐浜哄憳
+
+ }
+
+ this.defectTableData = []
+ this.badTableData = []
+
+ this.$refs.dialogForm.clearValidate()
+ },
+ // 瀵硅瘽妗嗗彇娑�
+ dialogVisibleCancel() {
+ this.dialogVisible = false
+ this.tabClick()
+ },
+ // 瀵硅瘽妗嗙‘璁�
+ dialogVisibleConfirm() {
+ this.$refs.dialogForm.validate(async valid => {
+ if (valid) {
+ if (this.activeName === '鐢熶骇鍒楄〃') {
+ if (this.defectTableData.find(i => i.code.length === 0)) {
+ return this.$message.info('缂洪櫡缂栫爜/鍚嶇О涓嶈兘涓虹┖锛�')
+ }
+ if (this.defectTableData.find(i => i.badqty.toString().trim() === '' || parseFloat(i.badqty) === 0)) {
+ return this.$message.info('涓嶈壇鏁伴噺涓嶈兘涓虹┖鎴栦负闆讹紒')
+ }
+
+ if (parseFloat(this.dialogForm.noreportqty) < parseFloat(this.dialogForm.startqty) + parseFloat(this.dialogForm.noputqty)) {
+ return this.$message.info('鍚堟牸鏁伴噺鍔犱笉鑹暟閲忎笉鑳藉ぇ浜庝簡鏈姤鏁伴噺!')
+ }
+ let inbarcode = ''
+ if (this.tableData.find(i => i.id === this.radioSelected).isend === 'Y') {
+ const data1 = {
+ rightcode: getCookie('ruleCode'),
+ partcode: this.dialogForm.partnumber,
+ qty: this.dialogForm.startqty,
+ onelabqty: this.dialogForm.startqty
+ }
+
+ const res1 = await LabelBarCode(data1)
+ inbarcode = res1.data[0].labcode
+ }
+
+ const defectlist = []
+ this.defectTableData.forEach(i => {
+ defectlist.push({
+ defect_code: i.code.join(','),
+ badqty: i.badqty
+ })
+ })
+
+ const data = {
+ mesordercode: this.dialogForm.wo_code,
+ partcode: this.dialogForm.partnumber,
+ stepseq: this.dialogForm.seq,
+ stepcode: this.dialogForm.stepcode,
+ stepprice: this.dialogForm.stepprice,
+ eqpcode: this.dialogForm.eqpcode,
+ inbarcode,
+ reckway: this.dialogForm.reckway,
+ usergroupcode: this.dialogForm.usergroupcode,
+ reportuser: this.dialogForm.reportuser.join(','),
+ taskqty: this.dialogForm.planqty,
+
+ payrate: this.dialogForm.reckway === 'person' ? this.reportuserArr.find(i => i.usercode === this.dialogForm.reportuser[0]).payrate : '',
+ // startqty: this.dialogForm.startqty,
+ // reportqty: this.dialogForm.reportqty,
+
+ startqty: this.dialogForm.startqty,
+ reportqty: this.dialogForm.startqty, // 鎶ュ伐鏁伴噺
+
+ defectlist,
+ remarks: ''
+ }
+ // console.log(JSON.parse(JSON.stringify(this.defectTableData)))
+ // console.log(JSON.parse(JSON.stringify(data)))
+
+ this.$store.state.app.buttonIsDisabled = true
+ const res = await SavaMesOrderStepReport(data)
+ if (res.code === '200') {
+ this.$notify.success('鎶ュ伐鎴愬姛锛�')
+ // await this.search()
+ await this.tabClick()
+ this.$store.state.app.buttonIsDisabled = false
+ this.dialogVisible = false
+
+ // 鑷埗鎶ュ伐鎵撳嵃鏍囩鍙e瓙宸插紑濂�
+ // if (JSON.parse(localStorage.getItem('mesSetting')).every) {
+ // this.dialogVisible2 = true
+ // this.ZZprint2(localStorage.getItem('username'))
+ // }
+ } else {
+ this.$store.state.app.buttonIsDisabled = false
+ this.$notify.error('鎶ュ伐澶辫触锛�')
+ }
+ }
+
+ if (this.activeName === '澶栧崗鍙戞枡') {
+ if (parseFloat(this.dialogForm.fqty) < 1) {
+ return this.$message.info('鍙戞枡鏁伴噺涓嶈兘涓洪浂锛�')
+ }
+ if (parseFloat(this.dialogForm.fqty) > parseFloat(this.dialogForm.noreportqty)) {
+ return this.$message.info('鍙戞枡鏁伴噺涓嶈兘澶т簬鏈彂鏁伴噺!')
+ }
+ const data = {
+ mesordercode: this.dialogForm.wo_code,
+ partcode: this.dialogForm.partnumber,
+ stepseq: this.dialogForm.seq,
+ stepcode: this.dialogForm.stepcode,
+
+ wxcode: this.dialogForm.wxcode,
+ outuser: this.dialogForm.outuser,
+ taskqty: this.dialogForm.planqty,
+ fqty: this.dialogForm.fqty
+ }
+ // console.log(JSON.stringify(data))
+
+ this.$store.state.app.buttonIsDisabled = true
+ const res = await SavaMesOrderStepOut(data)
+ if (res.code === '200') {
+ this.$notify.success('鍙戞枡鎴愬姛锛�')
+ // await this.search()
+ await this.tabClick()
+ this.$store.state.app.buttonIsDisabled = false
+ this.dialogVisible = false
+ } else {
+ this.$store.state.app.buttonIsDisabled = false
+ this.$notify.error('鍙戞枡澶辫触锛�')
+ }
+ }
+
+ if (this.activeName === '澶栧崗鏀舵枡') {
+ if (this.defectTableData.find(i => i.code.length === 0)) {
+ return this.$message.info('缂洪櫡缂栫爜/鍚嶇О涓嶈兘涓虹┖锛�')
+ }
+ if (this.defectTableData.find(i => i.badqty.toString().trim() === '' || parseFloat(i.badqty) === 0)) {
+ return this.$message.info('涓嶈壇鏁伴噺涓嶈兘涓虹┖鎴栦负闆讹紒')
+ }
+
+ if (parseFloat(this.dialogForm.noreportqty) < parseFloat(this.dialogForm.sqty) + parseFloat(this.dialogForm.noputqty)) {
+ return this.$message.info('鏀舵枡鏁伴噺鍔犱笉鑹暟閲忎笉鑳藉ぇ浜庝簡鍙敹鏁伴噺!')
+ }
+
+ if (this.dialogForm.list.find(i => i.Name === this.dialogForm.wxcode)) {
+ if (this.dialogForm.list.find(i => i.Name === this.dialogForm.wxcode).acceptQty < parseFloat(this.dialogForm.sqty) + parseFloat(this.dialogForm.noputqty)) {
+ return this.$message.info('鏀舵枡鏁伴噺鍔犱笉鑹暟閲忎笉鑳藉ぇ浜庤渚涘簲鍟嗗彲鏀舵暟閲�!')
+ }
+ } else {
+ return this.$message.info('姝や緵搴斿晢鏃犲彲鏀舵暟閲�!')
+ }
+
+ let inbarcode = ''
+ if (this.tableData.find(i => i.id === this.radioSelected).isend === 'Y') {
+ const data1 = {
+ rightcode: getCookie('ruleCode'),
+ partcode: this.dialogForm.partnumber,
+ qty: this.dialogForm.startqty,
+ onelabqty: this.dialogForm.startqty
+ }
+
+ const res1 = await LabelBarCode(data1)
+ inbarcode = res1.data[0].labcode
+ }
+ const defectlist = []
+ this.defectTableData.forEach(i => {
+ defectlist.push({
+ defect_code: i.code.join(','),
+ badqty: i.badqty
+ })
+ })
+
+ const data = {
+ mesordercode: this.dialogForm.wo_code,
+ partcode: this.dialogForm.partnumber,
+ stepseq: this.dialogForm.seq,
+ stepcode: this.dialogForm.stepcode,
+
+ wxcode: this.dialogForm.wxcode,
+ inbarcode,
+ inuser: this.dialogForm.inuser,
+ taskqty: this.dialogForm.planqty,
+ sqty: this.dialogForm.sqty,
+ defectlist,
+ remarks: ''
+ }
+ // console.log(JSON.parse(JSON.stringify(data)), 1)
+ this.$store.state.app.buttonIsDisabled = true
+ const res = await SavaMesOrderStepIn(data)
+ if (res.code === '200') {
+ this.$notify.success('鏀舵枡鎴愬姛锛�')
+ // await this.search()
+ await this.tabClick()
+ this.$store.state.app.buttonIsDisabled = false
+ this.dialogVisible = false
+ } else {
+ this.$store.state.app.buttonIsDisabled = false
+ this.$notify.error('鏀舵枡澶辫触锛�')
+ }
+ }
+
+ if (this.activeName === '涓嶈壇寰呭鐞�') {
+ let flag = false
+ this.badTableData.forEach(i => {
+ if (parseFloat(i.repair_qty) + parseFloat(i.laborbad_qty) + parseFloat(i.materielbad_qty) > parseFloat(i.ng_qty)) {
+ flag = true
+ }
+ })
+ if (flag) {
+ return this.$message.info('缁翠慨鍚堟牸鏁伴噺+宸ュ簾鏁伴噺+鏂欏簾鏁伴噺涓嶈兘澶т簬涓嶈壇鏁伴噺锛�')
+ }
+ this.$store.state.app.buttonIsDisabled = true
+ const res = await EditOrderNgStepSeave({ Data: this.badTableData })
+ if (res.code === '200') {
+ this.$notify.success('鎻愪氦鎴愬姛锛�')
+ // await this.search()
+ await this.tabClick()
+ this.$store.state.app.buttonIsDisabled = false
+ this.dialogVisible = false
+ } else {
+ this.$store.state.app.buttonIsDisabled = false
+ this.$notify.error('鎻愪氦澶辫触锛�')
+ }
+ }
+ }
+ })
+ },
+
+ 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 = ''
+ },
+
+ 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.partnumber
+ 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)
+ })
+ },
+ // 鐢熸垚浜岀淮鐮�
+ 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
+ })
+ },
+ // 缂洪櫡鏂板
+ addDefect() {
+ if (this.defectTableData.find(i => i.code.length === 0)) {
+ return this.$message.info('缂洪櫡缂栫爜/鍚嶇О涓嶈兘涓虹┖锛�')
+ }
+ if (this.defectTableData.find(i => i.badqty.toString().trim() === '' || parseFloat(i.badqty) === 0)) {
+ return this.$message.info('涓嶈壇鏁伴噺涓嶈兘涓虹┖鎴栦负闆讹紒')
+ }
+
+ this.defectTableData.push({
+ uuid: nanoid(), code: [], badqty: ''
+ })
+ },
+ // 缂洪櫡鍒犻櫎
+ defectDel(row) {
+ this.defectTableData = this.defectTableData.filter(i => i.uuid !== row.uuid)
+
+ this.dialogForm.noputqty = 0
+ this.defectTableData.forEach(i => {
+ this.dialogForm.noputqty += parseFloat(i.badqty)
+ })
+ },
+ badqtyChange(val) {
+ this.dialogForm.noputqty = 0
+ this.defectTableData.forEach(i => {
+ this.dialogForm.noputqty += parseFloat(i.badqty)
+ })
+ },
+ reckwayChange(val) {
+ // console.log(val)
+ this.dialogForm.usergroupcode = ''
+ this.dialogForm.reportuser = []
+ },
+ async usergroupChange(val) {
+ const { data: res } = await GroupsPersonPermissions({ groupcode: val })
+ this.dialogForm.reportuser = res[0].usercode_list ? res[0].usercode_list.split(',') : []
+ },
+ rowClick(row, event, column) {
+ this.radioSelected = row.id
+ },
+ // 鑾峰彇椤甸潰楂樺害
+ getHeight() {
+ this.$nextTick(() => {
+ this.mainHeight = window.innerHeight - 85
+ this.tableHeight = this.mainHeight - 275
+ // this.$refs.tableDataRef.doLayout()
+ })
+ },
+ reset() {
+ this.form.wkshopcode = ''
+ this.form.wocode = ''
+ this.form.workOrderCurrentValue = ''
+ this.form.partcode = ''
+ this.form.partname = ''
+ this.form.partspec = ''
+ this.search()
+ },
+
+ headerCellStyle() {
+ return this.$headerCellStyle
+ },
+ cellStyle() {
+ return this.$cellStyle
+ }
+ }
+}
+</script>
+<style lang="scss" scoped>
+
+::v-deep .elTableDiv .el-radio__label {
+ display: none !important;
+}
+
+.dialogFormItem {
+ margin: 0 10px 0 0;
+}
+
+.dialogFormItemDiv {
+ width: 200px;
+}
+
+::v-deep .el-select__caret {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+::v-deep .el-dialog .el-form-item__label {
+ font-weight: lighter !important;
+}
+
+::v-deep .el-dialog .el-divider__text {
+ font-weight: bolder !important;
+}
+
+</style>
diff --git a/src/views/systemSetting/dataImport.vue b/src/views/systemSetting/dataImport.vue
index c4c8aa5..9133ffb 100644
--- a/src/views/systemSetting/dataImport.vue
+++ b/src/views/systemSetting/dataImport.vue
@@ -116,6 +116,7 @@
v-if="item.indexOf('缂栧彿(鍞竴)')!==-1||
item.indexOf('鐢ㄦ埛濮撳悕')!==-1||
item.indexOf('瀵嗙爜')!==-1||
+ item.indexOf('钖祫绫诲瀷')!==-1||
item.indexOf('鎵嬫満鍙�')!==-1||
item.indexOf('閭')!==-1||
item.indexOf('鍚嶇О')!==-1||
@@ -957,6 +958,10 @@
if (!j['*瀵嗙爜']) {
flag = false
msg = '*瀵嗙爜'
+ }
+ if (!j['*钖祫绫诲瀷']) {
+ flag = false
+ msg = '*钖祫绫诲瀷'
}
if (!j['*鍦ㄨ亴鐘舵��']) {
flag = false
@@ -1846,6 +1851,7 @@
'*鐢ㄦ埛缂栧彿(鍞竴)': '',
'*鐢ㄦ埛濮撳悕': '',
'*瀵嗙爜': '',
+ '*钖祫绫诲瀷': '',
'*鍦ㄨ亴鐘舵��': 'Y',
'鎵嬫満鍙�': '',
'閭': '',
diff --git a/src/views/workOrder/produceOrderList.vue b/src/views/workOrder/produceOrderList.vue
index 6ca4d42..6a3e8fc 100644
--- a/src/views/workOrder/produceOrderList.vue
+++ b/src/views/workOrder/produceOrderList.vue
@@ -1,1292 +1,1356 @@
-<template>
- <div>
- <div class="body" :style="{height:mainHeight+'px'}">
-
- <div class="bodyTopButtonGroup" style="justify-content: space-between">
- <el-button
- v-waves
- icon="el-icon-refresh-right"
- @click="syncERP"
- >鍚屾ERP
- </el-button>
- <div style="display: flex">
- <el-button
- v-waves
- type="primary"
- icon="el-icon-bottom"
- @click="batchHandle"
- >鎵归噺涓嬭揪
- </el-button>
- </div>
-
- </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.wkshopcode"
- filterable
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in wkshopcodeArr"
- :key="item.torg_code"
- :label="item.torg_name"
- :value="item.torg_code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="璁㈠崟鐘舵��" style=" display: flex;">
- <el-select
- v-model="form.erporderstus"
- filterable
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in erporderstusArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="璁㈠崟缂栧彿" style=" display: flex;">
- <el-input v-model="form.erpordercode" placeholder="璇疯緭鍏�" style="width: 200px" />
- </el-form-item>
-
- <el-form-item label="閿�鍞鍗�" style=" display: flex;">
- <el-input v-model="form.saleordercode" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
-
- <el-form-item v-show="isExpandForm" label="浜у搧缂栫爜" style=" display: flex;">
- <el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
-
- <el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
- <el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="浜у搧瑙勬牸" style=" display: flex;">
- <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
-
- <DateType
- ref="DateTypeRef"
- :is-expand-form="isExpandForm"
- style="display:flex;justify-content: center;align-items: center;position: relative"
- @DateTypeChange="DateTypeChange"
- @cycleTimeChange="cycleTimeChange"
- />
-
- <!-- <el-form-item-->
- <!-- v-show="isExpandForm"-->
- <!-- label="棰勮寮�宸ユ椂闂�"-->
- <!-- label-width="100px"-->
- <!-- style="display: flex;font-size: 14px;align-items: center"-->
- <!-- >-->
- <!-- <el-date-picker-->
- <!-- v-model="form.paystartdate"-->
- <!-- type="datetimerange"-->
- <!-- range-separator="~"-->
- <!-- class="timeMini"-->
- <!-- size="mini"-->
- <!-- style="width: 200px;display: flex;line-height: 34px;height: 34px;"-->
- <!-- :clearable="false"-->
- <!-- start-placeholder="寮�濮嬫棩鏈�"-->
- <!-- end-placeholder="缁撴潫鏃ユ湡"-->
- <!-- :picker-options="pickerOptions"-->
- <!-- value-format="yyyy-MM-dd"-->
- <!-- @change="pickerChange"-->
- <!-- />-->
- <!-- </el-form-item>-->
-
- <!-- <el-form-item-->
- <!-- v-show="isExpandForm"-->
- <!-- label="棰勮瀹屽伐鏃堕棿"-->
- <!-- label-width="100px"-->
- <!-- style=" display: flex;font-size: 14px;align-items: center"-->
- <!-- >-->
- <!-- <el-date-picker-->
- <!-- v-model="form.payenddate"-->
- <!-- type="daterange"-->
- <!-- :clearable="false"-->
- <!-- class="timeMini"-->
- <!-- range-separator="~"-->
- <!-- start-placeholder="寮�濮嬫棩鏈�"-->
- <!-- style="width: 200px;display: flex;line-height: 34px ;height: 34px ;"-->
- <!-- end-placeholder="缁撴潫鏃ユ湡"-->
- <!-- size="mini"-->
- <!-- />-->
- <!-- </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"
- :summary-method="getSummaries"
- show-summary
- @sort-change="sortChange"
- @selection-change="handleSelectionChange"
- >
- <!-- @row-click="rowClick"-->
- <el-table-column
- type="selection"
- width="50"
- :selectable="selected"
- />
- <!-- <el-table-column-->
- <!-- width="50"-->
- <!-- fixed-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <el-radio-->
- <!-- v-model="radioSelectedId"-->
- <!-- :label="row.id"-->
- <!-- style="color: transparent;padding-left: 10px;"-->
- <!-- />-->
- <!-- <!– @change.native="getCurrentRow(row.id)"–>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- prop="rowNum"
- width="50"
- fixed
- label="搴忓彿"
- />
- <el-table-column
- prop="status"
- label="璁㈠崟鐘舵��"
- sortable="custom"
- width="110"
- show-tooltip-when-overflow
- >
- <template slot-scope="{row}">
- <div v-if="row.status==='NEW'">鏂拌鍗�</div>
- <div v-if="row.status==='CREATING'">閮ㄥ垎涓嬭揪</div>
- <div v-if="row.status==='CREATED'">鍏ㄩ儴涓嬭揪</div>
- <div v-if="row.status==='CLOSED'">宸插叧闂�</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="wo"
- label="璁㈠崟缂栧彿"
- show-tooltip-when-overflow
- sortable="custom"
- min-width="150"
- />
- <el-table-column
- show-tooltip-when-overflow
- prop="saleOrderCode"
- label="閿�鍞鍗�"
- sortable="custom"
- width="150"
- >
- <template slot-scope="{row}">
- <div v-if="row.saleOrderCode">{{ row.saleOrderCode }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="partcode"
- label="浜у搧缂栫爜"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="150"
- />
- <el-table-column
- prop="partname"
- label="浜у搧鍚嶇О"
- sortable="custom"
- min-width="200"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="partspec"
- label="浜у搧瑙勬牸"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="110"
- >
- <template slot-scope="{row}">
- <div v-if="row.partspec">{{ row.partspec }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="qty"
- label="璁㈠崟鏁伴噺"
- width="150"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <el-table-column
- prop="relse_qty"
- label="宸蹭笅鍗曟暟閲�"
- show-tooltip-when-overflow
- width="150"
- sortable="custom"
- />
- <el-table-column
- prop="clerkuser"
- label="閿�鍞笟鍔″憳"
- show-tooltip-when-overflow
- width="150"
- sortable="custom"
- >
- <template slot-scope="{row}">
- <div v-if="row.clerkuser">{{ row.clerkuser }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="wkshp_name"
- label="鐢熶骇杞﹂棿"
- show-tooltip-when-overflow
- sortable="custom"
- width="150"
- >
- <template slot-scope="{row}">
- <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- prop="planstartdate"-->
- <!-- show-tooltip-when-overflow-->
- <!-- label="棰勮寮�宸ユ椂闂�"-->
- <!-- sortable="custom"-->
- <!-- width="130"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.planstartdate">{{ row.planstartdate.substring(0, 11) }}</div>-->
- <!-- <div v-else>/</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- prop="planenddate"-->
- <!-- label="棰勮瀹屽伐鏃堕棿"-->
- <!-- show-tooltip-when-overflow-->
- <!-- sortable="custom"-->
- <!-- width="130"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.planenddate">{{ row.planenddate.substring(0, 11) }}</div>-->
- <!-- <div v-else>/</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- prop="planenddate"
- label="棰勮寮�宸ユ棩鏈�"
- sortable="custom"
- show-tooltip-when-overflow
- width="130"
- >
- <template slot-scope="{row}">
- <div v-if="row.planenddate">{{ row.planenddate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
-
- <el-table-column
- prop="planstartdate"
- label="棰勮瀹屽伐鏃ユ湡"
- sortable="custom"
- show-tooltip-when-overflow
- width="130"
- >
- <template slot-scope="{row}">
- <div v-if="row.planstartdate">{{ row.planstartdate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
-
- <el-table-column
- prop="saleOrderDeliveryDate"
- label="棰勮浜や粯鏃ユ湡"
- sortable="custom"
- show-tooltip-when-overflow
- width="130"
- >
- <template slot-scope="{row}">
- <div v-if="row.saleOrderDeliveryDate">{{ row.saleOrderDeliveryDate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
-
- <el-table-column
- show-tooltip-when-overflow
- prop="createuser"
- label="鍒涘缓浜哄憳"
- sortable="custom"
- width="150"
- >
- <template slot-scope="{row}">
- <div v-if="row.createuser">{{ row.createuser }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="createdate"
- label="鍒涘缓鏃堕棿"
- width="130"
- show-tooltip-when-overflow
- sortable="custom"
- >
- <template slot-scope="{row}">
- <div v-if="row.createdate">{{ row.createdate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- label="鎿嶄綔"
- fixed="right"
- width="120"
- >
- <template slot-scope="{row}">
- <div class="operationClass">
- <el-tooltip class="item" effect="dark" content="涓嬭揪" placement="top">
- <!-- <el-button v-waves type="text" @click="edit('edit',row)">涓嬭揪</el-button>-->
- <i
- class="el-icon-bottom"
- :style="{color:$store.state.settings.theme}"
- style="cursor: pointer;margin-left: 5px"
- @click="edit('edit',row)"
- />
- </el-tooltip>
- <el-tooltip v-del-tab-index class="item" effect="dark" content="璁㈠崟鍏抽棴" placement="top">
- <i
- class="el-icon-switch-button"
- :style="{color:$store.state.settings.theme}"
- style="cursor: pointer;margin-left: 15px"
- @click="orderClose(row.id)"
- />
- </el-tooltip>
-
- <el-tooltip v-del-tab-index class="item" effect="dark" content="璁㈠崟鍒犻櫎" placement="top">
- <i
- class="el-icon-delete"
- :style="{color:$store.state.settings.theme}"
- style="cursor: pointer;margin-left: 15px"
- @click="orderDel(row.id)"
- />
- </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,jumper"
- popper-class="select_bottom"
- @pagination="getErpOrderSearch"
- />
- </div>
-
- <el-dialog
- v-el-drag-dialog
- :title="operation==='add'?'鏂板':'涓嬭揪'"
- :visible.sync="dialogVisible"
- width="900px"
- top="12vh"
- :close-on-click-modal="false"
- @closed="handleClose"
- @close="handleClose"
- >
- <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="106px">
- <el-form-item label="璁㈠崟缂栧彿" prop="erpordercode">
- <el-input v-model="dialogForm.erpordercode" disabled style="width: 200px" />
- </el-form-item>
- <el-form-item label="浜у搧缂栫爜" prop="partcode">
- <el-input v-model="dialogForm.partcode" disabled style="width: 200px" />
- </el-form-item>
- <el-form-item label="浜у搧鍚嶇О" prop="partname">
- <el-input v-model="dialogForm.partname" disabled style="width: 200px" />
- </el-form-item>
-
- <el-form-item label="浜у搧瑙勬牸" prop="partspec">
- <el-input v-model="dialogForm.partspec" disabled style="width: 200px" />
- </el-form-item>
- <el-form-item label="鐢熶骇杞﹂棿" prop="wkshopname">
- <el-input v-model="dialogForm.wkshopname" disabled style="width: 200px" />
- </el-form-item>
- <el-form-item label="鎵�灞炰粨搴�" prop="warehousename">
- <el-input v-model="dialogForm.warehousename" disabled style="width: 200px" />
- </el-form-item>
- <el-form-item label="璁㈠崟鏁伴噺" prop="erpqty">
- <el-input v-model="dialogForm.erpqty" disabled style="width: 200px" />
- </el-form-item>
- <el-form-item label="宸蹭笅鍗曟暟" prop="relse_qty">
- <el-input
- v-model="dialogForm.relse_qty"
- disabled
- oninput="value=value.replace(/[^0-9.]/g,'')"
- style="width: 200px"
- />
- </el-form-item>
- <el-form-item label="涓嬪崟鏁伴噺" prop="markqty">
- <el-input
- v-model="dialogForm.markqty"
- oninput="value=value.replace(/[^0-9.]/g,'')"
- style="width: 200px"
- />
- </el-form-item>
- <el-form-item label="涓嬪崟鍗曟暟" prop="ordernum">
- <el-input
- v-model="dialogForm.ordernum"
- oninput="value=value.replace(/[^0-9.]/g,'')"
- style="width: 200px"
- />
- </el-form-item>
-
- <el-form-item label="閿�鍞笟鍔″憳" prop="">
- <el-input
- v-model="dialogForm.clerkuser"
- disabled
- style="width: 200px"
- />
- </el-form-item>
- <!-- :picker-options="pickerOptions"-->
-
- <el-form-item label="棰勮浜や粯鏃ユ湡" prop="saleOrderDeliveryDate">
- <el-date-picker
- v-model="dialogForm.saleOrderDeliveryDate"
- type="date"
- size="mini"
- :clearable="false"
- class="dateMini"
- format="yyyy-MM-dd"
- style="width: 200px"
- placeholder="閫夋嫨鏃ユ湡"
- :disabled="dialogForm.saleOrderDeliveryDateIsDisabled"
- />
- </el-form-item>
-
- <div style="display: flex">
- <el-form-item label="棰勮寮�宸ユ棩鏈�" prop="" style="display: flex">
- <el-date-picker
- v-model="dialogForm.paystartdate"
- type="date"
- size="mini"
- style="width: 200px"
- :clearable="false"
- class="dateMini"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- />
- </el-form-item>
-
- <el-form-item label="棰勮瀹屽伐鏃ユ湡" prop="" style="display: flex">
- <el-date-picker
- v-model="dialogForm.payenddate"
- type="date"
- size="mini"
- style="width: 200px"
- :clearable="false"
- class="dateMini"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- />
- </el-form-item>
-
- </div>
-
- </el-form>
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <el-button
- v-waves
- type="primary"
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- @click="dialogVisibleConfirm"
- >涓� 杈�</el-button>
- </div>
- </span>
- </el-dialog>
- </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 {
- ClosedErpOrder,
- DeleteErpOrder,
- ErpOrderSearch,
- MarkBatchSaveErpOrder,
- MarkSaveErpOrder
-} from '@/api/WorkOrder'
-import { SeaveSearchErpOrder } from '@/api/ErpSyncMes'
-import { PrentOrganizationNoCompany } from '@/api/GeneralBasicData'
-import DateType from '@/components/DateType'
-
-const SER_HZ = /^[\u4e00-\u9fa5]+$/
-export default {
- name: 'ProduceOrderList',
- components: {
- Pagination, DateType
- },
- 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()
- }
- }
- }
- return {
- mouseHoverType: 'mouseout',
- isExpandForm: false,
- mainHeight: 0,
- tableHeight: 0,
- form: {
- wkshopcode: '', // 杞﹂棿缂栫爜
- erporderstus: '', // 璁㈠崟鐘舵�佺爜
- erpordercode: '', // 璁㈠崟缂栧彿
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
- creatuser: '', // 鍒涘缓浜哄憳
- saleordercode: '', // 閿�鍞鍗�
- // paystartdate: '', // 浜や粯鏃堕棿
- paystartdate: '', // 棰勮寮�宸ユ椂闂�
- payenddate: '', // 棰勮瀹屽伐鏃堕棿
- createdate: '', // 鍒涘缓鏃堕棿
-
- datatype: 'ED', // 鏃堕棿绫诲瀷
- timeValue: [], // 鏃堕棿鍊�
-
- prop: 'wo', // 鎺掑簭瀛楁
- order: 'desc', // 鎺掑簭瀛楁
- page: 1, // 绗嚑椤�
- rows: 20 // 姣忛〉澶氬皯鏉�
- },
-
- erporderstusArr: [
- { code: 'NEW', name: '鏂拌鍗�' },
- { code: 'CREATING', name: '閮ㄥ垎涓嬭揪' },
- { code: 'CREATED', name: '鍏ㄩ儴涓嬭揪' },
- { code: 'CLOSED', name: '宸插叧闂�' }
- ],
- wkshopcodeArr: [],
- total: 10,
- radioSelectedId: '',
- tableData: [],
- dialogVisible: false,
- dialogForm: {
- erporderid: '', // 璁㈠崟id
- sbid: '', // 璁㈠崟鏄庣粏id
- erpordercode: '', // 璁㈠崟缂栧彿
- saleordercode: '', // 閿�鍞鍗�
-
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
-
- wkshopcode: '', // 杞﹂棿缂栫爜
- wkshopname: '', // 杞﹂棿鍚嶇О
-
- warehousecode: '', // 浠撳簱缂栫爜
- warehousename: '', // 浠撳簱鍚嶇О
-
- erpqty: '', // 璁㈠崟鏁伴噺
- markqty: '', // 涓嬪崟鏁伴噺
- ordernum: '', // 涓嬪崟鍗曟暟
- relse_qty: '', // 宸蹭笅鍗曟暟閲�
-
- clerkuser: '', // 閿�鍞笟鍔″憳
-
- saleOrderDeliveryDate: '', // 棰勮浜や粯鏃ユ湡
-
- paystartdate: '', // 棰勮寮�宸ユ棩鏈�
- payenddate: ''// 棰勮瀹屽伐鏃ユ湡
- },
- operation: '',
- dialogFormRules: {
- // OrgType: [
- // { required: true, message: '璇疯緭鍏ラ�夋嫨绫诲瀷', trigger: ['blur', 'change'] }
- // ],
- // OrgCode: [
- // { required: true, validator: validateName, trigger: ['blur', 'change'] }
- // ],
- markqty: [
- { required: true, message: '璇疯緭鍏ヤ笅鍗曟暟閲�', trigger: ['blur', 'change'] }
- ],
- ordernum: [
- { required: true, message: '璇疯緭鍏ヤ笅鍗曞崟鏁�', trigger: ['blur', 'change'] }
- ],
- saleOrderDeliveryDate: [
- { required: true, message: '璇烽�夋嫨棰勮浜や粯鏃ユ湡', trigger: ['blur', 'change'] }
- ]
-
- },
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() < Date.now() - 8.64e7
- }
- },
- multipleSelection: []
-
- // expireTimeOption: {
- // disabledDate(time) {
- // return time.getTime() > Date.now() - 8.64e6 // 濡傛灉娌℃湁鍚庨潰鐨�-8.64e6灏辨槸涓嶅彲浠ラ�夋嫨浠婂ぉ鐨�
- // }
- // }
-
- }
- },
- activated() {
window.addEventListener('resize', this.getHeight)
this.getHeight()
},
created() {
- this.getErpOrderSearch()
- // this.getPartSelect()// 鑾峰彇浜у搧缂栫爜淇℃伅
-
- this.getPrentOrganizationNoCompany()
- },
- mounted() {
- window.addEventListener('resize', this.getHeight)
- this.getHeight()
- },
- methods: {
-
- DateTypeChange(value) {
- this.form.datatype = value
- },
- cycleTimeChange(val) {
- this.form.timeValue = val
- },
-
- pickerChange(value) {
- console.log(value, 123)
- this.cycleTime = null
- },
-
- async getPrentOrganizationNoCompany() {
- const { data: res } = await PrentOrganizationNoCompany()
- this.wkshopcodeArr = res
- },
- async getErpOrderSearch() {
- console.log(this.form, 1)
- // let tempDate2 = this.form.paystartdate
- // if (tempDate2.length > 0) {
- // tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
- // }
- //
- // let tempDate = this.form.payenddate
- // if (tempDate.length > 0) {
- // tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
- // }
-
- const data = {
-
- erporderstus: this.form.erporderstus, // 璁㈠崟鐘舵�佺爜
- wkshopcode: this.form.wkshopcode, // 杞﹂棿缂栫爜
- erpordercode: this.form.erpordercode, // 璁㈠崟缂栧彿
- saleordercode: this.form.saleordercode, // 閿�鍞崟鍙�
-
- partcode: this.form.partcode, // 浜у搧缂栫爜
- partname: this.form.partname, // 浜у搧鍚嶇О
- partspec: this.form.partspec, // 浜у搧瑙勬牸
-
- datatype: this.form.datatype, // 鏃ユ湡绫诲瀷(璁″垝寮�宸�(PS)銆佽鍒掑畬宸�(PE)銆侀璁′氦浠�(ED))
- searchdate: this.form.timeValue.join('~'), // 鏃堕棿娈�
- // paystartdate: tempDate2, // 浜や粯鏃堕棿
- // payenddate: tempDate, // 浜や粯鏃堕棿
-
- creatuser: this.form.creatuser, // 鍒涘缓浜哄憳
-
- prop: this.form.prop, // 鎺掑簭瀛楁
- order: this.form.order, // 鎺掑簭瀛楁
- page: this.form.page, // 绗嚑椤�
- rows: this.form.rows // 姣忛〉澶氬皯鏉�
-
- }
-
- const res = await ErpOrderSearch(data)
- this.tableData = res.data
- this.total = res.count
- },
- // 鎺掑簭鏀瑰彉鏃�
- 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.getErpOrderSearch()
- },
- // 鍚屾ERP
- syncERP() {
- const loading = this.$loading({
- lock: true,
- text: '姝e湪鍚屾ERP锛岃绋嶇瓑...',
- spinner: 'el-icon-loading',
- customClass: 'osloading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
-
- SeaveSearchErpOrder().then(res => {
- console.log(res, 11)
- if (res.code === '200') {
- setTimeout(() => {
- this.getErpOrderSearch()
- loading.close()
- this.$message.success('鍚屾鎴愬姛锛�')
- }, 2000)
- }
- // else if (res.code === '300') {
- // setTimeout(() => {
- // loading.close()
- // this.$message.error('鍚屾澶辫触锛�')
- // }, 10000)
- // }
- }).catch(e => {
- loading.close()
- })
- },
- // 鏌ヨ
- search() {
- this.getErpOrderSearch()
- },
- // 閲嶇疆
- reset() {
- this.form.wkshopcode = ''
- this.form.erporderstus = ''
- this.form.erpordercode = ''
- this.form.partcode = ''
- this.form.partname = ''
- this.form.partspec = ''
- this.form.paystartdate = ''
- this.form.payenddate = ''
- this.form.creatuser = ''
- this.form.saleordercode = ''
- this.form.createdate = ''
-
- this.form.timeValue = []
- this.cycleTime = null
-
- this.$refs.DateTypeRef.clearValue()
-
- this.getErpOrderSearch()
- },
- // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
- // getCurrentRow(id) {
- // this.radioSelectedId = id
- // },
- // rowClick(row) {
- // this.radioSelectedId = row.id
- // },
-
- // 璁㈠崟鍒犻櫎
- orderDel(id) {
- this.tableData.forEach(item => {
- if (item.id === id) {
- if (item.status === 'CLOSED') {
- return this.$message.info('姝よ鍗曞凡鍏抽棴锛屾棤娉曞垹闄わ紒')
- } else {
- this.$confirm('鏄惁纭鍏抽棴璁㈠崟?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- DeleteErpOrder({ erpordercode: item.wo, erporderid: id }).then(res => {
- if (res.code === '200') {
- this.$message.success('璁㈠崟鍒犻櫎鎴愬姛!')
- this.getErpOrderSearch()
- }
- })
- }).catch(() => {
- this.$message.info('宸插彇娑堝垹闄わ紒')
- })
- }
- }
- })
- },
- // 璁㈠崟鍏抽棴
- async orderClose(id) {
- this.tableData.forEach(item => {
- if (item.id === id) {
- if (item.status !== 'NEW') {
- return this.$message.info('姝よ鍗曢潪鏂拌鍗曪紝鏃犳硶鍏抽棴锛�')
- } else {
- this.$confirm('鏄惁纭鍏抽棴璁㈠崟?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- ClosedErpOrder({ erpordercode: item.wo, erporderid: id }).then(res => {
- if (res.code === '200') {
- this.$message.success('璁㈠崟鍏抽棴鎴愬姛!')
- this.getErpOrderSearch()
- }
- })
- }).catch(() => {
- this.$message.info('宸插彇娑堝叧闂紒')
- })
- }
- }
- })
- },
- batchHandle() {
- this.$confirm('鏄惁鎵归噺涓嬭揪?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- if (this.multipleSelection.length === 0) {
- return this.$message.info('璇峰厛閫夋嫨璁㈠崟锛�')
- }
- // console.log(JSON.parse(JSON.stringify(this.multipleSelection)))
- const data = []
- this.multipleSelection.forEach(i => {
- data.push({
- 'erporderid': i.id,
- 'sbid': i.sbid,
- 'erpordercode': i.wo,
- 'partcode': i.partcode,
- 'wkshopcode': i.wkshp_code,
- 'warehousecode': i.stck_code,
- 'erpqty': i.qty,
- 'markqty': i.qty,
- 'ordernum': 1,
- 'clerkuser': i.clerkuser,
- 'relse_qty': i.qty,
- 'saleordercode': i.saleOrderCode,
- // 'saleOrderDeliveryDate': i.saleOrderDeliveryDate
- 'saleOrderDeliveryDate': handleDatetime(new Date()) + ' 00:00:00',
-
- 'paystartdate': i.planstartdate,
- 'payenddate': i.planenddate
- })
- })
- // console.log(JSON.parse(JSON.stringify(data)))
- MarkBatchSaveErpOrder(data).then(res => {
- if (res.code === '200') {
- this.multipleSelection = []
- this.$message.success('鎵归噺涓嬭揪鎴愬姛锛�')
- this.getErpOrderSearch()
- } else {
- this.$message.error('鎵归噺涓嬭揪澶辫触锛�')
- }
- })
- }).catch(() => {
- this.$message.info('宸插彇娑堜笅杈撅紒')
- })
- },
- selected(row, index) {
- return row.status === 'NEW'
- },
- handleSelectionChange(val) {
- this.multipleSelection = val
- },
- // 鏂板鎸夐挳
- add(operation) {
- this.operation = operation
- this.dialogVisible = true
- },
- // 淇敼鎸夐挳
- edit(operation, row) {
- if (parseFloat(row.qty) === parseFloat(row.relse_qty) || row.status === 'CLOSED') {
- return this.$message.info('姝ゅ伐鍗曞凡鍏ㄩ儴涓嬭揪锛�')
- }
-
- this.operation = operation
- this.dialogVisible = true
-
- this.$nextTick(() => {
- this.dialogForm.sbid = row.sbid
- this.dialogForm.erporderid = row.id
- this.dialogForm.erpordercode = row.wo
- this.dialogForm.saleordercode = row.saleOrderCode
-
- this.dialogForm.partcode = row.partcode
- this.dialogForm.partname = row.partname
- this.dialogForm.partspec = row.partspec
-
- this.dialogForm.wkshopcode = row.wkshp_code
- this.dialogForm.wkshopname = row.wkshp_name
-
- this.dialogForm.warehousecode = row.stck_code
- this.dialogForm.warehousename = row.stck_name
-
- this.dialogForm.saleOrderDeliveryDate = row.saleOrderDeliveryDate
-
- this.dialogForm.erpqty = row.qty
- this.dialogForm.markqty = parseFloat(row.qty) - parseFloat(row.relse_qty)
- this.dialogForm.ordernum = 1
- this.dialogForm.relse_qty = row.relse_qty
- this.dialogForm.clerkuser = row.clerkuser
-
- this.dialogForm.paystartdate = row.planstartdate
- this.dialogForm.payenddate = row.planenddate
- })
- },
- // 瀵硅瘽妗嗗叧闂簨浠�
- handleClose() {
- this.dialogForm = {
- erporderid: '', // 璁㈠崟id
- sbid: '', // 璁㈠崟鏄庣粏id
- erpordercode: '', // 璁㈠崟缂栧彿
- saleordercode: '', // 閿�鍞鍗�
-
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
-
- wkshopcode: '', // 杞﹂棿缂栫爜
- wkshopname: '', // 杞﹂棿鍚嶇О
-
- warehousecode: '', // 浠撳簱缂栫爜
- warehousename: '', // 浠撳簱鍚嶇О
-
- erpqty: '', // 璁㈠崟鏁伴噺
- markqty: '', // 涓嬪崟鏁伴噺
- ordernum: '', // 涓嬪崟鍗曟暟
- relse_qty: '', // 宸蹭笅鍗曟暟閲�
-
- payenddate: '', // 棰勮瀹屽伐鏃ユ湡
- paystartdate: '', // 棰勮寮�宸ユ棩鏈�
-
- saleOrderDeliveryDate: '' // 棰勮浜や粯鏃ユ湡
- }
- this.$refs.dialogForm.clearValidate()
- },
- // 瀵硅瘽妗嗗彇娑�
- dialogVisibleCancel() {
- this.dialogVisible = false
- },
- // 瀵硅瘽妗嗙‘璁�
- dialogVisibleConfirm() {
- this.dialogForm.markqty = parseFloat(this.dialogForm.markqty)
- this.dialogForm.erpqty = parseFloat(this.dialogForm.erpqty)
- this.dialogForm.relse_qty = parseFloat(this.dialogForm.relse_qty)
- this.dialogForm.ordernum = parseFloat(this.dialogForm.ordernum)
- if (this.dialogForm.markqty < 1 || this.dialogForm.markqty > this.dialogForm.erpqty - this.dialogForm.relse_qty) {
- return this.$message.info('涓嬪崟鏁伴噺瓒呭嚭鍙笅鍗曟暟鐨勮寖鍥达紒')
- }
-
- if (this.dialogForm.ordernum < 1 || this.dialogForm.ordernum > this.dialogForm.markqty) {
- return this.$message.info('涓嬪崟鍗曟暟瓒呭嚭鍙笅鍗曞崟鏁扮殑鑼冨洿锛�')
- }
-
- this.$refs.dialogForm.validate(valid => {
- if (valid) {
- this.$store.state.app.buttonIsDisabled = true
- const data = {
- 'sbid': this.dialogForm.sbid,
- 'erporderid': this.dialogForm.erporderid,
- 'erpordercode': this.dialogForm.erpordercode,
- 'saleordercode': this.dialogForm.saleordercode,
- 'partcode': this.dialogForm.partcode,
- 'wkshopcode': this.dialogForm.wkshopcode,
- 'warehousecode': this.dialogForm.warehousecode,
- 'clerkuser': this.dialogForm.clerkuser,
- 'erpqty': this.dialogForm.erpqty,
- 'markqty': this.dialogForm.markqty,
- 'ordernum': this.dialogForm.ordernum,
- 'payenddate': this.dialogForm.payenddate,
- 'paystartdate': this.dialogForm.paystartdate,
- 'relse_qty': this.dialogForm.relse_qty,
- 'saleOrderDeliveryDate': handleDatetime(this.dialogForm.saleOrderDeliveryDate) + ' 00:00:00'
- }
-
- MarkSaveErpOrder(data).then(res => {
- if (res.code === '200') {
- this.dialogVisible = false
- this.$message.success('涓嬭揪鎴愬姛锛�')
- this.getErpOrderSearch()
- this.$store.state.app.buttonIsDisabled = false
- } else {
- this.$message.error('涓嬭揪澶辫触锛�')
- }
- })
- }
- })
- },
- // 鑾峰彇椤甸潰楂樺害
- getHeight() {
- this.$nextTick(() => {
- this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 250
-
- this.$refs.tableDataRef.doLayout()
- })
- },
- tableRowClassName({ row, rowIndex }) {
- return 'custom-row'
- },
- getSummaries(param) {
- const { columns, data } = param
- const sums = []
- const i = 7
- columns.forEach((column, index) => {
- if (index === i) {
- sums[index] = '鎬绘暟'
- return
- }
- const values = data.map(item => Number(item[column.property]))
- if (column.property === 'qty') {
- sums[index] = values.reduce((prev, curr) => {
- const value = Number(curr)
- if (!isNaN(value)) {
- return prev + curr
- // return Math.round(prev * 100) / 100 + Math.round(curr * 100) / 100
- }
- }, 0)
-
- sums[index] += ' 鍗�'
- }
- if (column.property === 'relse_qty') {
- sums[index] = values.reduce((prev, curr) => {
- const value = Number(curr)
- if (!isNaN(value)) {
- return prev + curr
- // return Math.round(prev * 100) / 100 + Math.round(curr * 100) / 100
- }
- }, 0)
-
- sums[index] += ' 鍗�'
- }
- })
-
- this.$nextTick(() => {
- this.$refs.tableDataRef.doLayout()
- })
- return sums
- }
- }
-}
-</script>
-
-<!--鍏叡椤甸潰鏍峰紡-->
-<style lang="scss" scoped>
-$main_color: #42b983;
-
-::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;
-}
-
-.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 .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;
-}
-
-.userDialogVisible ::v-deep .el-form-item {
- margin-bottom: 0;
-}
-
-.elTableDiv {
- ::v-deep .el-radio__label {
- display: none;
- }
-}
-
-.tableFixed {
- ::v-deep .el-table__fixed-right {
- height: 100% !important;
- }
-
- ::v-deep .el-table__fixed {
- height: 100% !important;
- }
-}
-
-.dateMini {
- ::v-deep .el-input__inner {
- line-height: 34px;
- height: 34px;
- width: 200px;
- display: flex;
- font-size: 14px !important;
- align-items: center !important;
- }
-
- ::v-deep .el-input__prefix {
- margin-top: -3px;
- }
-}
-
-::v-deep .el-icon-delete {
- cursor: pointer;
- margin-right: 0px !important;
-}
-</style>
-<style>
-.el-table .custom-row {
- background: #f8f8fa;
-}
-
-.osloading {
- font-size: 26px !important;
-}
-
-.el-loading-text {
- font-size: 26px !important;
-}
-
-.el-picker-panel__footer {
- display: flex !important;
- justify-content: flex-end !important;
-}
-
-</style>
-
+<template>
+ <div>
+ <div class="body" :style="{height:mainHeight+'px'}">
+
+ <div class="bodyTopButtonGroup" style="justify-content: space-between">
+ <el-button
+ v-waves
+ icon="el-icon-refresh-right"
+ @click="syncERP"
+ >鍚屾ERP
+ </el-button>
+ <div style="display: flex">
+ <el-button
+ v-waves
+ type="primary"
+ icon="el-icon-bottom"
+ @click="batchHandle"
+ >鎵归噺涓嬭揪
+ </el-button>
+ </div>
+
+ </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.wkshopcode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in wkshopcodeArr"
+ :key="item.torg_code"
+ :label="item.torg_name"
+ :value="item.torg_code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="璁㈠崟鐘舵��" style=" display: flex;">
+ <el-select
+ v-model="form.erporderstus"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in erporderstusArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="璁㈠崟缂栧彿" style=" display: flex;">
+ <el-input v-model="form.erpordercode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+
+ <el-form-item label="閿�鍞鍗�" style=" display: flex;">
+ <el-input v-model="form.saleordercode" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+
+ <el-form-item v-show="isExpandForm" label="浜у搧缂栫爜" style=" display: flex;">
+ <el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+
+ <el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="浜у搧瑙勬牸" style=" display: flex;">
+ <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+
+ <DateType
+ ref="DateTypeRef"
+ :is-expand-form="isExpandForm"
+ style="display:flex;justify-content: center;align-items: center;position: relative"
+ @DateTypeChange="DateTypeChange"
+ @cycleTimeChange="cycleTimeChange"
+ />
+
+ <!-- <el-form-item-->
+ <!-- v-show="isExpandForm"-->
+ <!-- label="棰勮寮�宸ユ椂闂�"-->
+ <!-- label-width="100px"-->
+ <!-- style="display: flex;font-size: 14px;align-items: center"-->
+ <!-- >-->
+ <!-- <el-date-picker-->
+ <!-- v-model="form.paystartdate"-->
+ <!-- type="datetimerange"-->
+ <!-- range-separator="~"-->
+ <!-- class="timeMini"-->
+ <!-- size="mini"-->
+ <!-- style="width: 200px;display: flex;line-height: 34px;height: 34px;"-->
+ <!-- :clearable="false"-->
+ <!-- start-placeholder="寮�濮嬫棩鏈�"-->
+ <!-- end-placeholder="缁撴潫鏃ユ湡"-->
+ <!-- :picker-options="pickerOptions"-->
+ <!-- value-format="yyyy-MM-dd"-->
+ <!-- @change="pickerChange"-->
+ <!-- />-->
+ <!-- </el-form-item>-->
+
+ <!-- <el-form-item-->
+ <!-- v-show="isExpandForm"-->
+ <!-- label="棰勮瀹屽伐鏃堕棿"-->
+ <!-- label-width="100px"-->
+ <!-- style=" display: flex;font-size: 14px;align-items: center"-->
+ <!-- >-->
+ <!-- <el-date-picker-->
+ <!-- v-model="form.payenddate"-->
+ <!-- type="daterange"-->
+ <!-- :clearable="false"-->
+ <!-- class="timeMini"-->
+ <!-- range-separator="~"-->
+ <!-- start-placeholder="寮�濮嬫棩鏈�"-->
+ <!-- style="width: 200px;display: flex;line-height: 34px ;height: 34px ;"-->
+ <!-- end-placeholder="缁撴潫鏃ユ湡"-->
+ <!-- size="mini"-->
+ <!-- />-->
+ <!-- </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"
+ :summary-method="getSummaries"
+ show-summary
+ @sort-change="sortChange"
+ @selection-change="handleSelectionChange"
+ >
+ <!-- @row-click="rowClick"-->
+ <el-table-column
+ type="selection"
+ width="50"
+ :selectable="selected"
+ />
+ <!-- <el-table-column-->
+ <!-- width="50"-->
+ <!-- fixed-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <el-radio-->
+ <!-- v-model="radioSelectedId"-->
+ <!-- :label="row.id"-->
+ <!-- style="color: transparent;padding-left: 10px;"-->
+ <!-- />-->
+ <!-- <!– @change.native="getCurrentRow(row.id)"–>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <el-table-column
+ prop="rowNum"
+ width="50"
+ fixed
+ label="搴忓彿"
+ />
+ <el-table-column
+ prop="status"
+ label="璁㈠崟鐘舵��"
+ sortable="custom"
+ width="110"
+ show-tooltip-when-overflow
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.status==='NEW'">鏂拌鍗�</div>
+ <div v-if="row.status==='CREATING'">閮ㄥ垎涓嬭揪</div>
+ <div v-if="row.status==='CREATED'">鍏ㄩ儴涓嬭揪</div>
+ <div v-if="row.status==='CLOSED'">宸插叧闂�</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wo"
+ label="璁㈠崟缂栧彿"
+ show-tooltip-when-overflow
+ sortable="custom"
+ min-width="150"
+ />
+ <el-table-column
+ show-tooltip-when-overflow
+ prop="saleOrderCode"
+ label="閿�鍞鍗�"
+ sortable="custom"
+ width="150"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.saleOrderCode">{{ row.saleOrderCode }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="partcode"
+ label="浜у搧缂栫爜"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="150"
+ />
+ <el-table-column
+ prop="partname"
+ label="浜у搧鍚嶇О"
+ sortable="custom"
+ min-width="200"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="partspec"
+ label="浜у搧瑙勬牸"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="110"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.partspec">{{ row.partspec }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="qty"
+ label="璁㈠崟鏁伴噺"
+ width="150"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+ <el-table-column
+ prop="relse_qty"
+ label="宸蹭笅鍗曟暟閲�"
+ show-tooltip-when-overflow
+ width="150"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="priuserdefnvc1"
+ label="瀹㈡埛鍚嶇О"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc1 ? row.priuserdefnvc1 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc6"
+ label="瀹㈡埛缂栫爜"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc6 ? row.priuserdefnvc6 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc2"
+ label="瀵瑰唴鍚嶇О"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc2 ? row.priuserdefnvc2 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc3"
+ label="CTP鏃ユ湡"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc3 ? row.priuserdefnvc3 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc4"
+ label="閽㈠垁缂栧彿"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc4 ? row.priuserdefnvc4 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc5"
+ label="鐩掑瀷"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc5 ? row.priuserdefnvc5 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="clerkuser"
+ label="閿�鍞笟鍔″憳"
+ show-tooltip-when-overflow
+ width="150"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.clerkuser">{{ row.clerkuser }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wkshp_name"
+ label="鐢熶骇杞﹂棿"
+ show-tooltip-when-overflow
+ sortable="custom"
+ width="150"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column-->
+ <!-- prop="planstartdate"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- label="棰勮寮�宸ユ椂闂�"-->
+ <!-- sortable="custom"-->
+ <!-- width="130"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.planstartdate">{{ row.planstartdate.substring(0, 11) }}</div>-->
+ <!-- <div v-else>/</div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <!-- <el-table-column-->
+ <!-- prop="planenddate"-->
+ <!-- label="棰勮瀹屽伐鏃堕棿"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- sortable="custom"-->
+ <!-- width="130"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.planenddate">{{ row.planenddate.substring(0, 11) }}</div>-->
+ <!-- <div v-else>/</div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <el-table-column
+ prop="planenddate"
+ label="棰勮寮�宸ユ棩鏈�"
+ sortable="custom"
+ show-tooltip-when-overflow
+ width="130"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.planenddate">{{ row.planenddate.substring(0, 11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ prop="planstartdate"
+ label="棰勮瀹屽伐鏃ユ湡"
+ sortable="custom"
+ show-tooltip-when-overflow
+ width="130"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.planstartdate">{{ row.planstartdate.substring(0, 11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ prop="saleOrderDeliveryDate"
+ label="棰勮浜や粯鏃ユ湡"
+ sortable="custom"
+ show-tooltip-when-overflow
+ width="130"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.saleOrderDeliveryDate">{{ row.saleOrderDeliveryDate.substring(0, 11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ show-tooltip-when-overflow
+ prop="createuser"
+ label="鍒涘缓浜哄憳"
+ sortable="custom"
+ width="150"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.createuser">{{ row.createuser }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="createdate"
+ label="鍒涘缓鏃堕棿"
+ width="130"
+ show-tooltip-when-overflow
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.createdate">{{ row.createdate.substring(0, 11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎿嶄綔"
+ fixed="right"
+ width="120"
+ >
+ <template slot-scope="{row}">
+ <div class="operationClass">
+ <el-tooltip class="item" effect="dark" content="涓嬭揪" placement="top">
+ <!-- <el-button v-waves type="text" @click="edit('edit',row)">涓嬭揪</el-button>-->
+ <i
+ class="el-icon-bottom"
+ :style="{color:$store.state.settings.theme}"
+ style="cursor: pointer;margin-left: 5px"
+ @click="edit('edit',row)"
+ />
+ </el-tooltip>
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="璁㈠崟鍏抽棴" placement="top">
+ <i
+ class="el-icon-switch-button"
+ :style="{color:$store.state.settings.theme}"
+ style="cursor: pointer;margin-left: 15px"
+ @click="orderClose(row.id)"
+ />
+ </el-tooltip>
+
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="璁㈠崟鍒犻櫎" placement="top">
+ <i
+ class="el-icon-delete"
+ :style="{color:$store.state.settings.theme}"
+ style="cursor: pointer;margin-left: 15px"
+ @click="orderDel(row.id)"
+ />
+ </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,jumper"
+ popper-class="select_bottom"
+ @pagination="getErpOrderSearch"
+ />
+ </div>
+
+ <el-dialog
+ v-el-drag-dialog
+ :title="operation==='add'?'鏂板':'涓嬭揪'"
+ :visible.sync="dialogVisible"
+ width="900px"
+ top="12vh"
+ :close-on-click-modal="false"
+ @closed="handleClose"
+ @close="handleClose"
+ >
+ <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="106px">
+ <el-form-item label="璁㈠崟缂栧彿" prop="erpordercode">
+ <el-input v-model="dialogForm.erpordercode" disabled style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="浜у搧缂栫爜" prop="partcode">
+ <el-input v-model="dialogForm.partcode" disabled style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="浜у搧鍚嶇О" prop="partname">
+ <el-input v-model="dialogForm.partname" disabled style="width: 200px" />
+ </el-form-item>
+
+ <el-form-item label="浜у搧瑙勬牸" prop="partspec">
+ <el-input v-model="dialogForm.partspec" disabled style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="鐢熶骇杞﹂棿" prop="wkshopname">
+ <el-input v-model="dialogForm.wkshopname" disabled style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="鎵�灞炰粨搴�" prop="warehousename">
+ <el-input v-model="dialogForm.warehousename" disabled style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="璁㈠崟鏁伴噺" prop="erpqty">
+ <el-input v-model="dialogForm.erpqty" disabled style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="宸蹭笅鍗曟暟" prop="relse_qty">
+ <el-input
+ v-model="dialogForm.relse_qty"
+ disabled
+ oninput="value=value.replace(/[^0-9.]/g,'')"
+ style="width: 200px"
+ />
+ </el-form-item>
+ <el-form-item label="涓嬪崟鏁伴噺" prop="markqty">
+ <el-input
+ v-model="dialogForm.markqty"
+ oninput="value=value.replace(/[^0-9.]/g,'')"
+ style="width: 200px"
+ />
+ </el-form-item>
+ <el-form-item label="涓嬪崟鍗曟暟" prop="ordernum">
+ <el-input
+ v-model="dialogForm.ordernum"
+ oninput="value=value.replace(/[^0-9.]/g,'')"
+ style="width: 200px"
+ />
+ </el-form-item>
+
+ <el-form-item label="閿�鍞笟鍔″憳" prop="">
+ <el-input
+ v-model="dialogForm.clerkuser"
+ disabled
+ style="width: 200px"
+ />
+ </el-form-item>
+ <!-- :picker-options="pickerOptions"-->
+
+ <el-form-item label="棰勮浜や粯鏃ユ湡" prop="saleOrderDeliveryDate">
+ <el-date-picker
+ v-model="dialogForm.saleOrderDeliveryDate"
+ type="date"
+ size="mini"
+ :clearable="false"
+ class="dateMini"
+ format="yyyy-MM-dd"
+ style="width: 200px"
+ placeholder="閫夋嫨鏃ユ湡"
+ :disabled="dialogForm.saleOrderDeliveryDateIsDisabled"
+ />
+ </el-form-item>
+
+ <div style="display: flex">
+ <el-form-item label="棰勮寮�宸ユ棩鏈�" prop="" style="display: flex">
+ <el-date-picker
+ v-model="dialogForm.paystartdate"
+ type="date"
+ size="mini"
+ style="width: 200px"
+ :clearable="false"
+ class="dateMini"
+ format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ />
+ </el-form-item>
+
+ <el-form-item label="棰勮瀹屽伐鏃ユ湡" prop="" style="display: flex">
+ <el-date-picker
+ v-model="dialogForm.payenddate"
+ type="date"
+ size="mini"
+ style="width: 200px"
+ :clearable="false"
+ class="dateMini"
+ format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ />
+ </el-form-item>
+
+ </div>
+
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
+ <el-button
+ v-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="dialogVisibleConfirm"
+ >涓� 杈�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+ </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 {
+ ClosedErpOrder,
+ DeleteErpOrder,
+ ErpOrderSearch,
+ MarkBatchSaveErpOrder,
+ MarkSaveErpOrder
+} from '@/api/WorkOrder'
+import { SeaveSearchErpOrder } from '@/api/ErpSyncMes'
+import { PrentOrganizationNoCompany } from '@/api/GeneralBasicData'
+import DateType from '@/components/DateType'
+
+const SER_HZ = /^[\u4e00-\u9fa5]+$/
+export default {
+ name: 'ProduceOrderList',
+ components: {
+ Pagination, DateType
+ },
+ 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()
+ }
+ }
+ }
+ return {
+ mouseHoverType: 'mouseout',
+ isExpandForm: false,
+ mainHeight: 0,
+ tableHeight: 0,
+ form: {
+ wkshopcode: '', // 杞﹂棿缂栫爜
+ erporderstus: '', // 璁㈠崟鐘舵�佺爜
+ erpordercode: '', // 璁㈠崟缂栧彿
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+ creatuser: '', // 鍒涘缓浜哄憳
+ saleordercode: '', // 閿�鍞鍗�
+ // paystartdate: '', // 浜や粯鏃堕棿
+ paystartdate: '', // 棰勮寮�宸ユ椂闂�
+ payenddate: '', // 棰勮瀹屽伐鏃堕棿
+ createdate: '', // 鍒涘缓鏃堕棿
+
+ datatype: 'ED', // 鏃堕棿绫诲瀷
+ timeValue: [], // 鏃堕棿鍊�
+
+ prop: 'wo', // 鎺掑簭瀛楁
+ order: 'desc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ },
+
+ erporderstusArr: [
+ { code: 'NEW', name: '鏂拌鍗�' },
+ { code: 'CREATING', name: '閮ㄥ垎涓嬭揪' },
+ { code: 'CREATED', name: '鍏ㄩ儴涓嬭揪' },
+ { code: 'CLOSED', name: '宸插叧闂�' }
+ ],
+ wkshopcodeArr: [],
+ total: 10,
+ radioSelectedId: '',
+ tableData: [],
+ dialogVisible: false,
+ dialogForm: {
+ erporderid: '', // 璁㈠崟id
+ sbid: '', // 璁㈠崟鏄庣粏id
+ erpordercode: '', // 璁㈠崟缂栧彿
+ saleordercode: '', // 閿�鍞鍗�
+
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+
+ wkshopcode: '', // 杞﹂棿缂栫爜
+ wkshopname: '', // 杞﹂棿鍚嶇О
+
+ warehousecode: '', // 浠撳簱缂栫爜
+ warehousename: '', // 浠撳簱鍚嶇О
+
+ erpqty: '', // 璁㈠崟鏁伴噺
+ markqty: '', // 涓嬪崟鏁伴噺
+ ordernum: '', // 涓嬪崟鍗曟暟
+ relse_qty: '', // 宸蹭笅鍗曟暟閲�
+
+ clerkuser: '', // 閿�鍞笟鍔″憳
+
+ saleOrderDeliveryDate: '', // 棰勮浜や粯鏃ユ湡
+
+ paystartdate: '', // 棰勮寮�宸ユ棩鏈�
+ payenddate: ''// 棰勮瀹屽伐鏃ユ湡
+ },
+ operation: '',
+ dialogFormRules: {
+ // OrgType: [
+ // { required: true, message: '璇疯緭鍏ラ�夋嫨绫诲瀷', trigger: ['blur', 'change'] }
+ // ],
+ // OrgCode: [
+ // { required: true, validator: validateName, trigger: ['blur', 'change'] }
+ // ],
+ markqty: [
+ { required: true, message: '璇疯緭鍏ヤ笅鍗曟暟閲�', trigger: ['blur', 'change'] }
+ ],
+ ordernum: [
+ { required: true, message: '璇疯緭鍏ヤ笅鍗曞崟鏁�', trigger: ['blur', 'change'] }
+ ],
+ saleOrderDeliveryDate: [
+ { required: true, message: '璇烽�夋嫨棰勮浜や粯鏃ユ湡', trigger: ['blur', 'change'] }
+ ]
+
+ },
+ pickerOptions: {
+ disabledDate(time) {
+ return time.getTime() < Date.now() - 8.64e7
+ }
+ },
+ multipleSelection: []
+
+ // expireTimeOption: {
+ // disabledDate(time) {
+ // return time.getTime() > Date.now() - 8.64e6 // 濡傛灉娌℃湁鍚庨潰鐨�-8.64e6灏辨槸涓嶅彲浠ラ�夋嫨浠婂ぉ鐨�
+ // }
+ // }
+
+ }
+ },
+ activated() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+ },
+ created() {
+ this.getErpOrderSearch()
+ // this.getPartSelect()// 鑾峰彇浜у搧缂栫爜淇℃伅
+
+ this.getPrentOrganizationNoCompany()
+ },
+ mounted() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+ },
+ methods: {
+
+ DateTypeChange(value) {
+ this.form.datatype = value
+ },
+ cycleTimeChange(val) {
+ this.form.timeValue = val
+ },
+
+ pickerChange(value) {
+ console.log(value, 123)
+ this.cycleTime = null
+ },
+
+ async getPrentOrganizationNoCompany() {
+ const { data: res } = await PrentOrganizationNoCompany()
+ this.wkshopcodeArr = res
+ },
+ async getErpOrderSearch() {
+ console.log(this.form, 1)
+ // let tempDate2 = this.form.paystartdate
+ // if (tempDate2.length > 0) {
+ // tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
+ // }
+ //
+ // let tempDate = this.form.payenddate
+ // if (tempDate.length > 0) {
+ // tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
+ // }
+
+ const data = {
+
+ erporderstus: this.form.erporderstus, // 璁㈠崟鐘舵�佺爜
+ wkshopcode: this.form.wkshopcode, // 杞﹂棿缂栫爜
+ erpordercode: this.form.erpordercode, // 璁㈠崟缂栧彿
+ saleordercode: this.form.saleordercode, // 閿�鍞崟鍙�
+
+ partcode: this.form.partcode, // 浜у搧缂栫爜
+ partname: this.form.partname, // 浜у搧鍚嶇О
+ partspec: this.form.partspec, // 浜у搧瑙勬牸
+
+ datatype: this.form.datatype, // 鏃ユ湡绫诲瀷(璁″垝寮�宸�(PS)銆佽鍒掑畬宸�(PE)銆侀璁′氦浠�(ED))
+ searchdate: this.form.timeValue.join('~'), // 鏃堕棿娈�
+ // paystartdate: tempDate2, // 浜や粯鏃堕棿
+ // payenddate: tempDate, // 浜や粯鏃堕棿
+
+ creatuser: this.form.creatuser, // 鍒涘缓浜哄憳
+
+ prop: this.form.prop, // 鎺掑簭瀛楁
+ order: this.form.order, // 鎺掑簭瀛楁
+ page: this.form.page, // 绗嚑椤�
+ rows: this.form.rows // 姣忛〉澶氬皯鏉�
+
+ }
+
+ const res = await ErpOrderSearch(data)
+ this.tableData = res.data
+ this.total = res.count
+ },
+ // 鎺掑簭鏀瑰彉鏃�
+ 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.getErpOrderSearch()
+ },
+ // 鍚屾ERP
+ syncERP() {
+ const loading = this.$loading({
+ lock: true,
+ text: '姝e湪鍚屾ERP锛岃绋嶇瓑...',
+ spinner: 'el-icon-loading',
+ customClass: 'osloading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+
+ SeaveSearchErpOrder().then(res => {
+ console.log(res, 11)
+ if (res.code === '200') {
+ setTimeout(() => {
+ this.getErpOrderSearch()
+ loading.close()
+ this.$message.success('鍚屾鎴愬姛锛�')
+ }, 2000)
+ }
+ // else if (res.code === '300') {
+ // setTimeout(() => {
+ // loading.close()
+ // this.$message.error('鍚屾澶辫触锛�')
+ // }, 10000)
+ // }
+ }).catch(e => {
+ loading.close()
+ })
+ },
+ // 鏌ヨ
+ search() {
+ this.getErpOrderSearch()
+ },
+ // 閲嶇疆
+ reset() {
+ this.form.wkshopcode = ''
+ this.form.erporderstus = ''
+ this.form.erpordercode = ''
+ this.form.partcode = ''
+ this.form.partname = ''
+ this.form.partspec = ''
+ this.form.paystartdate = ''
+ this.form.payenddate = ''
+ this.form.creatuser = ''
+ this.form.saleordercode = ''
+ this.form.createdate = ''
+
+ this.form.timeValue = []
+ this.cycleTime = null
+
+ this.$refs.DateTypeRef.clearValue()
+
+ this.getErpOrderSearch()
+ },
+ // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
+ // getCurrentRow(id) {
+ // this.radioSelectedId = id
+ // },
+ // rowClick(row) {
+ // this.radioSelectedId = row.id
+ // },
+
+ // 璁㈠崟鍒犻櫎
+ orderDel(id) {
+ this.tableData.forEach(item => {
+ if (item.id === id) {
+ if (item.status === 'CLOSED') {
+ return this.$message.info('姝よ鍗曞凡鍏抽棴锛屾棤娉曞垹闄わ紒')
+ } else {
+ this.$confirm('鏄惁纭鍏抽棴璁㈠崟?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ DeleteErpOrder({ erpordercode: item.wo, erporderid: id }).then(res => {
+ if (res.code === '200') {
+ this.$message.success('璁㈠崟鍒犻櫎鎴愬姛!')
+ this.getErpOrderSearch()
+ }
+ })
+ }).catch(() => {
+ this.$message.info('宸插彇娑堝垹闄わ紒')
+ })
+ }
+ }
+ })
+ },
+ // 璁㈠崟鍏抽棴
+ async orderClose(id) {
+ this.tableData.forEach(item => {
+ if (item.id === id) {
+ if (item.status !== 'NEW') {
+ return this.$message.info('姝よ鍗曢潪鏂拌鍗曪紝鏃犳硶鍏抽棴锛�')
+ } else {
+ this.$confirm('鏄惁纭鍏抽棴璁㈠崟?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ ClosedErpOrder({ erpordercode: item.wo, erporderid: id }).then(res => {
+ if (res.code === '200') {
+ this.$message.success('璁㈠崟鍏抽棴鎴愬姛!')
+ this.getErpOrderSearch()
+ }
+ })
+ }).catch(() => {
+ this.$message.info('宸插彇娑堝叧闂紒')
+ })
+ }
+ }
+ })
+ },
+ batchHandle() {
+ this.$confirm('鏄惁鎵归噺涓嬭揪?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ if (this.multipleSelection.length === 0) {
+ return this.$message.info('璇峰厛閫夋嫨璁㈠崟锛�')
+ }
+ // console.log(JSON.parse(JSON.stringify(this.multipleSelection)))
+ const data = []
+ this.multipleSelection.forEach(i => {
+ data.push({
+ 'erporderid': i.id,
+ 'sbid': i.sbid,
+ 'erpordercode': i.wo,
+ 'partcode': i.partcode,
+ 'wkshopcode': i.wkshp_code,
+ 'warehousecode': i.stck_code,
+ 'erpqty': i.qty,
+ 'markqty': i.qty,
+ 'ordernum': 1,
+ 'clerkuser': i.clerkuser,
+ 'relse_qty': i.qty,
+ 'saleordercode': i.saleOrderCode,
+ // 'saleOrderDeliveryDate': i.saleOrderDeliveryDate
+ 'saleOrderDeliveryDate': handleDatetime(new Date()) + ' 00:00:00',
+
+ 'paystartdate': i.planstartdate,
+ 'payenddate': i.planenddate
+ })
+ })
+ // console.log(JSON.parse(JSON.stringify(data)))
+ MarkBatchSaveErpOrder(data).then(res => {
+ if (res.code === '200') {
+ this.multipleSelection = []
+ this.$message.success('鎵归噺涓嬭揪鎴愬姛锛�')
+ this.getErpOrderSearch()
+ } else {
+ this.$message.error('鎵归噺涓嬭揪澶辫触锛�')
+ }
+ })
+ }).catch(() => {
+ this.$message.info('宸插彇娑堜笅杈撅紒')
+ })
+ },
+ selected(row, index) {
+ return row.status === 'NEW'
+ },
+ handleSelectionChange(val) {
+ this.multipleSelection = val
+ },
+ // 鏂板鎸夐挳
+ add(operation) {
+ this.operation = operation
+ this.dialogVisible = true
+ },
+ // 淇敼鎸夐挳
+ edit(operation, row) {
+ if (parseFloat(row.qty) === parseFloat(row.relse_qty) || row.status === 'CLOSED') {
+ return this.$message.info('姝ゅ伐鍗曞凡鍏ㄩ儴涓嬭揪锛�')
+ }
+
+ this.operation = operation
+ this.dialogVisible = true
+
+ this.$nextTick(() => {
+ this.dialogForm.sbid = row.sbid
+ this.dialogForm.erporderid = row.id
+ this.dialogForm.erpordercode = row.wo
+ this.dialogForm.saleordercode = row.saleOrderCode
+
+ this.dialogForm.partcode = row.partcode
+ this.dialogForm.partname = row.partname
+ this.dialogForm.partspec = row.partspec
+
+ this.dialogForm.wkshopcode = row.wkshp_code
+ this.dialogForm.wkshopname = row.wkshp_name
+
+ this.dialogForm.warehousecode = row.stck_code
+ this.dialogForm.warehousename = row.stck_name
+
+ this.dialogForm.saleOrderDeliveryDate = row.saleOrderDeliveryDate
+
+ this.dialogForm.erpqty = row.qty
+ this.dialogForm.markqty = parseFloat(row.qty) - parseFloat(row.relse_qty)
+ this.dialogForm.ordernum = 1
+ this.dialogForm.relse_qty = row.relse_qty
+ this.dialogForm.clerkuser = row.clerkuser
+
+ this.dialogForm.paystartdate = row.planstartdate
+ this.dialogForm.payenddate = row.planenddate
+ })
+ },
+ // 瀵硅瘽妗嗗叧闂簨浠�
+ handleClose() {
+ this.dialogForm = {
+ erporderid: '', // 璁㈠崟id
+ sbid: '', // 璁㈠崟鏄庣粏id
+ erpordercode: '', // 璁㈠崟缂栧彿
+ saleordercode: '', // 閿�鍞鍗�
+
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+
+ wkshopcode: '', // 杞﹂棿缂栫爜
+ wkshopname: '', // 杞﹂棿鍚嶇О
+
+ warehousecode: '', // 浠撳簱缂栫爜
+ warehousename: '', // 浠撳簱鍚嶇О
+
+ erpqty: '', // 璁㈠崟鏁伴噺
+ markqty: '', // 涓嬪崟鏁伴噺
+ ordernum: '', // 涓嬪崟鍗曟暟
+ relse_qty: '', // 宸蹭笅鍗曟暟閲�
+
+ payenddate: '', // 棰勮瀹屽伐鏃ユ湡
+ paystartdate: '', // 棰勮寮�宸ユ棩鏈�
+
+ saleOrderDeliveryDate: '' // 棰勮浜や粯鏃ユ湡
+ }
+ this.$refs.dialogForm.clearValidate()
+ },
+ // 瀵硅瘽妗嗗彇娑�
+ dialogVisibleCancel() {
+ this.dialogVisible = false
+ },
+ // 瀵硅瘽妗嗙‘璁�
+ dialogVisibleConfirm() {
+ this.dialogForm.markqty = parseFloat(this.dialogForm.markqty)
+ this.dialogForm.erpqty = parseFloat(this.dialogForm.erpqty)
+ this.dialogForm.relse_qty = parseFloat(this.dialogForm.relse_qty)
+ this.dialogForm.ordernum = parseFloat(this.dialogForm.ordernum)
+ if (this.dialogForm.markqty < 1 || this.dialogForm.markqty > this.dialogForm.erpqty - this.dialogForm.relse_qty) {
+ return this.$message.info('涓嬪崟鏁伴噺瓒呭嚭鍙笅鍗曟暟鐨勮寖鍥达紒')
+ }
+
+ if (this.dialogForm.ordernum < 1 || this.dialogForm.ordernum > this.dialogForm.markqty) {
+ return this.$message.info('涓嬪崟鍗曟暟瓒呭嚭鍙笅鍗曞崟鏁扮殑鑼冨洿锛�')
+ }
+
+ this.$refs.dialogForm.validate(valid => {
+ if (valid) {
+ this.$store.state.app.buttonIsDisabled = true
+ const data = {
+ 'sbid': this.dialogForm.sbid,
+ 'erporderid': this.dialogForm.erporderid,
+ 'erpordercode': this.dialogForm.erpordercode,
+ 'saleordercode': this.dialogForm.saleordercode,
+ 'partcode': this.dialogForm.partcode,
+ 'wkshopcode': this.dialogForm.wkshopcode,
+ 'warehousecode': this.dialogForm.warehousecode,
+ 'clerkuser': this.dialogForm.clerkuser,
+ 'erpqty': this.dialogForm.erpqty,
+ 'markqty': this.dialogForm.markqty,
+ 'ordernum': this.dialogForm.ordernum,
+ 'payenddate': this.dialogForm.payenddate,
+ 'paystartdate': this.dialogForm.paystartdate,
+ 'relse_qty': this.dialogForm.relse_qty,
+ 'saleOrderDeliveryDate': handleDatetime(this.dialogForm.saleOrderDeliveryDate) + ' 00:00:00'
+ }
+
+ MarkSaveErpOrder(data).then(res => {
+ if (res.code === '200') {
+ this.dialogVisible = false
+ this.$message.success('涓嬭揪鎴愬姛锛�')
+ this.getErpOrderSearch()
+ this.$store.state.app.buttonIsDisabled = false
+ } else {
+ this.$message.error('涓嬭揪澶辫触锛�')
+ }
+ })
+ }
+ })
+ },
+ // 鑾峰彇椤甸潰楂樺害
+ getHeight() {
+ this.$nextTick(() => {
+ this.mainHeight = window.innerHeight - 85
+ this.tableHeight = this.mainHeight - 250
+
+ this.$refs.tableDataRef.doLayout()
+ })
+ },
+ tableRowClassName({ row, rowIndex }) {
+ return 'custom-row'
+ },
+ getSummaries(param) {
+ const { columns, data } = param
+ const sums = []
+ const i = 7
+ columns.forEach((column, index) => {
+ if (index === i) {
+ sums[index] = '鎬绘暟'
+ return
+ }
+ const values = data.map(item => Number(item[column.property]))
+ if (column.property === 'qty') {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr)
+ if (!isNaN(value)) {
+ return prev + curr
+ // return Math.round(prev * 100) / 100 + Math.round(curr * 100) / 100
+ }
+ }, 0)
+
+ sums[index] += ' 鍗�'
+ }
+ if (column.property === 'relse_qty') {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr)
+ if (!isNaN(value)) {
+ return prev + curr
+ // return Math.round(prev * 100) / 100 + Math.round(curr * 100) / 100
+ }
+ }, 0)
+
+ sums[index] += ' 鍗�'
+ }
+ })
+
+ this.$nextTick(() => {
+ this.$refs.tableDataRef.doLayout()
+ })
+ return sums
+ }
+ }
+}
+</script>
+
+<!--鍏叡椤甸潰鏍峰紡-->
+<style lang="scss" scoped>
+$main_color: #42b983;
+
+::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;
+}
+
+.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 .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;
+}
+
+.userDialogVisible ::v-deep .el-form-item {
+ margin-bottom: 0;
+}
+
+.elTableDiv {
+ ::v-deep .el-radio__label {
+ display: none;
+ }
+}
+
+.tableFixed {
+ ::v-deep .el-table__fixed-right {
+ height: 100% !important;
+ }
+
+ ::v-deep .el-table__fixed {
+ height: 100% !important;
+ }
+}
+
+.dateMini {
+ ::v-deep .el-input__inner {
+ line-height: 34px;
+ height: 34px;
+ width: 200px;
+ display: flex;
+ font-size: 14px !important;
+ align-items: center !important;
+ }
+
+ ::v-deep .el-input__prefix {
+ margin-top: -3px;
+ }
+}
+
+::v-deep .el-icon-delete {
+ cursor: pointer;
+ margin-right: 0px !important;
+}
+</style>
+<style>
+.el-table .custom-row {
+ background: #f8f8fa;
+}
+
+.osloading {
+ font-size: 26px !important;
+}
+
+.el-loading-text {
+ font-size: 26px !important;
+}
+
+.el-picker-panel__footer {
+ display: flex !important;
+ justify-content: flex-end !important;
+}
+
+</style>
+
diff --git a/src/views/workOrder/workOrderClose.vue b/src/views/workOrder/workOrderClose.vue
index 137e39e..3812729 100644
--- a/src/views/workOrder/workOrderClose.vue
+++ b/src/views/workOrder/workOrderClose.vue
@@ -1,3443 +1,3507 @@
-<template>
- <div>
- <div class="body" :style="{height:mainHeight+'px'}">
-
- <div class="bodyTopButtonGroup">
- <el-button v-waves icon="el-icon-switch-button" type="success" @click="orderClose()">宸ュ崟鍏抽棴</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.wkshopcode"
- filterable
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in wkshopcodeArr"
- :key="item.torg_code"
- :label="item.torg_name"
- :value="item.torg_code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">
- <el-select
- v-model="form.mesorderstus"
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- filterable
- @change="erporderstusChange"
- >
- <el-option
- v-for="item in erporderstusArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
- <el-input v-model="form.mesordercode" placeholder="璇疯緭鍏�" style="width: 200px" />
- </el-form-item>
- <el-form-item label="婧愬崟鍗曞彿" style="display: flex;">
- <el-input v-model="form.sourceorder" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="閿�鍞鍗�" style="display: flex;">
- <el-input v-model="form.saleordercode" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="鍗曟嵁绫诲瀷" style=" display: flex;">
- <el-select
- v-model="form.ordertype"
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <!-- @change="mesordertypeChange"-->
- <el-option
- v-for="item in ordertypeArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="浜у搧缂栫爜" style=" display: flex;">
- <el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
- <el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="浜у搧瑙勬牸" style=" display: flex;">
- <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="鍒涘缓浜哄憳" style=" display: flex;">
- <el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="鍒涘缓鏃堕棿" style=" display: flex;">
- <!-- <el-date-picker-->
- <!-- v-model="form.createdate"-->
- <!-- type="daterange"-->
- <!-- :clearable="false"-->
- <!-- range-separator="~"-->
- <!-- start-placeholder="寮�濮嬫棩鏈�"-->
- <!-- end-placeholder="缁撴潫鏃ユ湡"-->
- <!-- size="mini"-->
- <!-- />-->
- <el-date-picker
- v-model="form.createdate"
- type="date"
- size="mini"
- :clearable="false"
- class="dateMini"
- format="yyyy-MM-dd"
- 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+80)+'px'"
- border
- :row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px'}"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- @sort-change="sortChange"
- @row-click="rowClick"
- @selection-change="handleSelectionChange"
- >
- <el-table-column
- type="selection"
- width="50"
- :selectable="selected"
- />
- <el-table-column
- prop="rowNum"
- width="50"
- label="搴忓彿"
- fixed
- />
- <el-table-column
- prop="status"
- label="宸ュ崟鐘舵��"
- sortable="custom"
- width="110"
- show-tooltip-when-overflow
- >
- <template slot-scope="{row}">
- <div v-if="row.status==='NEW'">鏂板伐鍗�</div>
- <!-- <div v-if="row.status==='CREATING'">鎵ц涓�</div>-->
- <!-- <div v-if="row.status==='CREATED'">宸插叧闂�</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==='NOCLOSED'">鏈叧闂�</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="宸ュ崟缂栧彿"
- show-tooltip-when-overflow
- sortable="custom"
- min-width="160"
- />
- <el-table-column
- prop="m_po"
- label="婧愬崟鍗曞彿"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="160"
- >
- <template slot-scope="{row}">
- <div v-if="row.m_po">{{ row.m_po }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="saleOrderCode"
- label="閿�鍞鍗�"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="160"
- >
- <template slot-scope="{row}">
- <div v-if="row.saleOrderCode">{{ row.saleOrderCode }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="wotype"
- label="鍗曟嵁绫诲瀷"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="120"
- >
- <template slot-scope="{row}">
- <div v-if="row.wotype==='PO'">鏍囧噯宸ュ崟</div>
- <div v-else-if="row.wotype==='FO'">鎶ュ簾琛ュ崟</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="partcode"
- label="浜у搧缂栫爜"
- show-tooltip-when-overflow
- sortable="custom"
- min-width="120"
- />
- <el-table-column
- prop="partname"
- min-width="150"
- label="浜у搧鍚嶇О"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <el-table-column
- prop="partspec"
- label="浜у搧瑙勬牸"
- sortable="custom"
- width="110"
- show-tooltip-when-overflow
- >
- <template slot-scope="{row}">
- <div v-if="row.partspec">{{ row.partspec }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="plan_qty"
- label="宸ュ崟鏁�"
- sortable="custom"
- show-tooltip-when-overflow
- width="100"
- />
- <el-table-column
- prop="wkshp_name"
- label="鐢熶骇杞﹂棿"
- show-tooltip-when-overflow
- sortable="custom"
- width="120"
- >
- <template slot-scope="{row}">
- <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="saleOrderDeliveryDate"
- label="棰勮浜や粯鏃ユ湡"
- sortable="custom"
- width="130"
- >
- <template slot-scope="{row}">
- <div v-if="row.saleOrderDeliveryDate">{{ row.saleOrderDeliveryDate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- prop="data_sources"-->
- <!-- show-tooltip-when-overflow-->
- <!-- label="鏁版嵁鏉ユ簮"-->
- <!-- sortable="custom"-->
- <!-- width="120"-->
- <!-- />-->
-
- <el-table-column
- prop="lm_user"
- show-tooltip-when-overflow
- label="鍒涘缓浜哄憳"
- sortable="custom"
- width="120"
- />
- <el-table-column
- prop="lm_date"
- label="鍒涘缓鏃堕棿"
- show-tooltip-when-overflow
- width="160"
- sortable="custom"
- />
- <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"-->
- <!-- :style="{color:$store.state.settings.theme}"-->
- <!-- @click.stop="edit('edit',row)"-->
- <!-- />-->
- <!-- </el-tooltip>-->
-
- <!-- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">-->
- <!-- <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click.stop="del(row)" />-->
- <!-- </el-tooltip>-->
-
- <!-- <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-->
- <!-- :style="{color:$store.state.settings.theme}"-->
- <!-- class="el-icon-printer"-->
- <!-- style="cursor: pointer;margin-right: 15px"-->
- <!-- @click.stop="handlePrint(row.wo_code)"-->
- <!-- />-->
- <!-- </el-tooltip>-->
-
- <el-tooltip class="item" effect="dark" content="璇︽儏" placement="top">
- <i
- class="el-icon-view"
- style="cursor: pointer;"
- :style="{color:$store.state.settings.theme}"
- @click.stop="edit('view',row)"
- />
- </el-tooltip>
-
- <el-tooltip class="item" effect="dark" content="宸ュ崟鍏抽棴" placement="top">
- <i
- class="el-icon-switch-button"
- style="cursor: pointer;margin-left: 15px"
- :style="{color:$store.state.settings.theme}"
- @click.stop="orderClose(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,jumper"
- popper-class="select_bottom"
- @pagination="getMesOrderClosedSearch"
- />
-
- <!-- <div class="elTableDiv">-->
- <!-- <el-table-->
- <!-- :data="tableDataDetail"-->
- <!-- border-->
- <!-- height="210px"-->
- <!-- :row-class-name="tableRowClassName"-->
- <!-- highlight-current-row-->
- <!-- :header-cell-style="this.$headerCellStyle"-->
- <!-- :cell-style="this.$cellStyle"-->
- <!-- >-->
- <!-- <!– <el-table-column–>-->
- <!-- <!– width="50"–>-->
- <!-- <!– type="index"–>-->
- <!-- <!– prop="搴忓彿"–>-->
- <!-- <!– fixed–>-->
- <!-- <!– /> –>-->
- <!-- <el-table-column-->
- <!-- width="50"-->
- <!-- prop="seq"-->
- <!-- label="搴忓彿"-->
- <!-- fixed-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- prop="wo_code"-->
- <!-- show-tooltip-when-overflow-->
- <!-- label="宸ュ崟缂栧彿"-->
- <!-- width="160"-->
- <!-- />-->
-
- <!-- <!– <el-table-column–>-->
- <!-- <!– prop="partcode"–>-->
- <!-- <!– label="浜у搧缂栫爜"–>-->
- <!-- <!– width="150"–>-->
- <!-- <!– show-tooltip-when-overflow–>-->
- <!-- <!– />–>-->
- <!-- <!– <el-table-column–>-->
- <!-- <!– prop="partname"–>-->
- <!-- <!– label="浜у搧鍚嶇О"–>-->
- <!-- <!– width="200"–>-->
- <!-- <!– show-tooltip-when-overflow–>-->
- <!-- <!– />–>-->
-
- <!-- <el-table-column-->
- <!-- label="宸ュ簭缂栫爜"-->
- <!-- prop="step_code"-->
- <!-- show-tooltip-when-overflow-->
- <!-- width="150"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="宸ュ簭鍚嶇О"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="stepname"-->
- <!-- width="150"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="宸茬敓浜ф暟閲�"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="produceq_qty"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="鍚堟牸鏁伴噺"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="good_qty"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="涓嶈壇鏁伴噺"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="ng_qty"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="宸ュ簾鏁伴噺"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="laborbad_qty"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="鏂欏簾鏁伴噺"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="materielbad_qty"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="寰呬骇鏁伴噺"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="delive_qty"-->
- <!-- />-->
- <!-- <!– <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–>-->
- <!-- <!– v-if="tableDataDetail.length!==row.seq"–>-->
- <!-- <!– class="el-icon-printer"–>-->
- <!-- <!– :style="{color:$store.state.settings.theme}"–>-->
- <!-- <!– style="cursor: pointer;margin-right: 15px"–>-->
- <!-- <!– @click="supplementSmallClick(row)"–>-->
- <!-- <!– />–>-->
- <!-- <!– </el-tooltip>–>-->
- <!-- <!– <el-tooltip class="item" effect="dark" content="琛ユ墦鐢熶骇鍏ュ簱鏉$爜" placement="top">–>-->
- <!-- <!– <i–>-->
- <!-- <!– v-if="tableDataDetail.length===row.seq"–>-->
- <!-- <!– class=" el-icon-camera"–>-->
- <!-- <!– :style="{color:$store.state.settings.theme}"–>-->
- <!-- <!– style="cursor: pointer;margin-right: 15px"–>-->
- <!-- <!– @click="getProductInHouseLabCode(row.wo_code)"–>-->
- <!-- <!– />–>-->
- <!-- <!– </el-tooltip>–>-->
- <!-- <!– </div>–>-->
- <!-- <!– </template>–>-->
- <!-- <!– </el-table-column>–>-->
- <!-- </el-table>-->
- <!-- </div>-->
- </div>
- <!--鏂板娲惧彂瀵硅瘽妗�-->
- <el-dialog
- v-el-drag-dialog
- :title="operation==='add'?'鏂板':'娲惧彂'"
- :visible.sync="dialogVisible"
- width="1200px"
- top="8vh"
- :close-on-click-modal="false"
- @closed="handleClose"
- @close="handleClose"
- >
- <el-form
- ref="dialogForm"
- inline
- :rules="dialogFormRules"
- :model="dialogForm"
- label-width="110px"
- >
-
- <el-divider content-position="left">鍩烘湰淇℃伅</el-divider>
-
- <el-form-item
- label="宸ュ崟鐘舵��"
- prop="mesorderstus"
- >
- <el-select
- v-model="dialogForm.mesorderstus"
- disabled
- filterable
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in erporderstusArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
-
- <el-form-item label="宸ュ崟缂栧彿" prop="mesordercode">
- <!-- <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px" />-->
- <el-input v-model="dialogForm.mesordercode" disabled style="width: 200px" />
- </el-form-item>
- <!-- <div style="display: flex">-->
- <el-form-item label="宸ュ崟绫诲瀷" prop="mesorderstus">
- <el-select
- v-model="dialogForm.ordertype"
- :popper-append-to-body="false"
- style="width: 200px"
- :disabled="operation!=='add'"
- placeholder="璇烽�夋嫨"
- @change="mesordertypeChange"
- >
- <el-option
- v-for="item in ordertypeArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <!-- <div style="display: flex;flex-wrap: nowrap">-->
- <el-form-item label="婧愬崟鍗曞彿">
- <el-input
- v-model="dialogForm.sourceorder"
- :disabled="dialogForm.ordertype==='PO'"
- style="width: 200px"
- >
- <el-button
- slot="append"
- icon="el-icon-search"
- :disabled="operation!=='add'||dialogForm.ordertype==='PO'"
- @click="mesordertsourcesearchclick"
- />
- </el-input>
- </el-form-item>
- <!-- <el-button-->
- <!-- v-waves-->
- <!-- type="primary"-->
- <!-- style="padding: 0 10px;margin-left: -8px;margin-top: 3px"-->
- <!-- class="el-icon-search"-->
- <!-- :disabled="operation!=='add'||dialogForm.ordertype==='PO'"-->
- <!-- @click="mesordertsourcesearchclick"-->
- <!-- />-->
- <!-- </div>-->
- <!-- </div>-->
- <el-form-item label="宸ュ崟鏁伴噺" prop="mesqty">
- <el-input
- v-model="dialogForm.mesqty"
- oninput="value=value.replace(/[^\d]/g,'')"
- style="width: 200px"
- />
- <!-- oninput="value=value.replace(/[^0-9*.{1}0-9*]/g,'')"-->
- </el-form-item>
- <el-form-item
- label="浜у搧鍚嶇О/缂栫爜"
- prop="partcode"
- >
- <el-select
- v-model="dialogForm.partcode"
- filterable
- :disabled="operation!=='add'"
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- @change="partcodeChangeDialog"
- >
- <el-option
- v-for="item in partArr"
- :key="item.partcode"
- :label="item.partname+'/'+item.partcode"
- :value="item.partcode"
- />
- </el-select>
- </el-form-item>
- <!-- <el-form-item v-if="operation!=='add'" label="浜у搧鍚嶇О" prop="partname">-->
- <!-- <el-input v-model="dialogForm.partname" disabled style="width: 200px" />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item v-if="operation!=='add'" label="浜у搧缂栫爜">-->
- <!-- <el-input v-model="dialogForm.partcode" disabled style="width: 200px" />-->
- <!-- </el-form-item>-->
- <el-form-item label="浜у搧瑙勬牸" prop="partspec">
- <el-input v-model="dialogForm.partspec" disabled style="width: 200px" />
- </el-form-item>
- <!-- :disabled="dialogForm.partcode===''"-->
- <el-form-item label="鎵�灞炶溅闂�" prop="wkshopcode">
- <el-select
- v-model="dialogForm.wkshopcode"
- filterable
- :popper-append-to-body="false"
- style="width: 200px;"
- placeholder="璇烽�夋嫨杞﹂棿"
- >
- <el-option
- v-for="item in wkshopArr"
- :key="item.torg_code"
- :label="item.torg_name"
- :value="item.torg_code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="棰勮浜や粯鏃ユ湡" prop="deliverydate">
- <el-date-picker
- v-model="dialogForm.deliverydate"
- type="date"
- size="mini"
- :clearable="false"
- class="dateMini"
- :picker-options="pickerOptions"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- />
- <!-- :disabled="dialogForm.deliverydate"-->
- </el-form-item>
-
- <el-divider content-position="left">宸ュ簭淇℃伅</el-divider>
-
- <div style="display: flex;align-items: center">
- <!-- <div style="font-weight: bolder">宸ュ簭閫夋嫨锛�</div>-->
- <!-- <el-drag-select-->
- <!-- v-model="stepSelectedValue"-->
- <!-- style="width:930px;"-->
- <!-- multiple-->
- <!-- placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"-->
- <!-- @change="stepSelectedValueChange"-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="item in stepSelectArr"-->
- <!-- :key="item.stepcode"-->
- <!-- :label="item.stepname"-->
- <!-- :value="item.stepcode"-->
- <!-- />-->
- <!-- </el-drag-select>-->
- </div>
-
- <el-table
- ref="stepTableDataRef"
- :data="stepTableData"
- border
- :row-class-name="tableRowClassName"
- height="300"
- style="width: 100%;margin-top: 15px;"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- row-key="stepcode"
- >
- <el-table-column
- type="index"
- label="搴忓彿"
- width="50"
- />
- <!-- <el-table-column-->
- <!-- prop="stepcode"-->
- <!-- show-tooltip-when-overflow-->
- <!-- label="宸ュ簭缂栫爜"-->
- <!-- />-->
- <el-table-column
- prop="stepname"
- label="宸ュ簭鍚嶇О"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="stepprice"
- label="鐢熶骇鍗曚环"
- show-tooltip-when-overflow
- >
- <!-- <template slot-scope="{row}">-->
- <!-- <el-input-->
- <!-- v-model="row.stepprice"-->
- <!-- placeholder="璇疯緭鍏ュ伐搴忓崟浠�"-->
- <!-- oninput="value=value.replace(/[^0-9.]/g,'')"-->
- <!-- style="width: 100%"-->
- <!-- @click.stop=""-->
- <!-- />-->
- <!-- </template>-->
- </el-table-column>
- <el-table-column
- prop="produceq_qty"
- label="宸茬敓鎴愭暟閲�"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="good_qty"
- label="鍚堟牸鏁伴噺"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="ng_qty"
- label="涓嶈壇鏁伴噺"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="laborbad_qty"
- label="宸ュ簾鏁伴噺"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="materielbad_qty"
- label="鏂欏簾鏁伴噺"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="delive_qty"
- label="寰呬骇鏁伴噺"
- show-tooltip-when-overflow
- />
- <!-- <el-table-column-->
- <!-- label="鎿嶄綔"-->
- <!-- width="120"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div class="operationClass">-->
- <!-- <!– <el-tooltip class="item" effect="dark" content="绉诲姩" placement="top">–>-->
- <!-- <i-->
- <!-- class="el-icon-rank"-->
- <!-- :style="{color:$store.state.settings.theme}"-->
- <!-- style="cursor: move"-->
- <!-- />-->
- <!-- <!– </el-tooltip>–>-->
- <!-- <!– @click="edit('edit',row)"–>-->
-
- <!-- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">-->
- <!-- <i-->
- <!-- class="el-icon-delete"-->
- <!-- :style="{color:$store.state.settings.theme}"-->
- <!-- style="margin-left: 15px;"-->
- <!-- @click="stepDel(row)"-->
- <!-- />-->
- <!-- </el-tooltip>-->
- <!-- </div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- </el-table>
-
- </el-form>
-
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">棰勮</el-button>-->
- <el-button
- v-if="operation!=='view'"
- v-waves
- type="primary"
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- @click="dialogVisibleConfirm"
- >纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!-- 宸ュ簭浠诲姟瀵硅瘽妗�-->
- <el-dialog
- v-el-drag-dialog
- title="宸ュ簭浠诲姟"
- :visible.sync="dialogVisibleTask"
- width="840px"
- top="15vh"
- class="dialogVisibleSearch"
- :close-on-click-modal="false"
- @close="dialogVisibleTaskClose"
- >
- <el-button
- v-waves
- style="margin-bottom: 15px"
- type="primary"
- @click="supplementClick"
- >琛ユ墦
- </el-button>
- <el-table
- :data="taskTableData"
- border
- :row-class-name="tableRowClassName"
- height="300"
- style="width: 100%;"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- >
- <el-table-column
- prop="seq"
- width="50"
- label="搴忓彿"
- fixed
- />
- <el-table-column
- prop="wo_code"
- show-tooltip-when-overflow
- label="宸ュ崟缂栧彿"
- width="200"
- />
- <el-table-column
- prop="stepcode"
- label="宸ュ簭缂栫爜"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="stepname"
- show-tooltip-when-overflow
- label="宸ュ簭鍚嶇О"
- />
- <!-- <el-table-column-->
- <!-- prop="flwtype"-->
- <!-- label="宸ュ簭绫诲瀷"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.flwtype==='W'">澶栧崗</div>-->
- <!-- <div v-if="row.flwtype==='Z'">鑷埗</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- prop="descr"-->
- <!-- label="宸ュ簭鎻忚堪"-->
- <!-- />-->
- <el-table-column
- prop="plan_qty"
- show-tooltip-when-overflow
- label="浠诲姟鏁伴噺"
- />
- <el-table-column
- prop="good_qty"
- show-tooltip-when-overflow
- label="鍚堟牸鏁伴噺"
- />
- <el-table-column
- prop="ng_qty"
- show-tooltip-when-overflow
- label="涓嶈壇鏁伴噺"
- />
- <el-table-column
- label="鎿嶄綔"
- fixed="right"
- >
- <template slot-scope="{row}">
- <el-button v-waves type="text" style="padding: 0;" @click="supplementSmallClick(row)">琛ユ墦</el-button>
- </template>
- </el-table-column>
- </el-table>
-
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleBack">杩� 鍥�</el-button>
- <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
- </div>
- </span>
- </el-dialog>
-
- <!-- 婧愬崟鍗曞彿瀵硅瘽妗�-->
- <el-dialog
- v-el-drag-dialog
- title="婧愬崟鍗曞彿"
- :visible.sync="dialogVisibleSource"
- width="1200px"
- top="10vh"
- class="dialogVisibleSearch"
- :close-on-click-modal="false"
- @close="dialogVisibleSourceClose"
- >
- <div class="bodyTopFormGroup">
- <el-form
- ref="sourceForm"
- :model="sourceForm"
- label-width="100px"
- inline
- style="display: flex;justify-content: space-between"
- >
- <div class="elForm" style="justify-content: flex-start">
- <!-- <el-form-item-->
- <!-- label="棰勮寮�宸ユ椂闂�"-->
- <!-- label-width="100px"-->
- <!-- style=" display: flex;font-size: 14px;margin-top: 3px"-->
- <!-- >-->
- <!-- <el-date-picker-->
- <!-- v-model="sourceForm.paystartdate"-->
- <!-- type="daterange"-->
- <!-- range-separator="~"-->
- <!-- class="timeMini"-->
- <!-- size="mini"-->
- <!-- style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"-->
- <!-- :clearable="false"-->
- <!-- start-placeholder="寮�濮嬫棩鏈�"-->
- <!-- end-placeholder="缁撴潫鏃ユ湡"-->
- <!-- />-->
- <!-- <!– :picker-options="expireTimeOption"–>-->
-
- <!-- </el-form-item>-->
- <!-- <el-form-item-->
- <!-- label="棰勮瀹屽伐鏃堕棿"-->
- <!-- label-width="100px"-->
- <!-- style=" display: flex;font-size: 14px;margin-top: 3px"-->
- <!-- >-->
- <!-- <el-date-picker-->
- <!-- v-model="sourceForm.payenddate"-->
- <!-- type="daterange"-->
- <!-- :clearable="false"-->
- <!-- class="timeMini"-->
- <!-- range-separator="~"-->
- <!-- start-placeholder="寮�濮嬫棩鏈�"-->
- <!-- style="width: 200px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;"-->
- <!-- end-placeholder="缁撴潫鏃ユ湡"-->
- <!-- size="mini"-->
- <!-- />-->
- <!-- </el-form-item>-->
- <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">
- <el-select
- v-model="sourceForm.mesordercode"
- filterable
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in erporderstusArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
- <el-input v-model="sourceForm.sourceorder" placeholder="璇疯緭鍏�" style="width: 200px" />
- </el-form-item>
- <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
- <el-input v-model="sourceForm.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
-
- <el-form-item v-show="isExpandDialog" label="浜у搧鍚嶇О" style=" display: flex;">
- <el-input v-model="sourceForm.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandDialog" label="浜у搧瑙勬牸" style=" display: flex;">
- <el-input v-model="sourceForm.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandDialog" label="鍒涘缓浜哄憳" style=" display: flex;">
- <el-input v-model="sourceForm.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
-
- <el-form-item
- v-show="isExpandDialog"
- label="鍒涘缓鏃堕棿"
- label-width="100px"
- style=" display: flex;font-size: 14px;margin-top: 3px"
- >
- <el-date-picker
- v-model="sourceForm.createdate"
- type="daterange"
- range-separator="~"
- class="timeMini"
- size="mini"
- style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"
- :clearable="false"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡"
- />
- <!-- :picker-options="expireTimeOption"-->
-
- </el-form-item>
-
- </div>
-
- <div style="display: flex;align-items: start;margin-top: 3px;z-index: 2;justify-content: end">
- <el-button v-waves type="primary" icon="el-icon-search" @click="sourceSearch">鏌ヨ</el-button>
- <el-button v-waves type="info" icon="el-icon-refresh" @click="sourceReset">閲嶇疆</el-button>
- </div>
-
- </el-form>
- <div
- class="bodyTopFormExpand"
- >
- <svg-icon
- v-show="mouseHoverTypeDialog==='mouseout'"
- style="cursor: pointer"
- :icon-class="!isExpandDialog?'doubleDown3':'doubleUp3'"
- @mouseenter="mouseHoverTypeDialog=$event.type"
- />
- <svg-icon
- v-show="mouseHoverTypeDialog==='mouseenter'"
- style="cursor: pointer"
- :icon-class="!isExpandDialog?'doubleDown':'doubleUp'"
- @click="isExpandDialog=!isExpandDialog"
- @mouseout="mouseHoverTypeDialog=$event.type"
- />
- </div>
- </div>
-
- <div class="elTableDiv">
- <el-table
- :data="sourceTableData"
- :height="isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px'"
- border
- :row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px',}"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- @sort-change="sourceSortChange"
- @row-click="getCurrentRowSource"
- >
- <!-- <el-table-column-->
- <!-- type="selection"-->
- <!-- width="50"-->
- <!-- />-->
- <el-table-column
- width="50"
- fixed
- >
- <template slot-scope="{row}">
- <el-radio
- v-model="radioSelectedId"
- :label="row.id"
- style="color: transparent;padding-left: 10px;"
- />
- <!-- @change.native="getCurrentRowSource(row.id)"-->
- </template>
- </el-table-column>
- <el-table-column
- prop="RowNum"
- width="50"
- fixed
- label="搴忓彿"
- />
- <!-- <el-table-column-->
- <!-- prop="status"-->
- <!-- label="宸ュ崟鐘舵��"-->
- <!-- show-tooltip-when-overflow-->
- <!-- sortable="custom"-->
- <!-- width="110"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.status==='NEW'">鏂拌鍗�</div>-->
- <!-- <div v-if="row.status==='CREATING'">閮ㄥ垎涓嬭揪</div>-->
- <!-- <div v-if="row.status==='CREATED'">鍏ㄩ儴涓嬭揪</div>-->
- <!-- <div v-if="row.status==='CLOSED'">宸插叧闂�</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- label="宸ュ崟缂栧彿"
- prop="wo_code"
- show-tooltip-when-overflow
- min-width="150"
- sortable="custom"
- >
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.m_po">{{ row.m_po }}</div>-->
- <!-- <div v-else>{{ row.wo_code }}</div>-->
- <!-- </template>-->
- </el-table-column>
- <el-table-column
- prop="partcode"
- label="浜у搧缂栫爜"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="150"
- />
- <el-table-column
- prop="partname"
- label="浜у搧鍚嶇О"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="150"
- />
- <el-table-column
- prop="partspec"
- label="浜у搧瑙勬牸"
- show-tooltip-when-overflow
- sortable="custom"
- min-width="110"
- >
- <template slot-scope="{row}">
- <div v-if="row.partspec">{{ row.partspec }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="plan_qty"
- label="浠诲姟鏁伴噺"
- width="150"
- show-tooltip-when-overflow
- sortable="custom"
- />
-
- <el-table-column
- prop="bad_qty"
- label="鎶ュ簾鏁伴噺"
- width="150"
- show-tooltip-when-overflow
- sortable="custom"
- />
-
- <!-- <el-table-column-->
- <!-- prop="relse_qty"-->
- <!-- show-tooltip-when-overflow-->
- <!-- label="宸蹭笅鍗曟暟閲�"-->
- <!-- width="150"-->
- <!-- sortable="custom"-->
- <!-- />-->
- <el-table-column
- prop="wkshp_name"
- label="鐢熶骇杞﹂棿"
- show-tooltip-when-overflow
- sortable="custom"
- width="150"
- >
- <template slot-scope="{row}">
- <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="plan_startdate"
- label="棰勮寮�宸ユ椂闂�"
- show-tooltip-when-overflow
- sortable="custom"
- width="130"
- >
- <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
- sortable="custom"
- width="130"
- >
- <template slot-scope="{row}">
- <div v-if="row.plan_enddate">{{ row.plan_enddate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="lm_user"
- label="鍒涘缓浜哄憳"
- show-tooltip-when-overflow
- sortable="custom"
- width="150"
- >
- <template slot-scope="{row}">
- <div v-if="row.lm_user">{{ row.lm_user }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="lm_date"
- label="鍒涘缓鏃堕棿"
- show-tooltip-when-overflow
- width="130"
- 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-->
- <!-- label="鎿嶄綔"-->
- <!-- fixed="right"-->
- <!-- width="80"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div class="operationClass">-->
- <!-- <el-tooltip class="item" effect="dark" content="涓嬭揪" placement="top">-->
- <!-- <!– <el-button v-waves type="text" @click="edit('edit',row)">涓嬭揪</el-button>–>-->
- <!-- <i-->
- <!-- class="el-icon-bottom"-->
- <!-- style="color:#42b983;cursor: pointer;margin-left: 5px"-->
- <!-- @click="edit('edit',row)"-->
- <!-- />-->
- <!-- </el-tooltip>-->
- <!-- </div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- </el-table>
- </div>
- <!--鍒嗛〉-->
- <pagination
- :total="sourceFormTotal"
- :page.sync="sourceForm.page"
- :limit.sync="sourceForm.rows"
- align="right"
- layout="total,prev, pager, next,sizes"
- popper-class="select_bottom"
- @pagination="getMesBadOrderSearch"
- />
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleSourceBack">杩� 鍥�</el-button>
- <el-button v-waves type="primary" @click="dialogVisibleSourceConfirm">纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!--鎵撳嵃棰勮瀵硅瘽妗� 澶ф爣绛�-->
- <el-dialog
- v-el-drag-dialog
- title=""
- :visible.sync="dialogVisibleApprove"
- width="812px"
- class="dialogVisibleConfirmClass"
- append-to-body
- :close-on-click-modal="false"
- @close="dialogVisibleConfirmClose"
- >
- <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
- <div id="printMe" style="padding: 30px">
- <div style="font-size: 26px; text-align: center">娴佺▼鍗�</div>
-
- <div style="display: flex;justify-content: space-around;margin-top: 20px; position: relative;">
- <div style="width: 78%">
- <el-form
- ref="formApprove"
- :model="formApprove"
- label-width="80px"
- inline
- style="display: flex;justify-content: space-between"
- >
- <div class="elForm">
- <el-form-item label="宸ュ崟缂栧彿:" class="formContent">
- {{ formApprove.mesordercode }}
- </el-form-item>
- <el-form-item label="婧愬崟鍗曞彿:" class="formContent">
- {{ formApprove.m_po }}
- </el-form-item>
- <el-form-item label="浜у搧缂栫爜:" class="formContent">
- {{ formApprove.partcode }}
- </el-form-item>
- <el-form-item label="浜у搧鍚嶇О:" class="formContent">
- {{ formApprove.partname }}
- </el-form-item>
- <el-form-item label="浜у搧瑙勬牸:" class="formContent">
- {{ formApprove.partspec }}
- </el-form-item>
- <el-form-item label="宸ュ崟鏁伴噺:" class="formContent">
- {{ formApprove.plan_qty }}
- </el-form-item>
- <!-- <el-form-item label="宸ヨ壓璺嚎:" class="formContent">-->
- <!-- {{ formApprove.routename }}-->
- <!-- </el-form-item>-->
- <el-form-item label="鎵撳嵃浜哄憳:" class="formContent">
- <!-- {{ localStorage.getItem('username') }}-->
- {{ formApprove.routename }}
- </el-form-item>
- <el-form-item label="鎵撳嵃鏃堕棿:" class="formContent">
- {{ formApprove.lm_date }}
- </el-form-item>
- </div>
- </el-form>
- </div>
- <div
- id="qrCode"
- style="width: 22%;height:90px;
- margin-top: 20px;
- overflow-y: scroll;display: flex;
- justify-content: center;
- position: relative;"
- >
- <div id="qrCode0" ref="qrCodeDiv0" />
- </div>
- <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />
- <div
- style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"
- />
- </div>
-
- <!-- <div style="width:100%;height: 30px;border-bottom: 1px solid #eee;margin-bottom: 20px" />-->
- <el-table
- id="table"
- :data="tableDataPrint"
- border
- class="tableDataPrint"
- :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000'}"
- :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000'}"
- style="width: 100%;margin-top: 20px;text-align: center;border-color: #000"
- >
- <el-table-column
- id="column0"
- prop="seq"
- label="宸ュ簭鍙�"
- width="70"
- align="center"
- />
- <el-table-column
- id="column1"
- prop="stepqrcode"
- label="宸ュ簭浜岀淮鐮�"
- width="100"
- align="center"
- >
- <template slot-scope="{row}">
- <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" class="tableColumn" />
- </template>
- </el-table-column>
- <el-table-column
- id="column2"
- prop="stepname"
- label="宸ュ簭"
- width="120"
- align="center"
- />
- <el-table-column
- id="column3"
- prop="plan_qty"
- label="鍔犲伐鏁伴噺"
- width="100"
- align="center"
- />
- <el-table-column
- id="column4"
- prop="good_qty"
- width="100"
- align="center"
- label="鍚堟牸鏁伴噺"
- />
- <el-table-column
- id="column5"
- width="100"
- prop="ng_qty"
- align="center"
- label="涓嶈壇鏁伴噺"
- />
- <el-table-column
- id="column6"
- prop="desc"
- align="center"
- width="120"
- label="澶囨敞"
- />
- </el-table>
- </div>
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleBackPreview">杩� 鍥�</el-button>
- <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
- <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�/鎵� 鍗�</el-button>-->
- <el-button v-waves v-print="printObj" type="primary">鎵� 鍗�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!--鎵撳嵃棰勮椤甸潰 灏忔爣绛�-->
- <el-dialog
- v-el-drag-dialog
- title="棰勮"
- :visible.sync="dialogVisible2"
- width="1000"
- top="10vh"
- :close-on-click-modal="false"
- @close="dialogVisible2Close"
- >
- <div style="height: 650px;overflow:auto;">
- <!-- 涓嬫媺妗嗛�夋嫨鎵撳嵃灏哄-->
- <div v-if="!isLastPrint" style="display: flex;align-items: center;margin: 0 0 20px 0">
- <div>閫夋嫨鎵撳嵃灏哄锛�</div>
- <el-select
- v-model="printSize"
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- @change="printSizeChange"
- >
-
- <el-option
- v-for="item in printSizeSelectArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </div>
- <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
- <!-- <div id="printMe2" :style="{paddingLeft:'10px',paddingTop: '5px'}">-->
- <div v-if="!isLastPrint" :style="printMe2StylePadding(printSize)">
- <!-- 80 * 50-->
- <div
- v-if="printSize===0"
- style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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;">涓嬮亾宸ュ簭:</div>
- <div>{{ qrForm.nextstepname }}</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>
- <!-- 78 * 60 -->
- <div
- v-if="printSize===1"
- style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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;">涓嬮亾宸ュ簭:</div>
- <div>{{ qrForm.nextstepname }}</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>
- <!-- 60 * 40 -->
- <div
- v-if="printSize===2"
- style="display: flex;width: 220px;height: 130px;border: 1px solid #000;text-align: center;font-size: 12px"
- >
-
- <div style="width: 70px;display: flex;flex-direction: column;border-right: 1px solid #000">
- <div
- style="display: flex;height: 60%;border-bottom:1px solid #000;
- justify-content: center;align-items: center;position: relative"
- >
- <div
- id="qrCode2"
- ref="qrCodeDiv2"
- style="overflow-y: hidden;height:71%;position: absolute;left: 7px;"
- />
- </div>
- <div
- style="display: flex;height: 20%;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
- >
- <div style="margin-left: 3px; ">鏁伴噺:{{ qrForm.startqty }}</div>
- </div>
- <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;">
- <div style="margin-left: 3px; ">鎿嶄綔:{{ qrForm.operator }}</div>
-
- </div>
- </div>
-
- <div style="width:150px;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="margin-left: 3px;">缂栧彿:{{ 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="margin-left: 3px;">浜у搧缂栫爜:{{ 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="margin-left: 3px;">浜у搧鍚嶇О:{{ 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="margin-left: 3px;">涓嬮亾宸ュ簭:{{ qrForm.nextstepname }}</div>
-
- </div>
- <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
- <div style=" margin-left: 3px;">鏃堕棿: {{ qrForm.operatorTime }}</div>
- <!-- <div>{{ qrForm.operatorTime?qrForm.operatorTime.substring(5):'' }}</div>-->
- <!-- <div>{{ qrForm.operatorTime }}</div>-->
- </div>
-
- </div>
-
- </div>
- <div
- v-if="printSize===5"
- style="display: flex;width: 140px;height: 80px;border: 1px solid #000;text-align: center;font-size: 10px;"
- >
-
- <div v-if="false" style="width: 45px;display: flex;flex-direction: column;border-right: 1px solid #000">
- <div
- style="display: flex;height: 60px;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: 20px;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: 20px;justify-content: flex-start;align-items: center">
- <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
- {{ qrForm.operator }}
- </div>
- </div>
-
- <div style="width:100%;display: flex;flex-direction: column;">
- <div
- style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: center;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: center;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: center;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: center;align-items: center;text-align: left"
- >
- <!-- <div style="width:60px;margin-left: 5px;">涓嬮亾宸ュ簭:</div>-->
- <div>{{ qrForm.nextstepname }}</div>
- </div>
- <div style="display: flex;height: 20%;justify-content: center;align-items: center;text-align: left">
- <!-- <div style="width: 60px;margin-left: 5px;">澶勭悊鏃堕棿:</div>-->
- <div>{{ qrForm.operatorTime }}</div>
- </div>
-
- </div>
-
- </div>
- </div>
-
- <div v-if="isLastPrint" style="display: flex;flex-direction: column">
-
- <div style="display: flex;font-weight: bold;font-size: 16px;margin-bottom: 20px;">
- <div style="width: 48%;">
- 璇烽�夋嫨鍏ュ簱鏉$爜
- </div>
- <div style="width: 48%;margin-left: 4%;">
- 宸查�変腑鐨勫叆搴撴潯鐮�
- </div>
- </div>
-
- <div style="display: flex;">
- <!-- 璇烽�夋嫨鍏ュ簱鏉$爜-->
- <div style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;">
- <div
- v-for="(item,index) in lastPrintArr"
- :key="item.inbarcode"
- :style="{marginTop:index===0?'':'15px'}"
- style="display: flex;align-items: center;"
- >
-
- <!-- v-if="printSize===0"-->
- <div style="margin-right:40px">
- <el-checkbox
- :key="item.inbarcode"
- v-model="item.checked"
- @change="val=>inbarcodeChange(val,item)"
- />
- </div>
- <div
- style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
- >
- <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
- {{ item.good_qty }}
- </div>
- <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
- <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
- {{ item.username }}
- </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>{{ item.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>{{ item.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>{{ item.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;">浜у搧瑙勬牸:</div>
- <div>{{ item.partspec ? item.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>{{ item.lm_date }}</div>
- </div>
-
- </div>
-
- </div>
-
- </div>
- </div>
-
- <!-- 宸查�変腑鐨勫叆搴撴潯鐮�-->
- <div
- style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;margin-left: 50px;"
- >
- <div id="printMe2">
- <div
- v-for="(item,index) in lastPrintArrSelected"
- v-if="item.checked"
- :key="item.inbarcode"
- :style="{marginTop:index===0?'':'15px'}"
- style="display: flex;align-items: center;"
- >
- <div
- style="display: flex;width: 280px;height: 160px;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: 96px;border-bottom:1px solid #000;
- justify-content: center;align-items: center;position: relative"
- >
- <div
- id="qrCode3"
- ref="qrCodeDiv3"
- style="overflow-y: hidden;height:60px;position: absolute;left: 14px;"
- />
- </div>
- <div
- style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
- >
- <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
- {{ item.good_qty }}
- </div>
- <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
- <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
- {{ item.username }}
- </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>{{ item.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>{{ item.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>{{ item.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;">浜у搧瑙勬牸:</div>
- <div>{{ item.partspec ? item.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>{{ item.lm_date }}</div>
- </div>
-
- </div>
-
- </div>
-
- </div>
- </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
- :close-on-click-modal="false"
- title="鍏宠仈宸ヨ壓璺嚎"
- :visible.sync="dialogVisibleRoute"
- width="800px"
- top="10vh"
- :fullscreen="isIpad"
- class="dialogVisibleRoute"
- @closed="handleCloseRoute"
- @close="handleCloseRoute"
- >
- <div>
- <i class="el-icon-s-comment" style="color:#42b983;" /> 浜у搧鍚嶇О锛歿{ dialogFormRoute.projectName }}
- </div>
- <el-divider />
- <div style="margin-bottom: 10px">
- <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ヨ壓璺嚎闆嗗悎
- </div>
-
- <div class="myCheckboxGroup">
- <div
- v-for="item in dialogFormRoute.routeOperationArr"
- :key="item.code"
- :style="{border:item.isSelected1?'1px solid #42b983':'1px solid #eee'}"
- class="myCheckbox"
- @click="myCheckboxClick(item)"
- >
- <input
- class="myCheckboxInput"
- type="checkbox"
- :value="item.code"
- :name="item.name"
- :style="{color:item.isSelected2?'#42b983':'#fff'}"
- @click="myCheckboxInputClick(item)"
- >{{ item.name }}
- <!-- 鐖跺瓙鐐瑰嚮浜嬩欢涓嶅奖鍝�-->
- <!-- onClick="event.cancelBubble = true"-->
- </div>
- </div>
-
- <el-divider />
- <div>
- <i class="el-icon-s-operation" style="color:#42b983;" /> 榛樿宸ヨ壓璺嚎
- </div>
- <div style="margin-top: 20px">
- <el-select
- v-model="defaultroute_code"
- filterable
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- class="defaultroute_code"
- >
- <el-option
- v-for="item in defaultroute_codeArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </div>
- <el-divider />
- <div style="margin-bottom: 10px">
- <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ュ簭鍒楄〃
- </div>
- <div style="overflow-y: scroll">
- <el-table
- ref="projectTableData"
- :data="projectTableData"
- border
- height="280"
- :row-class-name="tableRowClassName"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- >
- <el-table-column
- prop="seq"
- width="100"
- label="宸ュ簭搴忓彿"
- fixed
- />
- <el-table-column
- prop="stepcode"
- label="宸ュ簭缂栫爜"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="stepname"
- label="宸ュ簭鍚嶇О"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="enable"
- label="鍚敤鐘舵��"
- fixed="right"
- >
- <template slot-scope="{row}">
- <div v-if="row.enable==='Y'">
- <svg-icon icon-class="circleYes" style="margin-right: 2px" />
- 鏄�
- </div>
- <div v-if="row.enable==='N'">
- <svg-icon icon-class="circleNo" style="margin-right: 2px" />
- 鍚�
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="routeDialogVisibleCancel">鍙� 娑�</el-button>
- <el-button v-waves type="primary" @click="routeDialogVisibleConfirm">纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- </div>
-</template>
-
-<script>
-import Pagination from '@/components/Pagination'
-import { handleDatetime, handleDatetime2, validateCode } from '@/utils/global'
-import { getCookie } from '@/utils/auth'
-import QRCode from 'qrcodejs2'
-import $ from 'jquery'
-import elDragDialog from '@/directive/el-drag-dialog'
-import waves from '@/directive/waves'
-import {
- AddMesOrderCodeSearch,
- AddUpdateMesOrder, DeleteMesOrder,
- MesBadOrderSearch, MesOrderDistribution,
- MesOrderClosedSearch,
- UpdateMesOrderStepSearch, MesOrderBitchClosedSeave
-} from '@/api/WorkOrder'
-import { PartSelect } from '@/api/ProductModel'
-import { PrentOrganization, PrentOrganizationNoCompany, StepData } from '@/api/GeneralBasicData'
-import Sortable from 'sortablejs'
-import ElDragSelect from '@/components/DragSelect'
-import { MesOrderPrintSearch } from '@/api/GridReport' // base on element-ui
-
-export default {
- name: 'WorkOrderClose',
- components: {
- Pagination, ElDragSelect
- },
- directives: { elDragDialog, waves },
- data() {
- return {
- mouseHoverType: 'mouseout',
- mouseHoverTypeDialog: 'mouseout',
- isExpandForm: false,
- isIpad: false,
- mainHeight: 0,
- tableHeight: 0,
- username: '',
- form: {
- wkshopcode: '',
- mesorderstus: '', // 宸ュ崟鐘舵�佺爜
- mesordercode: '', // 宸ュ崟缂栧彿
- partcode: '', // 浜у搧缂栫爜
- ordertype: '', // ordertype
- sourceorder: '', // 婧愬崟鍗曞彿
- saleordercode: '', // 閿�鍞鍗�
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
- creatuser: '', // 鍒涘缓浜哄憳
- createdate: '', // 鍒涘缓鏃堕棿
- prop: 'lm_date', // 鎺掑簭瀛楁
- order: 'desc', // 鎺掑簭瀛楁
- page: 1, // 绗嚑椤�
- rows: 20 // 姣忛〉澶氬皯鏉�
- },
- erporderstusArr: [
- // { code: 'NEW', name: '鏂板伐鍗�' }
- // { code: 'CREATING', name: '鎵ц涓�' },
- // { code: 'CREATED', name: '宸插叧闂�' }
- // { code: 'ALLO', name: '宸叉淳鍙�' }
- // 宸插叧闂細CLOSED 鏈叧闂細NOCLOSED
- { code: 'NOCLOSED', name: '鏈叧闂�' },
- { code: 'CLOSED', name: '宸插叧闂�' }
- // { code: 'NOSCHED', name: '寰呮帓绋�' },
- // { code: 'SCHED', name: '宸叉帓绋�' }
- ],
- wkshopcodeArr: [],
- total: 10,
- tableData: [],
- dialogVisible: false,
- dialogForm: {
- mesorderstus: 'NEW', // 宸ュ崟鐘舵�佺爜
- mesordercode: '', // 宸ュ崟缂栧彿
- ordertype: 'PO', // 宸ュ崟绫诲瀷
- sourceorderid: '', // 婧愬崟id
- sourceorder: '', // 婧愬崟鍗曞彿
-
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
-
- mesqty: '', // 宸ュ崟鏁伴噺
- wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
- wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
-
- deliverydate: '', // 浜や粯鏃堕棿
- data_sources: '', // 鏁版嵁鏉ユ簮
-
- mesmaxqty: 0// 宸ュ崟鐨勬渶澶у��
- },
- ordertypeArr: [// 宸ュ崟绫诲瀷
- { code: 'PO', name: '鏍囧噯宸ュ崟' },
- { code: 'FO', name: '鎶ュ簾琛ュ崟' }
- ],
- partArr: [], // 浜у搧淇℃伅
- wkshopArr: [], // 鐢熶骇杞﹂棿鏁扮粍
- routeArr: [], // 宸ヨ壓璺嚎鏁扮粍
- orderlevArr: [
- { code: 1, name: '鐗圭骇' },
- { code: 2, name: '绱ф��' },
- { code: 3, name: '姝e父' }
- ], // 宸ュ崟绛夌骇鏁扮粍
- operation: '',
- dialogFormRules: {
- mesorderstus: [
- { required: true, message: '璇烽�夋嫨璁㈠崟鐘舵��', trigger: ['blur', 'change'] }
- ],
- partcode: [
- { required: true, message: '璇烽�夋嫨浜у搧淇℃伅', trigger: ['blur', 'change'] }
- ],
- mesordercode: [
- { required: true, validator: validateCode, trigger: ['blur', 'change'] }
- ],
- mesqty: [
- { required: true, message: '璇疯緭鍏ュ伐鍗曟暟閲�', trigger: ['blur', 'change'] }
- ],
- wkshopcode: [
- { required: true, message: '璇烽�夋嫨鐢熶骇杞﹂棿', trigger: ['blur', 'change'] }
- ],
- deliverydate: [
- { required: true, message: '璇烽�夋嫨棰勮浜や粯鏃ユ湡', trigger: ['blur', 'change'] }
- ],
- planstartdate: [
- { required: true, message: '璇烽�夋嫨寮�濮嬫椂闂�', trigger: ['blur', 'change'] }
- ],
- planenddate: [
- { required: true, message: '璇烽�夋嫨缁撴潫鏃堕棿', trigger: ['blur', 'change'] }
- ],
- orderlev: [
- { required: true, message: '璇烽�夋嫨宸ュ崟绛夌骇', trigger: ['blur', 'change'] }
- ],
- isAps: [
- { required: true, message: '璇烽�夋嫨鏄惁鎺掔▼', trigger: ['blur', 'change'] }
- ],
- bomId: [
- { required: true, message: '璇烽�夋嫨鐗╂枡娓呭崟', trigger: ['blur', 'change'] }
- ]
-
- },
- dialogVisibleTask: false,
- taskTableData: [],
-
- dialogVisibleSearch: false,
- searchTableData: [],
- dialogVisibleApprove: false,
- tableDataPrint: [], // 鎵撳嵃椤甸潰鍐呭
- printObj: {
- id: 'printMe',
- popTitle: '鎵撳嵃妯℃澘',
- preview: false,
- extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
- closeCallback(vue) { // 鍏抽棴鎵撳嵃鐨勫洖璋冧簨浠讹紙鏃犳硶纭畾鐐瑰嚮鐨勬槸纭杩樻槸鍙栨秷锛�
- console.log('11212', vue)
- // vue.dialogVisible = false
- vue.dialogVisibleApprove = false
- },
- beforeOpenCallback(vue) {
- vue.printLoading = true
- console.log('鎵撳紑涔嬪墠')
- console.log()
- },
- openCallback(vue) {
- vue.printLoading = false
- console.log('鎵ц浜嗘墦鍗�')
- }
- },
-
- formApprove: {
- m_po: '', // 婧愬崟鍗曞彿
- mesordercode: '',
- partcode: '',
- partname: '',
- partspec: '',
- plan_qty: '',
- routename: '',
- lm_date: ''
- },
- number: '',
- 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: '',
- nextstepname: '',
- operator: '', // 鎿嶄綔浜�
- operatorTime: ''// 鎿嶄綔鏃堕棿
- },
- dialogVisibleSource: false,
- sourceTableData: [],
- sourceForm: {
- mesordercode: '', // 宸ュ崟缂栧彿
- sourceorder: '', // 璁㈠崟缂栧彿
- saleordercode: '', // 閿�鍞鍗曞彿
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
- creatuser: '', // 鍒涘缓浜哄憳
- // paystartdate: '', // 浜や粯鏃堕棿
- // paystartdate: '', // 棰勮寮�宸ユ椂闂�
- // payenddate: '', // 棰勮瀹屽伐鏃堕棿
- createdate: '', // 鍒涘缓鏃堕棿
-
- prop: 'lm_date', // 鎺掑簭瀛楁
- order: 'desc', // 鎺掑簭瀛楁
- page: 1, // 绗嚑椤�
- rows: 20 // 姣忛〉澶氬皯鏉�
- },
- sourceFormTotal: 10,
- radioSelectedId: '',
- isExpandDialog: false, // 瀵硅瘽妗嗚〃鍗曟槸鍚﹀睍寮�锛岄粯璁や笉灞曞紑
- dialogVisibleRoute: false,
- dialogFormRoute: {
- projectName: '', // 浜у搧鍚嶇О
- projectCode: '', // 浜у搧浠g爜
- routeOperationArr: [] // 宸ヨ壓璺嚎闆嗗悎
- },
- defaultroute_code: '', // 榛樿宸ヨ壓璺嚎閫変腑鍊�
- defaultroute_codeArr: '', // 榛樿宸ヨ壓璺嚎鏁扮粍
- projectTableData: [], // 璁惧鍒楄〃
- tableDataDetail: [], // 鐐瑰嚮宸ュ崟琛ㄧ殑琛� 鏄剧ず璇︾粏淇℃伅
- printSize: 0,
- printSizeSelectArr: [// 瀹�*楂�
- { code: 0, name: '80*50' },
- { code: 1, name: '78*60' },
- { code: 2, name: '60*40' }
- // { code: 2, name: '50*60' },
- // { code: 3, name: '50*40' },
- // { code: 4, name: '50*80' },
- // { code: 5, name: '40*30' }
- ],
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() < Date.now() - 8.64e7
- }
- },
-
- isLastPrint: false, // 鏄惁鏄湯閬撴墦鍗�
- lastPrintArr: [], // 鏈亾鎵撳嵃鐨勬暟缁�(鎵�鏈�)
- lastPrintArrSelected: [], // 鏈亾鎵撳嵃鐨勬暟缁�(閫変腑)
-
- switchButton: false,
-
- routeStepArr: '',
-
- stepTableData: [],
- sortable: null,
- stepSelectArr: [], // 宸ュ簭涓嬫媺鏁版嵁
- stepSelectedValue: [], // 涓嬫媺閫変腑鍊�
-
- multipleSelection: []
- }
- },
- watch: {
- 'stepSelectedValue': {
- // deep: true,
- handler: function(val) {
- // do something with the new and old value of stepSelectedValue
- console.log(val, 1)
- const arr = JSON.parse(JSON.stringify(this.stepTableData))
- const arrStepcode = arr.map(i => i.stepcode)
- this.stepTableData = []
- val.forEach(i => {
- this.stepTableData.push(
- {
- stepcode: i,
- stepname: this.stepSelectArr.find(j => j.stepcode === i).stepname,
- stepprice: arrStepcode.includes(i) ? arr.find(j => j.stepcode === i).stepprice : 0
- }
- )
- })
- }
- }
- },
- activated() {
window.addEventListener('resize', this.getHeight)
this.getHeight()
},
created() {
- this.handleRequest()
- },
- mounted() {
- window.addEventListener('resize', this.getHeight)
- this.getHeight()
-
- // this.$nextTick(() => {
- // this.setSort()
- // })
- },
- methods: {
- setSort() {
- const el = this.$refs.stepTableDataRef.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
- this.sortable = Sortable.create(el, {
- ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
- setData: function(dataTransfer) {
- // to avoid Firefox bug
- // Detail see : https://github.com/RubaXa/Sortable/issues/1012
- dataTransfer.setData('Text', '')
- },
- onEnd: evt => {
- const targetRow = this.stepTableData.splice(evt.oldIndex, 1)[0]
- this.stepTableData.splice(evt.newIndex, 0, targetRow)
-
- this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
- // for show the changes, you can delete in you code
- // const tempIndex = this.newList.splice(evt.oldIndex, 1)[0]
- // this.newList.splice(evt.newIndex, 0, tempIndex)
- }
- })
- },
- tableRowClassName({ row, rowIndex }) {
- return 'custom-row'
- },
- handleRequest() {
- this.getMesOrderClosedSearch().then(res => {
- if (res.code === '200') {
- this.getSelect()
- this.getPrentOrganizationNoCompany()
- }
- })
- },
- async getPrentOrganizationNoCompany() {
- const { data: res } = await PrentOrganizationNoCompany()
- this.wkshopcodeArr = res
- },
- async getMesOrderClosedSearch() {
- // let tempDate = this.form.createdate
- // if (tempDate.length > 0) {
- // tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
- // }
-
- const data = {
- wkshopcode: this.form.wkshopcode,
- mesorderstus: this.form.mesorderstus, // 宸ュ崟鐘舵�佺爜
- mesordercode: this.form.mesordercode, // 宸ュ崟缂栧彿
- partcode: this.form.partcode, // 浜у搧缂栫爜
- partname: this.form.partname, // 浜у搧鍚嶇О
- partspec: this.form.partspec, // 浜у搧瑙勬牸
- creatuser: this.form.creatuser, // 鍒涘缓浜哄憳
- sourceorder: this.form.sourceorder, // 婧愬崟鍗曞彿
- saleordercode: this.form.saleordercode, // 閿�鍞鍗�
- ordertype: this.form.ordertype, // 鍗曟嵁绫诲瀷
- createdate: this.form.createdate.toString().length > 0 ? handleDatetime(this.form.createdate) : '', // 鍒涘缓鏃堕棿
- prop: this.form.prop, // 鎺掑簭瀛楁
- order: this.form.order, // 鎺掑簭瀛楁
- page: this.form.page, // 绗嚑椤�
- rows: this.form.rows // 姣忛〉澶氬皯鏉�
- }
- const res = await MesOrderClosedSearch(data)
- this.tableData = res.data
- this.total = res.count
-
- // this.form.createdate = tempDate
- return { code: res.code }
- },
- async getSelect() {
- // 鑾峰彇浜у搧淇℃伅
- const { data: res1 } = await PartSelect()
- this.partArr = res1
-
- // 鑾峰彇缁勭粐
- const { data: res2 } = await PrentOrganization()
- this.wkshopArr = res2
-
- // 鑾峰彇宸ュ簭
- const { data: res3 } = await StepData()
- this.stepSelectArr = res3
- },
- // 璁㈠崟鐘舵�佹敼鍙樻椂
- erporderstusChange(val) {
- this.form.mesorderstus = val
- },
- // 鎺掑簭鏀瑰彉鏃�
- 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.getMesOrderClosedSearch()
- },
- sourceSortChange({ column, prop, order }) {
- if (order === 'descending') {
- order = 'desc'
- } else if (order === 'ascending') {
- order = 'asc'
- } else {
- order = 'desc'
- }
- this.sourceForm.order = order
- this.sourceForm.prop = prop
- this.getMesBadOrderSearch()
- },
- // 鏌ヨ
- search() {
- this.getMesOrderClosedSearch()
- },
-
- // 閲嶇疆
- reset(val) {
- this.form.wkshopcode = ''
- this.form.mesorderstus = ''
- this.form.mesordercode = ''
- this.form.partcode = ''
- this.form.partname = ''
- this.form.partspec = ''
- this.form.paydate = ''
- this.form.creatuser = ''
- this.form.sourceorder = ''
- this.form.ordertype = ''
- this.form.createdate = ''
- this.getMesOrderClosedSearch()
- },
- // 鏂板鎸夐挳
- async add(operation) {
- const { data: res } = await AddMesOrderCodeSearch()
- this.dialogForm.mesordercode = res
- this.operation = operation
- this.dialogVisible = true
- this.dialogForm.data_sources = 'MES'
-
- this.$nextTick(() => {
- this.setSort()
- })
- },
- // 宸ュ簭浠诲姟
- 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.dialogForm.mesordercode = res[0].wo_code
- // this.dialogVisibleTask = true
- },
- dialogVisibleBack() {
- this.dialogVisibleTask = false
- },
- handleSelectionChange(val) {
- this.multipleSelection = val.map(i => i.wo_code)
- },
-
- selected(row, index) {
- return row.status !== 'CLOSED'
- },
- // 娲惧彂
- send() {
- this.$confirm('鏄惁纭娲惧彂?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- MesOrderDistribution(this.multipleSelection).then(res => {
- if (res.code === '200') {
- this.$notify.success('娲惧彂鎴愬姛!')
- if (this.form.page > 1 && this.tableData.length === 1) {
- this.form.page--
- }
- this.getMesOrderClosedSearch()
- }
- })
- }).catch(() => {
- this.$notify.info('宸插彇娑堟淳鍙�')
- })
- },
- // 鍒犻櫎鎸夐挳
- async del(row) {
- if (row.status === 'START' || row.status === 'CLOSED' || row.status === 'SCHED') {
- return this.$message.info('姝ゅ伐鍗曚笉鍙垹闄わ紒')
- }
- this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- const data = {
- souceid: row.sourceid ? row.sourceid : '',
- wocode: row.wo_code,
- m_po: row.m_po,
- orderqty: row.plan_qty
- }
- DeleteMesOrder(data).then(res => {
- if (res.code === '200') {
- this.$notify.success('鍒犻櫎鎴愬姛!')
- if (this.form.page > 1 && this.tableData.length === 1) {
- this.form.page--
- }
- this.getMesOrderClosedSearch()
- }
- })
- }).catch(() => {
- this.$notify.info('宸插彇娑堝垹闄�')
- })
- },
-
- // 淇敼鎸夐挳
- async edit(operation, row) {
- this.operation = operation
-
- this.dialogForm.data_sources = row.data_sources
- this.dialogForm.mesorderstus = row.status
- this.dialogForm.mesordercode = row.wo_code
- this.dialogForm.ordertype = row.wotype
- this.dialogForm.sourceorderid = row.sourceid
- this.dialogForm.sourceorder = row.m_po
- this.dialogForm.partcode = row.partcode
- this.dialogForm.partname = row.partname
- this.dialogForm.partspec = row.partspec
- this.dialogForm.wkshopcode = row.wkshp_code
- this.dialogForm.deliverydate = row.saleOrderDeliveryDate.substring(0, 11)
- this.dialogForm.mesqty = row.plan_qty
-
- const data = {
- sourceid: this.dialogForm.sourceorderid,
- sourcewo: this.dialogForm.sourceorder,
- wocode: this.dialogForm.mesordercode,
- data_sources: this.dialogForm.data_sources
- }
- const { data: res } = await UpdateMesOrderStepSearch(data)
- this.dialogForm.mesmaxqty = res.canupdate_qty
- this.stepTableData = res.stepdata
- // res.stepdata.forEach(i => {
- // this.stepTableData.push(
- // {
- // stepcode: i.step_code,
- // stepname: i.stepname,
- // stepprice: i.stepprice
- // }
- // )
- // })
- // this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
-
- this.dialogVisible = true
- },
- // 宸ュ崟鍏抽棴浜嬩欢
- async orderClose(row) {
- this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- if (row) { // 琛屽叧闂伐鍗�
- this.multipleSelection = [row.wo_code]
- }
- MesOrderBitchClosedSeave(this.multipleSelection).then(res => {
- if (res.code === '200') {
- this.$notify.success('鍏抽棴鎴愬姛!')
- // if (this.form.page > 1 && this.tableData.length === 1) {
- // this.form.page--
- // }
- this.getMesOrderClosedSearch()
- }
- })
- }).catch(() => {
- this.$notify.info('宸插彇娑堝垹闄わ紒')
- })
- },
- // 瀵硅瘽妗嗕骇鍝佷俊鎭�兼敼鍙�
- partcodeChangeDialog(val) {
- console.log(val)
- this.dialogForm.partname = this.partArr.find(item => item.partcode === val).partname
- this.dialogForm.partcode = this.partArr.find(item => item.partcode === val).partcode
- this.dialogForm.partspec = this.partArr.find(item => item.partcode === val).partspec
- },
- // 瀵硅瘽妗嗗叧闂簨浠�
- handleClose() {
- this.dialogForm = {
- mesorderstus: 'NEW', // 宸ュ崟鐘舵�佺爜
- mesordercode: '', // 宸ュ崟缂栧彿
- ordertype: 'PO', // 宸ュ崟绫诲瀷
- sourceorderid: '', // 婧愬崟id
- sourceorder: '', // 婧愬崟鍗曞彿
-
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
-
- mesqty: '', // 宸ュ崟鏁伴噺
- wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
- wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
-
- deliverydate: '', // 浜や粯鏃堕棿
- data_sources: '' // 鏁版嵁鏉ユ簮
- }
- this.stepSelectedValue = []
- this.stepTableData = []
- this.$refs.dialogForm.clearValidate()
- },
- // 瀵硅瘽妗嗗彇娑�
- dialogVisibleCancel() {
- this.dialogVisible = false
- },
- // 瀵硅瘽妗嗙‘璁�
- dialogVisibleConfirm() {
- this.$refs.dialogForm.validate(valid => {
- if (valid) {
- if (this.dialogForm.ordertype === 'FO' && this.dialogForm.sourceorder.toString().trim().length <= 0) {
- return this.$message.info('婧愬崟鍗曞彿涓嶈兘涓虹┖锛�')
- }
-
- if (this.dialogForm.data_sources === 'ERP' && this.dialogForm.mesmaxqty < this.dialogForm.mesqty) {
- return this.$message.info('姝ゅ伐鍗曠殑鏈�澶т慨鏀规暟鍊间负锛�' + this.dialogForm.mesmaxqty)
- }
-
- const workListSub = []
- this.stepTableData.forEach((i, j) => {
- workListSub.push(
- {
- stepseq: j + 1,
- stepcode: i.stepcode,
- stepprice: i.stepprice,
- isbott: j === 0 ? 'Y' : 'N',
- isend: j === this.stepTableData.length - 1 ? 'Y' : 'N'
- }
- )
- })
-
- const data = {
- wostatus: this.dialogForm.mesorderstus, // 宸ュ崟鐘舵��
- wocode: this.dialogForm.mesordercode, // 宸ュ崟鍙�
- wotype: this.dialogForm.ordertype, // 宸ュ崟绫诲瀷
- sourceid: this.dialogForm.sourceorderid, // 婧愬崟id
- sourcewo: this.dialogForm.sourceorder, // 婧愬崟鍗曞彿
- partcode: this.dialogForm.partcode, // 浜у搧缂栧彿
- wkshopcode: this.dialogForm.wkshopcode,
- woqty: this.dialogForm.mesqty, // 宸ュ崟鏁伴噺
- deliverydate: this.dialogForm.deliverydate, // 浜や粯鏃堕棿
- data_sources: this.dialogForm.data_sources, // 鏁版嵁鏉ユ簮
- isstep: workListSub.length > 0 ? 'Y' : 'N', //
- workListSub
- }
-
- this.$store.state.app.buttonIsDisabled = true
- AddUpdateMesOrder(data, this.operation === 'add' ? 'Add' : 'Update').then(res => {
- if (res.code === '200') {
- this.dialogVisible = false
- // this.handlePrint()
- this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '娲惧彂鎴愬姛锛�')
- this.getMesOrderClosedSearch()
- this.$store.state.app.buttonIsDisabled = false
- } else {
- this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '娲惧彂澶辫触锛�')
- }
- })
- }
- })
- },
- // 娲惧彂鎵撳嵃
- async sendPrint() {
- const data = {
- username: getCookie('admin'),
- // username: getCookie('username'),
- mesordercode: this.dialogForm.mesordercode
- }
- const res = await MesOrderPrintSearch1(data)
- // const res = await PrintOrder(data)
- if (res.code === '200') {
- // 鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
- var args = {
- type: 'print', // preview print
- showOptionDlg: false, // 濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
- report: urlAddRandomNo('./static/grf/浜у搧娴佷紶鍗旳4.grf'),
- data: res.data
- }
- webapp_ws_ajax_run(args)
- }
- },
-
- // 鑾峰彇椤甸潰楂樺害
- getHeight() {
- this.$nextTick(() => {
- this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 295
- if (window.innerHeight < 769) {
- this.tableHeight = this.tableHeight - 20
- }
- this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
- this.$refs.tableDataRef.doLayout()
- })
- },
- // 宸ヨ壓璺嚎鏀惧ぇ闀滅偣鍑�
- async searchClick() {
- if (this.dialogForm.routecode === '') {
- return this.$message.info('璇峰厛閫夋嫨宸ヨ壓璺嚎锛�')
- }
- this.dialogVisibleSearch = true
- const { data: res } = await SelectRouteStep({ routecode: this.dialogForm.routecode })
- this.searchTableData = res
- },
- dialogVisibleSearchBack() {
- this.dialogVisibleSearch = false
- },
- // 澶勭悊鎵撳嵃
- handlePrint(wo_code) {
- // const number = Math.random() * Math.random()
- // this.number = number === 0 ? (10 + Math.random()) : number
- // console.log(number)
-
- const data2 = {
- mesordercode: wo_code || this.dialogForm.mesordercode
- }
- MesOrderPrintSearch(data2).then(res2 => {
- if (res2.code === '200') {
- const res3 = res2.data.recordset
-
- this.tableDataPrint = res3
- this.formApprove.mesordercode = res3[0].wo_code
- this.formApprove.m_po = res3[0].m_po || '/'
- this.formApprove.partcode = res3[0].partcode
- this.formApprove.partname = res3[0].partname
- this.formApprove.partspec = res3[0].partspec || '/'
- this.formApprove.plan_qty = res3[0].plan_qty
- this.formApprove.routename = localStorage.getItem('username') // 鎵撳嵃浜哄憳
- this.formApprove.lm_date = res3[0].lm_date
-
- this.$nextTick(() => {
- res3.forEach(i => {
- this.bindQRCode(i.seq, i.stepqrcode, 'small')
- })
- this.bindQRCode('0', this.formApprove.mesordercode, 'big')
-
- const div = document.getElementById('qrCode')
- // 杩欎箞澶氫唬鐮佸彧闇�瑕佽繖涓�鍙ュ疄鐜版垜浠墍闇�瑕佺殑鍔熻兘锛屽畾浣峝iv婊氬姩鏉′綅缃湪搴曢儴锛宻crollHeight璁$畻鍑篸iv鐨勯珮搴︼紝鍐峴crollTop 璁剧疆婊氬姩鏉$殑楂樺害涓哄灏�
- div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
- // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
- })
- this.dialogVisibleApprove = true
- }
- })
- },
- dialogVisibleTaskClose() {
- this.dialogForm.mesordercode = ''
- },
- /*
- * 鎵嬪姩鐐瑰嚮鎵撳嵃
- * */
- // 杩斿洖鎸夐挳
- dialogVisibleBackPreview() {
- this.dialogVisibleApprove = false
- },
- // dialogVisibleConfirmPreview(param) {
- // this.$refs.dialogForm.validate(valid => {
- // if (valid) {
- // const data = {
- // username: getCookie('admin'),
- // mesordercode: this.dialogForm.mesordercode
- // }
- // MesOrderPrintSearch1(data).then(res => {
- // if (res.code === '200') {
- // this.dialogVisibleApprove = true
- // console.log(res, 11)
- // }
- // })
- // }
- // })
- // },
- // 鐢熸垚浜岀淮鐮� 宸ュ崟鎶ヨ〃浜岀淮鐮�
- bindQRCode(seq, text, size) {
- if (size === 'big') {
- console.log(text, 1)
- new QRCode(this.$refs.qrCodeDiv0, {
- text: text,
- width: size === 'big' ? 90 : 60,
- height: size === 'big' ? 90 : 60,
- // colorDark: '#333333', // 浜岀淮鐮侀鑹�
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- } else {
- new QRCode(this.$refs['qrCodeDiv' + seq], {
- text: text,
- width: size === 'big' ? 90 : 60,
- height: size === 'big' ? 90 : 60,
- // colorDark: '#333333', // 浜岀淮鐮侀鑹�
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- }
- },
-
- dialogVisibleConfirmClose() {
- // this.dialogForm.mesordercode = ''
- this.formApprove.mesordercode = ''
- this.formApprove.m_po = ''
- this.formApprove.partcode = ''
- this.formApprove.partname = ''
- this.formApprove.partspec = ''
- this.formApprove.plan_qty = ''
- this.formApprove.routename = ''
- this.formApprove.lm_date = ''
-
- // this.$refs.qrCodeDiv0.title = ''
-
- this.tableDataPrint = []
- },
- // 琛ユ墦鎸夐挳
- supplementClick() {
- this.dialogVisibleTask = false
- this.handlePrint()
- },
- // 琛ユ墦灏忔爣绛�
- supplementSmallClick(row) {
- // let obj = {}
- console.log(row, 21)
- // this.taskTableData.forEach((item, index) => {
- this.tableDataDetail.forEach((item, index) => {
- if (item.seq === row.seq) {
- console.log(item)
- this.qrForm = {
- // qrvalue: item.seq === this.taskTableData.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.taskTableData[item.seq].stepcode,
- qrvalue: item.seq === this.tableDataDetail.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.tableDataDetail[item.seq].stepcode,
- // startqty: item.seq === this.taskTableData.length ? item.plan_qty : this.taskTableData[item.seq].plan_qty,
- startqty: item.seq === this.tableDataDetail.length ? item.plan_qty : this.tableDataDetail[item.seq].plan_qty,
- wo_code: item.wo_code,
- partcode: item.partcode,
- partname: item.partname,
- // nextstepname: item.seq === this.taskTableData.length ? item.stepname : this.taskTableData[item.seq].stepname,
- nextstepname: item.seq === this.tableDataDetail.length ? item.stepname : this.tableDataDetail[item.seq].stepname,
- operator: getCookie('username'),
- operatorTime: handleDatetime2(new Date())
- }
- this.$nextTick(() => {
- console.log(this.qrForm.qrvalue, 3333)
- this.bindQRCode2(this.qrForm.qrvalue)
-
- const div = document.getElementById('qrCode2')
- // 杩欎箞澶氫唬鐮佸彧闇�瑕佽繖涓�鍙ュ疄鐜版垜浠墍闇�瑕佺殑鍔熻兘锛屽畾浣峝iv婊氬姩鏉′綅缃湪搴曢儴锛宻crollHeight璁$畻鍑篸iv鐨勯珮搴︼紝鍐峴crollTop 璁剧疆婊氬姩鏉$殑楂樺害涓哄灏�
- div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
- // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
- })
- }
- })
-
- // this.dialogVisibleTask = false
- this.dialogVisible2 = true
- console.log(this.qrForm, 1111)
- },
- // 琛ユ墦鐢熶骇鍏ュ簱鏉$爜
- async getProductInHouseLabCode(ordercode) {
- const res = await ProductInHouseLabCode({ ordercode })
- console.log(res)
- this.isLastPrint = true
-
- this.lastPrintArr = res.data
-
- this.dialogVisible2 = true
-
- // 鐢熶骇浜岀淮鐮�
- this.$nextTick(() => {
- this.lastPrintArr.forEach((i, index) => {
- i.checked = false
- new QRCode(this.$refs.qrCodeDiv2[index], {
- text: i.inbarcode,
- width: this.printSize !== 2 ? 60 : 55,
- height: this.printSize !== 2 ? 60 : 55,
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- })
- })
- },
- dialogVisible2Close() {
- this.qrForm.qrvalue = ''
- this.qrForm.startqty = ''
- this.qrForm.wo_code = ''
- this.qrForm.partcode = ''
- this.qrForm.partname = ''
- this.qrForm.nextstepname = ''
- this.qrForm.operator = ''
- this.qrForm.operatorTime = ''
- // this.$refs.qrCodeDiv2 = ''
- this.isLastPrint = false
- this.lastPrintArr = []
- this.lastPrintArrSelected = []
- },
- // 鐢熸垚浜岀淮鐮� 宸ュ簭鏍囩浜岀淮鐮�
- bindQRCode2(text) {
- new QRCode(this.$refs.qrCodeDiv2, {
- text: text,
- width: this.printSize !== 2 ? 60 : 55,
- height: this.printSize !== 2 ? 60 : 55,
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- },
- // 鎶ュ簾琛ュ崟鎯呭喌涓嬪彲鐐瑰嚮閫夋嫨
- mesordertsourcesearchclick() {
- if (this.dialogForm.ordertype === 'PO') {
- return this.$message.info('宸ュ崟绫诲瀷涓烘姤搴熻ˉ鍗曟儏鍐典笅鍙�夋嫨锛�')
- }
-
- this.getMesBadOrderSearch()
-
- this.dialogVisibleSource = true
- },
- async getMesBadOrderSearch() {
- // let tempDate2 = this.sourceForm.paystartdate
- // if (tempDate2.length > 0) {
- // tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
- // }
-
- let tempDate = this.sourceForm.createdate
- if (tempDate.length > 0) {
- tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
- }
-
- const data = {
- mesordercode: this.sourceForm.mesordercode, // 宸ュ崟缂栧彿
- sourceorder: this.sourceForm.sourceorder, // 璁㈠崟璁㈠崟鍙�
- saleordercode: this.sourceForm.sourceorder, // 璁㈠崟璁㈠崟鍙�
- partcode: this.sourceForm.partcode, // 浜у搧缂栫爜
- partname: this.sourceForm.partname, // 浜у搧鍚嶇О
- partspec: this.sourceForm.partspec, // 浜у搧瑙勬牸
- // paystartdate: tempDate2, // 浜や粯鏃堕棿
- // payenddate: tempDate, // 浜や粯鏃堕棿
- creatuser: this.sourceForm.creatuser, // 鍒涘缓浜哄憳
- createdate: tempDate, // 鍒涘缓鏃堕棿
-
- prop: this.sourceForm.prop, // 鎺掑簭瀛楁
- order: this.sourceForm.order, // 鎺掑簭瀛楁
- page: this.sourceForm.page, // 绗嚑椤�
- rows: this.sourceForm.rows // 姣忛〉澶氬皯鏉�
-
- }
-
- const res = await MesBadOrderSearch(data)
- this.sourceTableData = res.data
- this.sourceFormTotal = res.count
- },
- // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
- // getCurrentRowSource2(id) {
- // this.radioSelectedId = id
- // },
- // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
- getCurrentRowSource(row, event, column) {
- this.radioSelectedId = row.id
- this.dialogForm.mesqty = row.bad_qty
- },
- sourceSearch() {
- this.getMesBadOrderSearch()
- },
- sourceReset() {
- this.sourceForm.mesordercode = ''
- this.sourceForm.sourceorder = ''
- this.sourceForm.partcode = ''
- this.sourceForm.partname = ''
- this.sourceForm.partspec = ''
- // this.sourceForm.paystartdate = ''
- // this.sourceForm.payenddate = ''
- this.sourceForm.creatuser = ''
- this.sourceForm.createdate = ''
- this.getMesBadOrderSearch()
- },
- dialogVisibleSourceClose() {
- this.radioSelectedId = ''
-
- this.sourceForm.mesordercode = ''
- this.sourceForm.sourceorder = ''
- this.sourceForm.partcode = ''
- this.sourceForm.partname = ''
- this.sourceForm.partspec = ''
- this.sourceForm.paystartdate = ''
- this.sourceForm.payenddate = ''
- this.sourceForm.creatuser = ''
- this.sourceForm.createdate = ''
-
- this.isExpandDialog = false
- this.sourceTableData = []
- },
- dialogVisibleSourceBack() {
- this.dialogVisibleSource = false
- },
- dialogVisibleSourceConfirm() {
- console.log(this.radioSelectedId)
- this.sourceTableData.forEach(item => {
- if (item.id === this.radioSelectedId) {
- this.dialogForm.sourceorder = item.wo_code
- this.dialogForm.partcode = item.partcode
- this.dialogForm.partspec = item.partspec
- }
- })
- this.dialogVisibleSource = false
- },
- mesordertypeChange(val) {
- if (val === 'PO') {
- this.dialogForm.sourceorder = ''
- this.dialogForm.partcode = ''
- this.dialogForm.partspec = ''
- }
- },
- /* 鍏宠仈宸ヨ壓璺嚎妯″潡*/
- // 鍏宠仈宸ヨ壓璺嚎
- async routeClick(row) {
- console.log(row)
- // this.defaultroute_code = row.default_route
- this.dialogFormRoute.projectCode = row.partcode
- this.dialogFormRoute.projectName = row.partname
- this.dialogVisibleRoute = true
- const { data: res } = await InventoryFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode })
- this.dialogFormRoute.routeOperationArr = res
-
- this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
- item.isSelected1 = false
- item.isSelected2 = false
- if (index === 0) {
- item.isSelected1 = true
- this.projectTableData = item.Data
- }
- if (item.flag === 'Y') {
- item.isSelected2 = true
- this.$nextTick(() => {
- $('input:checkbox').eq(index).prop('checked', true)
- })
- }
- })
-
- this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y')
- },
- // 瀵硅瘽妗嗗叧闂�
- handleCloseRoute() {
- this.dialogFormRoute.routeOperationArr = []
- this.defaultroute_codeArr = []
- this.defaultroute_code = ''
- this.projectTableData = []
- },
- // 鍙栨秷
- routeDialogVisibleCancel() {
- this.dialogVisibleRoute = false
- },
- // 纭畾
- async routeDialogVisibleConfirm() {
- const temp = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
- if (this.defaultroute_code === '' && temp.length > 0) {
- return this.$message.info('榛樿宸ヨ壓璺嚎涓嶈兘涓虹┖锛�')
- }
-
- // 鎻愪氦鏍煎紡
- const data = []
- this.dialogFormRoute.routeOperationArr.forEach(item => {
- if (item.isSelected2) {
- data.push({ code: item.code, name: item.name })
- }
- })
-
- const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, this.defaultroute_code, data)
- if (res.code === '200') {
- this.$message.success('淇濆瓨鎴愬姛锛�')
- await this.getMesOrderClosedSearch()
- this.dialogVisibleRoute = false
- }
- },
- // 澶х洅瀛愮偣鍑讳簨浠�
- myCheckboxClick(val) {
- console.log(val, 1)
- this.dialogFormRoute.routeOperationArr.forEach(item => {
- item.isSelected1 = val.code === item.code
- })
-
- this.projectTableData = val.Data
- },
- // 灏忕洅瀛愮偣鍑讳簨浠�
- myCheckboxInputClick(val) {
- console.log(val, 2)
- val.isSelected2 = !val.isSelected2
-
- this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
- if (val.code === item.code) {
- item.flag = !item.flag
- }
- })
- if (val.code === this.defaultroute_code) {
- this.defaultroute_code = ''
- }
- this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
- },
- // 琛岀偣鍑讳簨浠�
- async rowClick(row, event, column) {
- const data = {
- sourceid: row.sourceid,
- sourcewo: row.m_po,
- wocode: row.wo_code,
- data_sources: row.data_sources
- }
- const { data: res } = await UpdateMesOrderStepSearch(data)
- this.tableDataDetail = res.stepdata
- },
- // 宸ュ簭鍒犻櫎
- stepDel(row) {
- console.log(row)
- const index = this.stepSelectedValue.findIndex(i => i === row.stepcode)
- this.stepSelectedValue.splice(index, 1)
- },
- // 鎵撳嵃宸ュ崟
- printOrder() {
-
- },
- // 閫夋嫨鎵撳嵃灏哄鐨勫ぇ灏忓�兼敼鍙�
- printSizeChange(val) {
- this.$nextTick(() => {
- this.bindQRCode2(this.qrForm.qrvalue)
- })
- },
- printMe2StylePadding(val) {
- if (val === 0) {
- return { paddingLeft: '10px', paddingTop: '5px' }
- }
- if (val === 5) {
- return { paddingLeft: '15px', paddingTop: '7px' }
- }
- },
-
- inbarcodeChange(val, item) {
- // 褰� lastPrintArrSelected涓湭鏈夊綋鍓嶅嬀閫夌殑鍊兼槸 璧皃ush item 鍚﹀垯璧拌繃婊ゆ帀item
- if (val) {
- this.lastPrintArrSelected.push(item)
- } else {
- this.lastPrintArrSelected = this.lastPrintArrSelected.filter(i => i.inbarcode !== item.inbarcode)
- }
-
- // 鐢熶骇浜岀淮鐮�
- this.$nextTick(() => {
- this.lastPrintArrSelected.forEach((i, index) => {
- console.log(i.inbarcode, 'i.inbarcode')
- new QRCode(this.$refs.qrCodeDiv3[index], {
- text: i.inbarcode,
- width: 60,
- height: 60,
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- })
-
- // const div = document.getElementById('qrCode3')
- // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶搴曢儴
-
- this.$forceUpdate()
- }, 500)
- },
- stepSelectedValueChange(val) {
- // console.log(val, 123)
- }
- }
-}
-</script>
-<style>
-.sortable-ghost {
- opacity: .8;
- color: #fff !important;
- background: #42b983 !important;
-}
-</style>
-<style lang="scss" scoped>
-$main_color: #42b983;
-
-.dialogVisibleRoute {
- .myCheckboxGroup {
- display: flex;
- flex-wrap: wrap;
-
- .myCheckbox {
- //border: 1px solid $main_color;
- border: 1px solid #eee;
- display: flex;
- min-width: 100px;
- padding: 10px;
- margin: 10px 30px 0 0;
- border-radius: 5px;
- cursor: default;
-
- .myCheckboxInput {
- margin: 1px 5px 0 0;
- cursor: pointer;
- }
-
- }
-
- //.myCheckbox{
- // border: 1px solid $main_color;
- //}
-
- input[type=checkbox] {
- cursor: pointer;
- position: relative;
- width: 14px;
- height: 14px;
- font-size: 14px;
- }
-
- input[type=checkbox]::after {
- position: absolute;
- top: 0;
- //color: rgb(130, 35, 35);
- color: $main_color;
- width: 14px;
- height: 14px;
- display: inline-block;
- visibility: visible;
- padding-left: 0px;
- text-align: center;
- content: ' ';
- border-radius: 3px
- }
-
- input[type=checkbox]:checked::after {
- //content: "鉁�";
- content: "鈭�";
- color: #fff;
- font-size: 12px;
- font-weight: bold;
- background-color: $main_color;
- }
- }
-}
-
-.dialogVisibleRoute {
- ::v-deep .el-dialog__body {
- padding: 20px 20px !important;
- }
-}
-
-.defaultroute_code ::v-deep .el-input__suffix-inner {
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: -3px;
-}
-
-.el-date-editor {
- font-size: 14px;
-}
-
-::v-deep .el-dialog__body {
- padding: 20px 100px !important;
-}
-
-.dialogVisibleSearch ::v-deep .el-dialog__body {
- padding: 20px 20px !important;
-}
-
-.dialogVisibleConfirmClass ::v-deep .el-dialog__body {
- padding: 20px 20px !important;
-}
-
-::v-deep .el-table .caret-wrapper {
- transform: scale(0.8);
-}
-
-::v-deep .el-button--text {
- color: $main_color;
- font-size: 14px;
- cursor: pointer;
-}
-
-::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
- margin: 10px 30px 0px 0;
-}
-
-.body ::v-deep .el-form-item {
- margin-bottom: 0;
-}
-
-.elForm ::v-deep .el-form-item {
- margin-bottom: 0;
-}
-
-.elTableDiv {
- ::v-deep .el-radio__label {
- display: none;
- }
-
-}
-
-.el-table::before {
- height: 0;
-}
-
-//.dialogVisibleConfirmClass >>>.el-table--border, .el-table--fit {
-// border-bottom: 2px solid #000 ;
-// //outline: #000 solid 2px !important;
-//}
-
-.tableDataPrint ::v-deep div.cell {
- display: flex !important;
- align-items: center !important;
- justify-content: center !important;
-}
-
-.formContent {
- width: 240px;
-}
-
-</style>
-
-<style media="print">
-/*@media print {*/
-@page {
- size: auto;
- margin: 3mm;
-}
-
-</style>
-<style>
-.formContent .el-form-item__label {
- color: #000 !important;
-}
-</style>
-<!--鍏叡椤甸潰鏍峰紡-->
-<style lang="scss" scoped>
-$main_color: #42b983;
-
-::v-deep .el-range-input {
- font-size: 14px !important;
-}
-
-::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-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 .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;
-}
-
-.userDialogVisible ::v-deep .el-form-item {
- margin-bottom: 0;
-}
-
-.dateMini {
- ::v-deep .el-input__inner {
- line-height: 34px;
- height: 34px;
- width: 200px;
- display: flex;
- font-size: 14px !important;
- align-items: center !important;
- }
-
- ::v-deep .el-input__prefix {
- margin-top: -3px;
- }
-
- //::v-deep .el-range__icon{
- // line-height: 28px;
- //}
-}
-
-::v-deep .el-select__caret {
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.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>
+<template>
+ <div>
+ <div class="body" :style="{height:mainHeight+'px'}">
+
+ <div class="bodyTopButtonGroup">
+ <el-button v-waves icon="el-icon-switch-button" type="success" @click="orderClose()">宸ュ崟鍏抽棴</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.wkshopcode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in wkshopcodeArr"
+ :key="item.torg_code"
+ :label="item.torg_name"
+ :value="item.torg_code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">
+ <el-select
+ v-model="form.mesorderstus"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ @change="erporderstusChange"
+ >
+ <el-option
+ v-for="item in erporderstusArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
+ <el-input v-model="form.mesordercode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="婧愬崟鍗曞彿" style="display: flex;">
+ <el-input v-model="form.sourceorder" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="閿�鍞鍗�" style="display: flex;">
+ <el-input v-model="form.saleordercode" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="鍗曟嵁绫诲瀷" style=" display: flex;">
+ <el-select
+ v-model="form.ordertype"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <!-- @change="mesordertypeChange"-->
+ <el-option
+ v-for="item in ordertypeArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="浜у搧缂栫爜" style=" display: flex;">
+ <el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="浜у搧瑙勬牸" style=" display: flex;">
+ <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="鍒涘缓浜哄憳" style=" display: flex;">
+ <el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="鍒涘缓鏃堕棿" style=" display: flex;">
+ <!-- <el-date-picker-->
+ <!-- v-model="form.createdate"-->
+ <!-- type="daterange"-->
+ <!-- :clearable="false"-->
+ <!-- range-separator="~"-->
+ <!-- start-placeholder="寮�濮嬫棩鏈�"-->
+ <!-- end-placeholder="缁撴潫鏃ユ湡"-->
+ <!-- size="mini"-->
+ <!-- />-->
+ <el-date-picker
+ v-model="form.createdate"
+ type="date"
+ size="mini"
+ :clearable="false"
+ class="dateMini"
+ format="yyyy-MM-dd"
+ 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+80)+'px'"
+ border
+ :row-class-name="tableRowClassName"
+ :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px'}"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ @sort-change="sortChange"
+ @row-click="rowClick"
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column
+ type="selection"
+ width="50"
+ :selectable="selected"
+ />
+ <el-table-column
+ prop="rowNum"
+ width="50"
+ label="搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="status"
+ label="宸ュ崟鐘舵��"
+ sortable="custom"
+ width="110"
+ show-tooltip-when-overflow
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.status==='NEW'">鏂板伐鍗�</div>
+ <!-- <div v-if="row.status==='CREATING'">鎵ц涓�</div>-->
+ <!-- <div v-if="row.status==='CREATED'">宸插叧闂�</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==='NOCLOSED'">鏈叧闂�</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="宸ュ崟缂栧彿"
+ show-tooltip-when-overflow
+ sortable="custom"
+ min-width="160"
+ />
+ <el-table-column
+ prop="m_po"
+ label="婧愬崟鍗曞彿"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="160"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.m_po">{{ row.m_po }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="saleOrderCode"
+ label="閿�鍞鍗�"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="160"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.saleOrderCode">{{ row.saleOrderCode }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wotype"
+ label="鍗曟嵁绫诲瀷"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="120"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.wotype==='PO'">鏍囧噯宸ュ崟</div>
+ <div v-else-if="row.wotype==='FO'">鎶ュ簾琛ュ崟</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="partcode"
+ label="浜у搧缂栫爜"
+ show-tooltip-when-overflow
+ sortable="custom"
+ min-width="120"
+ />
+ <el-table-column
+ prop="partname"
+ min-width="150"
+ label="浜у搧鍚嶇О"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partspec"
+ label="浜у搧瑙勬牸"
+ sortable="custom"
+ width="110"
+ show-tooltip-when-overflow
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.partspec">{{ row.partspec }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="plan_qty"
+ label="宸ュ崟鏁�"
+ sortable="custom"
+ show-tooltip-when-overflow
+ width="100"
+ />
+ <el-table-column
+ prop="priuserdefnvc1"
+ label="瀹㈡埛鍚嶇О"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc1 ? row.priuserdefnvc1 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc6"
+ label="瀹㈡埛缂栫爜"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc6 ? row.priuserdefnvc6 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc2"
+ label="瀵瑰唴鍚嶇О"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc2 ? row.priuserdefnvc2 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc3"
+ label="CTP鏃ユ湡"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc3 ? row.priuserdefnvc3 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc4"
+ label="閽㈠垁缂栧彿"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc4 ? row.priuserdefnvc4 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc5"
+ label="鐩掑瀷"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc5 ? row.priuserdefnvc5 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wkshp_name"
+ label="鐢熶骇杞﹂棿"
+ show-tooltip-when-overflow
+ sortable="custom"
+ width="120"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="saleOrderDeliveryDate"
+ label="棰勮浜や粯鏃ユ湡"
+ sortable="custom"
+ width="130"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.saleOrderDeliveryDate">{{ row.saleOrderDeliveryDate.substring(0, 11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column-->
+ <!-- prop="data_sources"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- label="鏁版嵁鏉ユ簮"-->
+ <!-- sortable="custom"-->
+ <!-- width="120"-->
+ <!-- />-->
+
+ <el-table-column
+ prop="lm_user"
+ show-tooltip-when-overflow
+ label="鍒涘缓浜哄憳"
+ sortable="custom"
+ width="120"
+ />
+ <el-table-column
+ prop="lm_date"
+ label="鍒涘缓鏃堕棿"
+ show-tooltip-when-overflow
+ width="160"
+ sortable="custom"
+ />
+ <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"-->
+ <!-- :style="{color:$store.state.settings.theme}"-->
+ <!-- @click.stop="edit('edit',row)"-->
+ <!-- />-->
+ <!-- </el-tooltip>-->
+
+ <!-- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">-->
+ <!-- <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click.stop="del(row)" />-->
+ <!-- </el-tooltip>-->
+
+ <!-- <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-->
+ <!-- :style="{color:$store.state.settings.theme}"-->
+ <!-- class="el-icon-printer"-->
+ <!-- style="cursor: pointer;margin-right: 15px"-->
+ <!-- @click.stop="handlePrint(row.wo_code)"-->
+ <!-- />-->
+ <!-- </el-tooltip>-->
+
+ <el-tooltip class="item" effect="dark" content="璇︽儏" placement="top">
+ <i
+ class="el-icon-view"
+ style="cursor: pointer;"
+ :style="{color:$store.state.settings.theme}"
+ @click.stop="edit('view',row)"
+ />
+ </el-tooltip>
+
+ <el-tooltip class="item" effect="dark" content="宸ュ崟鍏抽棴" placement="top">
+ <i
+ class="el-icon-switch-button"
+ style="cursor: pointer;margin-left: 15px"
+ :style="{color:$store.state.settings.theme}"
+ @click.stop="orderClose(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,jumper"
+ popper-class="select_bottom"
+ @pagination="getMesOrderClosedSearch"
+ />
+
+ <!-- <div class="elTableDiv">-->
+ <!-- <el-table-->
+ <!-- :data="tableDataDetail"-->
+ <!-- border-->
+ <!-- height="210px"-->
+ <!-- :row-class-name="tableRowClassName"-->
+ <!-- highlight-current-row-->
+ <!-- :header-cell-style="this.$headerCellStyle"-->
+ <!-- :cell-style="this.$cellStyle"-->
+ <!-- >-->
+ <!-- <!– <el-table-column–>-->
+ <!-- <!– width="50"–>-->
+ <!-- <!– type="index"–>-->
+ <!-- <!– prop="搴忓彿"–>-->
+ <!-- <!– fixed–>-->
+ <!-- <!– /> –>-->
+ <!-- <el-table-column-->
+ <!-- width="50"-->
+ <!-- prop="seq"-->
+ <!-- label="搴忓彿"-->
+ <!-- fixed-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- prop="wo_code"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- label="宸ュ崟缂栧彿"-->
+ <!-- width="160"-->
+ <!-- />-->
+
+ <!-- <!– <el-table-column–>-->
+ <!-- <!– prop="partcode"–>-->
+ <!-- <!– label="浜у搧缂栫爜"–>-->
+ <!-- <!– width="150"–>-->
+ <!-- <!– show-tooltip-when-overflow–>-->
+ <!-- <!– />–>-->
+ <!-- <!– <el-table-column–>-->
+ <!-- <!– prop="partname"–>-->
+ <!-- <!– label="浜у搧鍚嶇О"–>-->
+ <!-- <!– width="200"–>-->
+ <!-- <!– show-tooltip-when-overflow–>-->
+ <!-- <!– />–>-->
+
+ <!-- <el-table-column-->
+ <!-- label="宸ュ簭缂栫爜"-->
+ <!-- prop="step_code"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- width="150"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="宸ュ簭鍚嶇О"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="stepname"-->
+ <!-- width="150"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="宸茬敓浜ф暟閲�"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="produceq_qty"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="鍚堟牸鏁伴噺"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="good_qty"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="涓嶈壇鏁伴噺"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="ng_qty"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="宸ュ簾鏁伴噺"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="laborbad_qty"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="鏂欏簾鏁伴噺"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="materielbad_qty"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="寰呬骇鏁伴噺"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="delive_qty"-->
+ <!-- />-->
+ <!-- <!– <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–>-->
+ <!-- <!– v-if="tableDataDetail.length!==row.seq"–>-->
+ <!-- <!– class="el-icon-printer"–>-->
+ <!-- <!– :style="{color:$store.state.settings.theme}"–>-->
+ <!-- <!– style="cursor: pointer;margin-right: 15px"–>-->
+ <!-- <!– @click="supplementSmallClick(row)"–>-->
+ <!-- <!– />–>-->
+ <!-- <!– </el-tooltip>–>-->
+ <!-- <!– <el-tooltip class="item" effect="dark" content="琛ユ墦鐢熶骇鍏ュ簱鏉$爜" placement="top">–>-->
+ <!-- <!– <i–>-->
+ <!-- <!– v-if="tableDataDetail.length===row.seq"–>-->
+ <!-- <!– class=" el-icon-camera"–>-->
+ <!-- <!– :style="{color:$store.state.settings.theme}"–>-->
+ <!-- <!– style="cursor: pointer;margin-right: 15px"–>-->
+ <!-- <!– @click="getProductInHouseLabCode(row.wo_code)"–>-->
+ <!-- <!– />–>-->
+ <!-- <!– </el-tooltip>–>-->
+ <!-- <!– </div>–>-->
+ <!-- <!– </template>–>-->
+ <!-- <!– </el-table-column>–>-->
+ <!-- </el-table>-->
+ <!-- </div>-->
+ </div>
+ <!--鏂板娲惧彂瀵硅瘽妗�-->
+ <el-dialog
+ v-el-drag-dialog
+ :title="operation==='add'?'鏂板':'娲惧彂'"
+ :visible.sync="dialogVisible"
+ width="1200px"
+ top="8vh"
+ :close-on-click-modal="false"
+ @closed="handleClose"
+ @close="handleClose"
+ >
+ <el-form
+ ref="dialogForm"
+ inline
+ :rules="dialogFormRules"
+ :model="dialogForm"
+ label-width="110px"
+ >
+
+ <el-divider content-position="left">鍩烘湰淇℃伅</el-divider>
+
+ <el-form-item
+ label="宸ュ崟鐘舵��"
+ prop="mesorderstus"
+ >
+ <el-select
+ v-model="dialogForm.mesorderstus"
+ disabled
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in erporderstusArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="宸ュ崟缂栧彿" prop="mesordercode">
+ <!-- <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px" />-->
+ <el-input v-model="dialogForm.mesordercode" disabled style="width: 200px" />
+ </el-form-item>
+ <!-- <div style="display: flex">-->
+ <el-form-item label="宸ュ崟绫诲瀷" prop="mesorderstus">
+ <el-select
+ v-model="dialogForm.ordertype"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ :disabled="operation!=='add'"
+ placeholder="璇烽�夋嫨"
+ @change="mesordertypeChange"
+ >
+ <el-option
+ v-for="item in ordertypeArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <!-- <div style="display: flex;flex-wrap: nowrap">-->
+ <el-form-item label="婧愬崟鍗曞彿">
+ <el-input
+ v-model="dialogForm.sourceorder"
+ :disabled="dialogForm.ordertype==='PO'"
+ style="width: 200px"
+ >
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ :disabled="operation!=='add'||dialogForm.ordertype==='PO'"
+ @click="mesordertsourcesearchclick"
+ />
+ </el-input>
+ </el-form-item>
+ <!-- <el-button-->
+ <!-- v-waves-->
+ <!-- type="primary"-->
+ <!-- style="padding: 0 10px;margin-left: -8px;margin-top: 3px"-->
+ <!-- class="el-icon-search"-->
+ <!-- :disabled="operation!=='add'||dialogForm.ordertype==='PO'"-->
+ <!-- @click="mesordertsourcesearchclick"-->
+ <!-- />-->
+ <!-- </div>-->
+ <!-- </div>-->
+ <el-form-item label="宸ュ崟鏁伴噺" prop="mesqty">
+ <el-input
+ v-model="dialogForm.mesqty"
+ oninput="value=value.replace(/[^\d]/g,'')"
+ style="width: 200px"
+ />
+ <!-- oninput="value=value.replace(/[^0-9*.{1}0-9*]/g,'')"-->
+ </el-form-item>
+ <el-form-item
+ label="浜у搧鍚嶇О/缂栫爜"
+ prop="partcode"
+ >
+ <el-select
+ v-model="dialogForm.partcode"
+ filterable
+ :disabled="operation!=='add'"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ @change="partcodeChangeDialog"
+ >
+ <el-option
+ v-for="item in partArr"
+ :key="item.partcode"
+ :label="item.partname+'/'+item.partcode"
+ :value="item.partcode"
+ />
+ </el-select>
+ </el-form-item>
+ <!-- <el-form-item v-if="operation!=='add'" label="浜у搧鍚嶇О" prop="partname">-->
+ <!-- <el-input v-model="dialogForm.partname" disabled style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item v-if="operation!=='add'" label="浜у搧缂栫爜">-->
+ <!-- <el-input v-model="dialogForm.partcode" disabled style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <el-form-item label="浜у搧瑙勬牸" prop="partspec">
+ <el-input v-model="dialogForm.partspec" disabled style="width: 200px" />
+ </el-form-item>
+ <!-- :disabled="dialogForm.partcode===''"-->
+ <el-form-item label="鎵�灞炶溅闂�" prop="wkshopcode">
+ <el-select
+ v-model="dialogForm.wkshopcode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨杞﹂棿"
+ >
+ <el-option
+ v-for="item in wkshopArr"
+ :key="item.torg_code"
+ :label="item.torg_name"
+ :value="item.torg_code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="棰勮浜や粯鏃ユ湡" prop="deliverydate">
+ <el-date-picker
+ v-model="dialogForm.deliverydate"
+ type="date"
+ size="mini"
+ :clearable="false"
+ class="dateMini"
+ :picker-options="pickerOptions"
+ format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ />
+ <!-- :disabled="dialogForm.deliverydate"-->
+ </el-form-item>
+
+ <el-divider content-position="left">宸ュ簭淇℃伅</el-divider>
+
+ <div style="display: flex;align-items: center">
+ <!-- <div style="font-weight: bolder">宸ュ簭閫夋嫨锛�</div>-->
+ <!-- <el-drag-select-->
+ <!-- v-model="stepSelectedValue"-->
+ <!-- style="width:930px;"-->
+ <!-- multiple-->
+ <!-- placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"-->
+ <!-- @change="stepSelectedValueChange"-->
+ <!-- >-->
+ <!-- <el-option-->
+ <!-- v-for="item in stepSelectArr"-->
+ <!-- :key="item.stepcode"-->
+ <!-- :label="item.stepname"-->
+ <!-- :value="item.stepcode"-->
+ <!-- />-->
+ <!-- </el-drag-select>-->
+ </div>
+
+ <el-table
+ ref="stepTableDataRef"
+ :data="stepTableData"
+ border
+ :row-class-name="tableRowClassName"
+ height="300"
+ style="width: 100%;margin-top: 15px;"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ row-key="stepcode"
+ >
+ <el-table-column
+ type="index"
+ label="搴忓彿"
+ width="50"
+ />
+ <!-- <el-table-column-->
+ <!-- prop="stepcode"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- label="宸ュ簭缂栫爜"-->
+ <!-- />-->
+ <el-table-column
+ prop="stepname"
+ label="宸ュ簭鍚嶇О"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="stepprice"
+ label="鐢熶骇鍗曚环"
+ show-tooltip-when-overflow
+ >
+ <!-- <template slot-scope="{row}">-->
+ <!-- <el-input-->
+ <!-- v-model="row.stepprice"-->
+ <!-- placeholder="璇疯緭鍏ュ伐搴忓崟浠�"-->
+ <!-- oninput="value=value.replace(/[^0-9.]/g,'')"-->
+ <!-- style="width: 100%"-->
+ <!-- @click.stop=""-->
+ <!-- />-->
+ <!-- </template>-->
+ </el-table-column>
+ <el-table-column
+ prop="produceq_qty"
+ label="宸茬敓鎴愭暟閲�"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="good_qty"
+ label="鍚堟牸鏁伴噺"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="ng_qty"
+ label="涓嶈壇鏁伴噺"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="laborbad_qty"
+ label="宸ュ簾鏁伴噺"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="materielbad_qty"
+ label="鏂欏簾鏁伴噺"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="delive_qty"
+ label="寰呬骇鏁伴噺"
+ show-tooltip-when-overflow
+ />
+ <!-- <el-table-column-->
+ <!-- label="鎿嶄綔"-->
+ <!-- width="120"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div class="operationClass">-->
+ <!-- <!– <el-tooltip class="item" effect="dark" content="绉诲姩" placement="top">–>-->
+ <!-- <i-->
+ <!-- class="el-icon-rank"-->
+ <!-- :style="{color:$store.state.settings.theme}"-->
+ <!-- style="cursor: move"-->
+ <!-- />-->
+ <!-- <!– </el-tooltip>–>-->
+ <!-- <!– @click="edit('edit',row)"–>-->
+
+ <!-- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">-->
+ <!-- <i-->
+ <!-- class="el-icon-delete"-->
+ <!-- :style="{color:$store.state.settings.theme}"-->
+ <!-- style="margin-left: 15px;"-->
+ <!-- @click="stepDel(row)"-->
+ <!-- />-->
+ <!-- </el-tooltip>-->
+ <!-- </div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ </el-table>
+
+ </el-form>
+
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
+ <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">棰勮</el-button>-->
+ <el-button
+ v-if="operation!=='view'"
+ v-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="dialogVisibleConfirm"
+ >纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!-- 宸ュ簭浠诲姟瀵硅瘽妗�-->
+ <el-dialog
+ v-el-drag-dialog
+ title="宸ュ簭浠诲姟"
+ :visible.sync="dialogVisibleTask"
+ width="840px"
+ top="15vh"
+ class="dialogVisibleSearch"
+ :close-on-click-modal="false"
+ @close="dialogVisibleTaskClose"
+ >
+ <el-button
+ v-waves
+ style="margin-bottom: 15px"
+ type="primary"
+ @click="supplementClick"
+ >琛ユ墦
+ </el-button>
+ <el-table
+ :data="taskTableData"
+ border
+ :row-class-name="tableRowClassName"
+ height="300"
+ style="width: 100%;"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ >
+ <el-table-column
+ prop="seq"
+ width="50"
+ label="搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="wo_code"
+ show-tooltip-when-overflow
+ label="宸ュ崟缂栧彿"
+ width="200"
+ />
+ <el-table-column
+ prop="stepcode"
+ label="宸ュ簭缂栫爜"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="stepname"
+ show-tooltip-when-overflow
+ label="宸ュ簭鍚嶇О"
+ />
+ <!-- <el-table-column-->
+ <!-- prop="flwtype"-->
+ <!-- label="宸ュ簭绫诲瀷"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.flwtype==='W'">澶栧崗</div>-->
+ <!-- <div v-if="row.flwtype==='Z'">鑷埗</div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <!-- <el-table-column-->
+ <!-- prop="descr"-->
+ <!-- label="宸ュ簭鎻忚堪"-->
+ <!-- />-->
+ <el-table-column
+ prop="plan_qty"
+ show-tooltip-when-overflow
+ label="浠诲姟鏁伴噺"
+ />
+ <el-table-column
+ prop="good_qty"
+ show-tooltip-when-overflow
+ label="鍚堟牸鏁伴噺"
+ />
+ <el-table-column
+ prop="ng_qty"
+ show-tooltip-when-overflow
+ label="涓嶈壇鏁伴噺"
+ />
+ <el-table-column
+ label="鎿嶄綔"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <el-button v-waves type="text" style="padding: 0;" @click="supplementSmallClick(row)">琛ユ墦</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleBack">杩� 鍥�</el-button>
+ <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
+ </div>
+ </span>
+ </el-dialog>
+
+ <!-- 婧愬崟鍗曞彿瀵硅瘽妗�-->
+ <el-dialog
+ v-el-drag-dialog
+ title="婧愬崟鍗曞彿"
+ :visible.sync="dialogVisibleSource"
+ width="1200px"
+ top="10vh"
+ class="dialogVisibleSearch"
+ :close-on-click-modal="false"
+ @close="dialogVisibleSourceClose"
+ >
+ <div class="bodyTopFormGroup">
+ <el-form
+ ref="sourceForm"
+ :model="sourceForm"
+ label-width="100px"
+ inline
+ style="display: flex;justify-content: space-between"
+ >
+ <div class="elForm" style="justify-content: flex-start">
+ <!-- <el-form-item-->
+ <!-- label="棰勮寮�宸ユ椂闂�"-->
+ <!-- label-width="100px"-->
+ <!-- style=" display: flex;font-size: 14px;margin-top: 3px"-->
+ <!-- >-->
+ <!-- <el-date-picker-->
+ <!-- v-model="sourceForm.paystartdate"-->
+ <!-- type="daterange"-->
+ <!-- range-separator="~"-->
+ <!-- class="timeMini"-->
+ <!-- size="mini"-->
+ <!-- style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"-->
+ <!-- :clearable="false"-->
+ <!-- start-placeholder="寮�濮嬫棩鏈�"-->
+ <!-- end-placeholder="缁撴潫鏃ユ湡"-->
+ <!-- />-->
+ <!-- <!– :picker-options="expireTimeOption"–>-->
+
+ <!-- </el-form-item>-->
+ <!-- <el-form-item-->
+ <!-- label="棰勮瀹屽伐鏃堕棿"-->
+ <!-- label-width="100px"-->
+ <!-- style=" display: flex;font-size: 14px;margin-top: 3px"-->
+ <!-- >-->
+ <!-- <el-date-picker-->
+ <!-- v-model="sourceForm.payenddate"-->
+ <!-- type="daterange"-->
+ <!-- :clearable="false"-->
+ <!-- class="timeMini"-->
+ <!-- range-separator="~"-->
+ <!-- start-placeholder="寮�濮嬫棩鏈�"-->
+ <!-- style="width: 200px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;"-->
+ <!-- end-placeholder="缁撴潫鏃ユ湡"-->
+ <!-- size="mini"-->
+ <!-- />-->
+ <!-- </el-form-item>-->
+ <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">
+ <el-select
+ v-model="sourceForm.mesordercode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in erporderstusArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
+ <el-input v-model="sourceForm.sourceorder" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
+ <el-input v-model="sourceForm.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+
+ <el-form-item v-show="isExpandDialog" label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-input v-model="sourceForm.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandDialog" label="浜у搧瑙勬牸" style=" display: flex;">
+ <el-input v-model="sourceForm.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandDialog" label="鍒涘缓浜哄憳" style=" display: flex;">
+ <el-input v-model="sourceForm.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+
+ <el-form-item
+ v-show="isExpandDialog"
+ label="鍒涘缓鏃堕棿"
+ label-width="100px"
+ style=" display: flex;font-size: 14px;margin-top: 3px"
+ >
+ <el-date-picker
+ v-model="sourceForm.createdate"
+ type="daterange"
+ range-separator="~"
+ class="timeMini"
+ size="mini"
+ style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"
+ :clearable="false"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ />
+ <!-- :picker-options="expireTimeOption"-->
+
+ </el-form-item>
+
+ </div>
+
+ <div style="display: flex;align-items: start;margin-top: 3px;z-index: 2;justify-content: end">
+ <el-button v-waves type="primary" icon="el-icon-search" @click="sourceSearch">鏌ヨ</el-button>
+ <el-button v-waves type="info" icon="el-icon-refresh" @click="sourceReset">閲嶇疆</el-button>
+ </div>
+
+ </el-form>
+ <div
+ class="bodyTopFormExpand"
+ >
+ <svg-icon
+ v-show="mouseHoverTypeDialog==='mouseout'"
+ style="cursor: pointer"
+ :icon-class="!isExpandDialog?'doubleDown3':'doubleUp3'"
+ @mouseenter="mouseHoverTypeDialog=$event.type"
+ />
+ <svg-icon
+ v-show="mouseHoverTypeDialog==='mouseenter'"
+ style="cursor: pointer"
+ :icon-class="!isExpandDialog?'doubleDown':'doubleUp'"
+ @click="isExpandDialog=!isExpandDialog"
+ @mouseout="mouseHoverTypeDialog=$event.type"
+ />
+ </div>
+ </div>
+
+ <div class="elTableDiv">
+ <el-table
+ :data="sourceTableData"
+ :height="isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px'"
+ border
+ :row-class-name="tableRowClassName"
+ :style="{width: 100+'%',height:isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px',}"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ @sort-change="sourceSortChange"
+ @row-click="getCurrentRowSource"
+ >
+ <!-- <el-table-column-->
+ <!-- type="selection"-->
+ <!-- width="50"-->
+ <!-- />-->
+ <el-table-column
+ width="50"
+ fixed
+ >
+ <template slot-scope="{row}">
+ <el-radio
+ v-model="radioSelectedId"
+ :label="row.id"
+ style="color: transparent;padding-left: 10px;"
+ />
+ <!-- @change.native="getCurrentRowSource(row.id)"-->
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="RowNum"
+ width="50"
+ fixed
+ label="搴忓彿"
+ />
+ <!-- <el-table-column-->
+ <!-- prop="status"-->
+ <!-- label="宸ュ崟鐘舵��"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- sortable="custom"-->
+ <!-- width="110"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.status==='NEW'">鏂拌鍗�</div>-->
+ <!-- <div v-if="row.status==='CREATING'">閮ㄥ垎涓嬭揪</div>-->
+ <!-- <div v-if="row.status==='CREATED'">鍏ㄩ儴涓嬭揪</div>-->
+ <!-- <div v-if="row.status==='CLOSED'">宸插叧闂�</div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <el-table-column
+ label="宸ュ崟缂栧彿"
+ prop="wo_code"
+ show-tooltip-when-overflow
+ min-width="150"
+ sortable="custom"
+ >
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.m_po">{{ row.m_po }}</div>-->
+ <!-- <div v-else>{{ row.wo_code }}</div>-->
+ <!-- </template>-->
+ </el-table-column>
+ <el-table-column
+ prop="partcode"
+ label="浜у搧缂栫爜"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="150"
+ />
+ <el-table-column
+ prop="partname"
+ label="浜у搧鍚嶇О"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="150"
+ />
+ <el-table-column
+ prop="partspec"
+ label="浜у搧瑙勬牸"
+ show-tooltip-when-overflow
+ sortable="custom"
+ min-width="110"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.partspec">{{ row.partspec }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="plan_qty"
+ label="浠诲姟鏁伴噺"
+ width="150"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+
+ <el-table-column
+ prop="bad_qty"
+ label="鎶ュ簾鏁伴噺"
+ width="150"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+
+ <!-- <el-table-column-->
+ <!-- prop="relse_qty"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- label="宸蹭笅鍗曟暟閲�"-->
+ <!-- width="150"-->
+ <!-- sortable="custom"-->
+ <!-- />-->
+ <el-table-column
+ prop="wkshp_name"
+ label="鐢熶骇杞﹂棿"
+ show-tooltip-when-overflow
+ sortable="custom"
+ width="150"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="plan_startdate"
+ label="棰勮寮�宸ユ椂闂�"
+ show-tooltip-when-overflow
+ sortable="custom"
+ width="130"
+ >
+ <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
+ sortable="custom"
+ width="130"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.plan_enddate">{{ row.plan_enddate.substring(0, 11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="lm_user"
+ label="鍒涘缓浜哄憳"
+ show-tooltip-when-overflow
+ sortable="custom"
+ width="150"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.lm_user">{{ row.lm_user }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="lm_date"
+ label="鍒涘缓鏃堕棿"
+ show-tooltip-when-overflow
+ width="130"
+ 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-->
+ <!-- label="鎿嶄綔"-->
+ <!-- fixed="right"-->
+ <!-- width="80"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div class="operationClass">-->
+ <!-- <el-tooltip class="item" effect="dark" content="涓嬭揪" placement="top">-->
+ <!-- <!– <el-button v-waves type="text" @click="edit('edit',row)">涓嬭揪</el-button>–>-->
+ <!-- <i-->
+ <!-- class="el-icon-bottom"-->
+ <!-- style="color:#42b983;cursor: pointer;margin-left: 5px"-->
+ <!-- @click="edit('edit',row)"-->
+ <!-- />-->
+ <!-- </el-tooltip>-->
+ <!-- </div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ </el-table>
+ </div>
+ <!--鍒嗛〉-->
+ <pagination
+ :total="sourceFormTotal"
+ :page.sync="sourceForm.page"
+ :limit.sync="sourceForm.rows"
+ align="right"
+ layout="total,prev, pager, next,sizes"
+ popper-class="select_bottom"
+ @pagination="getMesBadOrderSearch"
+ />
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleSourceBack">杩� 鍥�</el-button>
+ <el-button v-waves type="primary" @click="dialogVisibleSourceConfirm">纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!--鎵撳嵃棰勮瀵硅瘽妗� 澶ф爣绛�-->
+ <el-dialog
+ v-el-drag-dialog
+ title=""
+ :visible.sync="dialogVisibleApprove"
+ width="812px"
+ class="dialogVisibleConfirmClass"
+ append-to-body
+ :close-on-click-modal="false"
+ @close="dialogVisibleConfirmClose"
+ >
+ <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
+ <div id="printMe" style="padding: 30px">
+ <div style="font-size: 26px; text-align: center">娴佺▼鍗�</div>
+
+ <div style="display: flex;justify-content: space-around;margin-top: 20px; position: relative;">
+ <div style="width: 78%">
+ <el-form
+ ref="formApprove"
+ :model="formApprove"
+ label-width="80px"
+ inline
+ style="display: flex;justify-content: space-between"
+ >
+ <div class="elForm">
+ <el-form-item label="宸ュ崟缂栧彿:" class="formContent">
+ {{ formApprove.mesordercode }}
+ </el-form-item>
+ <el-form-item label="婧愬崟鍗曞彿:" class="formContent">
+ {{ formApprove.m_po }}
+ </el-form-item>
+ <el-form-item label="浜у搧缂栫爜:" class="formContent">
+ {{ formApprove.partcode }}
+ </el-form-item>
+ <el-form-item label="浜у搧鍚嶇О:" class="formContent">
+ {{ formApprove.partname }}
+ </el-form-item>
+ <el-form-item label="浜у搧瑙勬牸:" class="formContent">
+ {{ formApprove.partspec }}
+ </el-form-item>
+ <el-form-item label="宸ュ崟鏁伴噺:" class="formContent">
+ {{ formApprove.plan_qty }}
+ </el-form-item>
+ <!-- <el-form-item label="宸ヨ壓璺嚎:" class="formContent">-->
+ <!-- {{ formApprove.routename }}-->
+ <!-- </el-form-item>-->
+ <el-form-item label="鎵撳嵃浜哄憳:" class="formContent">
+ <!-- {{ localStorage.getItem('username') }}-->
+ {{ formApprove.routename }}
+ </el-form-item>
+ <el-form-item label="鎵撳嵃鏃堕棿:" class="formContent">
+ {{ formApprove.lm_date }}
+ </el-form-item>
+ </div>
+ </el-form>
+ </div>
+ <div
+ id="qrCode"
+ style="width: 22%;height:90px;
+ margin-top: 20px;
+ overflow-y: scroll;display: flex;
+ justify-content: center;
+ position: relative;"
+ >
+ <div id="qrCode0" ref="qrCodeDiv0" />
+ </div>
+ <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />
+ <div
+ style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"
+ />
+ </div>
+
+ <!-- <div style="width:100%;height: 30px;border-bottom: 1px solid #eee;margin-bottom: 20px" />-->
+ <el-table
+ id="table"
+ :data="tableDataPrint"
+ border
+ class="tableDataPrint"
+ :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000'}"
+ :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000'}"
+ style="width: 100%;margin-top: 20px;text-align: center;border-color: #000"
+ >
+ <el-table-column
+ id="column0"
+ prop="seq"
+ label="宸ュ簭鍙�"
+ width="70"
+ align="center"
+ />
+ <el-table-column
+ id="column1"
+ prop="stepqrcode"
+ label="宸ュ簭浜岀淮鐮�"
+ width="100"
+ align="center"
+ >
+ <template slot-scope="{row}">
+ <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" class="tableColumn" />
+ </template>
+ </el-table-column>
+ <el-table-column
+ id="column2"
+ prop="stepname"
+ label="宸ュ簭"
+ width="120"
+ align="center"
+ />
+ <el-table-column
+ id="column3"
+ prop="plan_qty"
+ label="鍔犲伐鏁伴噺"
+ width="100"
+ align="center"
+ />
+ <el-table-column
+ id="column4"
+ prop="good_qty"
+ width="100"
+ align="center"
+ label="鍚堟牸鏁伴噺"
+ />
+ <el-table-column
+ id="column5"
+ width="100"
+ prop="ng_qty"
+ align="center"
+ label="涓嶈壇鏁伴噺"
+ />
+ <el-table-column
+ id="column6"
+ prop="desc"
+ align="center"
+ width="120"
+ label="澶囨敞"
+ />
+ </el-table>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleBackPreview">杩� 鍥�</el-button>
+ <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
+ <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�/鎵� 鍗�</el-button>-->
+ <el-button v-waves v-print="printObj" type="primary">鎵� 鍗�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!--鎵撳嵃棰勮椤甸潰 灏忔爣绛�-->
+ <el-dialog
+ v-el-drag-dialog
+ title="棰勮"
+ :visible.sync="dialogVisible2"
+ width="1000"
+ top="10vh"
+ :close-on-click-modal="false"
+ @close="dialogVisible2Close"
+ >
+ <div style="height: 650px;overflow:auto;">
+ <!-- 涓嬫媺妗嗛�夋嫨鎵撳嵃灏哄-->
+ <div v-if="!isLastPrint" style="display: flex;align-items: center;margin: 0 0 20px 0">
+ <div>閫夋嫨鎵撳嵃灏哄锛�</div>
+ <el-select
+ v-model="printSize"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ @change="printSizeChange"
+ >
+
+ <el-option
+ v-for="item in printSizeSelectArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </div>
+ <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
+ <!-- <div id="printMe2" :style="{paddingLeft:'10px',paddingTop: '5px'}">-->
+ <div v-if="!isLastPrint" :style="printMe2StylePadding(printSize)">
+ <!-- 80 * 50-->
+ <div
+ v-if="printSize===0"
+ style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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;">涓嬮亾宸ュ簭:</div>
+ <div>{{ qrForm.nextstepname }}</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>
+ <!-- 78 * 60 -->
+ <div
+ v-if="printSize===1"
+ style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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;">涓嬮亾宸ュ簭:</div>
+ <div>{{ qrForm.nextstepname }}</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>
+ <!-- 60 * 40 -->
+ <div
+ v-if="printSize===2"
+ style="display: flex;width: 220px;height: 130px;border: 1px solid #000;text-align: center;font-size: 12px"
+ >
+
+ <div style="width: 70px;display: flex;flex-direction: column;border-right: 1px solid #000">
+ <div
+ style="display: flex;height: 60%;border-bottom:1px solid #000;
+ justify-content: center;align-items: center;position: relative"
+ >
+ <div
+ id="qrCode2"
+ ref="qrCodeDiv2"
+ style="overflow-y: hidden;height:71%;position: absolute;left: 7px;"
+ />
+ </div>
+ <div
+ style="display: flex;height: 20%;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+ >
+ <div style="margin-left: 3px; ">鏁伴噺:{{ qrForm.startqty }}</div>
+ </div>
+ <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;">
+ <div style="margin-left: 3px; ">鎿嶄綔:{{ qrForm.operator }}</div>
+
+ </div>
+ </div>
+
+ <div style="width:150px;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="margin-left: 3px;">缂栧彿:{{ 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="margin-left: 3px;">浜у搧缂栫爜:{{ 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="margin-left: 3px;">浜у搧鍚嶇О:{{ 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="margin-left: 3px;">涓嬮亾宸ュ簭:{{ qrForm.nextstepname }}</div>
+
+ </div>
+ <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
+ <div style=" margin-left: 3px;">鏃堕棿: {{ qrForm.operatorTime }}</div>
+ <!-- <div>{{ qrForm.operatorTime?qrForm.operatorTime.substring(5):'' }}</div>-->
+ <!-- <div>{{ qrForm.operatorTime }}</div>-->
+ </div>
+
+ </div>
+
+ </div>
+ <div
+ v-if="printSize===5"
+ style="display: flex;width: 140px;height: 80px;border: 1px solid #000;text-align: center;font-size: 10px;"
+ >
+
+ <div v-if="false" style="width: 45px;display: flex;flex-direction: column;border-right: 1px solid #000">
+ <div
+ style="display: flex;height: 60px;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: 20px;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: 20px;justify-content: flex-start;align-items: center">
+ <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
+ {{ qrForm.operator }}
+ </div>
+ </div>
+
+ <div style="width:100%;display: flex;flex-direction: column;">
+ <div
+ style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: center;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: center;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: center;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: center;align-items: center;text-align: left"
+ >
+ <!-- <div style="width:60px;margin-left: 5px;">涓嬮亾宸ュ簭:</div>-->
+ <div>{{ qrForm.nextstepname }}</div>
+ </div>
+ <div style="display: flex;height: 20%;justify-content: center;align-items: center;text-align: left">
+ <!-- <div style="width: 60px;margin-left: 5px;">澶勭悊鏃堕棿:</div>-->
+ <div>{{ qrForm.operatorTime }}</div>
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+
+ <div v-if="isLastPrint" style="display: flex;flex-direction: column">
+
+ <div style="display: flex;font-weight: bold;font-size: 16px;margin-bottom: 20px;">
+ <div style="width: 48%;">
+ 璇烽�夋嫨鍏ュ簱鏉$爜
+ </div>
+ <div style="width: 48%;margin-left: 4%;">
+ 宸查�変腑鐨勫叆搴撴潯鐮�
+ </div>
+ </div>
+
+ <div style="display: flex;">
+ <!-- 璇烽�夋嫨鍏ュ簱鏉$爜-->
+ <div style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;">
+ <div
+ v-for="(item,index) in lastPrintArr"
+ :key="item.inbarcode"
+ :style="{marginTop:index===0?'':'15px'}"
+ style="display: flex;align-items: center;"
+ >
+
+ <!-- v-if="printSize===0"-->
+ <div style="margin-right:40px">
+ <el-checkbox
+ :key="item.inbarcode"
+ v-model="item.checked"
+ @change="val=>inbarcodeChange(val,item)"
+ />
+ </div>
+ <div
+ style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+ >
+ <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
+ {{ item.good_qty }}
+ </div>
+ <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
+ <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
+ {{ item.username }}
+ </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>{{ item.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>{{ item.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>{{ item.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;">浜у搧瑙勬牸:</div>
+ <div>{{ item.partspec ? item.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>{{ item.lm_date }}</div>
+ </div>
+
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+
+ <!-- 宸查�変腑鐨勫叆搴撴潯鐮�-->
+ <div
+ style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;margin-left: 50px;"
+ >
+ <div id="printMe2">
+ <div
+ v-for="(item,index) in lastPrintArrSelected"
+ v-if="item.checked"
+ :key="item.inbarcode"
+ :style="{marginTop:index===0?'':'15px'}"
+ style="display: flex;align-items: center;"
+ >
+ <div
+ style="display: flex;width: 280px;height: 160px;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: 96px;border-bottom:1px solid #000;
+ justify-content: center;align-items: center;position: relative"
+ >
+ <div
+ id="qrCode3"
+ ref="qrCodeDiv3"
+ style="overflow-y: hidden;height:60px;position: absolute;left: 14px;"
+ />
+ </div>
+ <div
+ style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+ >
+ <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
+ {{ item.good_qty }}
+ </div>
+ <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
+ <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
+ {{ item.username }}
+ </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>{{ item.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>{{ item.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>{{ item.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;">浜у搧瑙勬牸:</div>
+ <div>{{ item.partspec ? item.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>{{ item.lm_date }}</div>
+ </div>
+
+ </div>
+
+ </div>
+
+ </div>
+ </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
+ :close-on-click-modal="false"
+ title="鍏宠仈宸ヨ壓璺嚎"
+ :visible.sync="dialogVisibleRoute"
+ width="800px"
+ top="10vh"
+ :fullscreen="isIpad"
+ class="dialogVisibleRoute"
+ @closed="handleCloseRoute"
+ @close="handleCloseRoute"
+ >
+ <div>
+ <i class="el-icon-s-comment" style="color:#42b983;" /> 浜у搧鍚嶇О锛歿{ dialogFormRoute.projectName }}
+ </div>
+ <el-divider />
+ <div style="margin-bottom: 10px">
+ <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ヨ壓璺嚎闆嗗悎
+ </div>
+
+ <div class="myCheckboxGroup">
+ <div
+ v-for="item in dialogFormRoute.routeOperationArr"
+ :key="item.code"
+ :style="{border:item.isSelected1?'1px solid #42b983':'1px solid #eee'}"
+ class="myCheckbox"
+ @click="myCheckboxClick(item)"
+ >
+ <input
+ class="myCheckboxInput"
+ type="checkbox"
+ :value="item.code"
+ :name="item.name"
+ :style="{color:item.isSelected2?'#42b983':'#fff'}"
+ @click="myCheckboxInputClick(item)"
+ >{{ item.name }}
+ <!-- 鐖跺瓙鐐瑰嚮浜嬩欢涓嶅奖鍝�-->
+ <!-- onClick="event.cancelBubble = true"-->
+ </div>
+ </div>
+
+ <el-divider />
+ <div>
+ <i class="el-icon-s-operation" style="color:#42b983;" /> 榛樿宸ヨ壓璺嚎
+ </div>
+ <div style="margin-top: 20px">
+ <el-select
+ v-model="defaultroute_code"
+ filterable
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ class="defaultroute_code"
+ >
+ <el-option
+ v-for="item in defaultroute_codeArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </div>
+ <el-divider />
+ <div style="margin-bottom: 10px">
+ <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ュ簭鍒楄〃
+ </div>
+ <div style="overflow-y: scroll">
+ <el-table
+ ref="projectTableData"
+ :data="projectTableData"
+ border
+ height="280"
+ :row-class-name="tableRowClassName"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ >
+ <el-table-column
+ prop="seq"
+ width="100"
+ label="宸ュ簭搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="stepcode"
+ label="宸ュ簭缂栫爜"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="stepname"
+ label="宸ュ簭鍚嶇О"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="enable"
+ label="鍚敤鐘舵��"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.enable==='Y'">
+ <svg-icon icon-class="circleYes" style="margin-right: 2px" />
+ 鏄�
+ </div>
+ <div v-if="row.enable==='N'">
+ <svg-icon icon-class="circleNo" style="margin-right: 2px" />
+ 鍚�
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="routeDialogVisibleCancel">鍙� 娑�</el-button>
+ <el-button v-waves type="primary" @click="routeDialogVisibleConfirm">纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ </div>
+</template>
+
+<script>
+import Pagination from '@/components/Pagination'
+import { handleDatetime, handleDatetime2, validateCode } from '@/utils/global'
+import { getCookie } from '@/utils/auth'
+import QRCode from 'qrcodejs2'
+import $ from 'jquery'
+import elDragDialog from '@/directive/el-drag-dialog'
+import waves from '@/directive/waves'
+import {
+ AddMesOrderCodeSearch,
+ AddUpdateMesOrder, DeleteMesOrder,
+ MesBadOrderSearch, MesOrderDistribution,
+ MesOrderClosedSearch,
+ UpdateMesOrderStepSearch, MesOrderBitchClosedSeave
+} from '@/api/WorkOrder'
+import { PartSelect } from '@/api/ProductModel'
+import { PrentOrganization, PrentOrganizationNoCompany, StepData } from '@/api/GeneralBasicData'
+import Sortable from 'sortablejs'
+import ElDragSelect from '@/components/DragSelect'
+import { MesOrderPrintSearch } from '@/api/GridReport' // base on element-ui
+
+export default {
+ name: 'WorkOrderClose',
+ components: {
+ Pagination, ElDragSelect
+ },
+ directives: { elDragDialog, waves },
+ data() {
+ return {
+ mouseHoverType: 'mouseout',
+ mouseHoverTypeDialog: 'mouseout',
+ isExpandForm: false,
+ isIpad: false,
+ mainHeight: 0,
+ tableHeight: 0,
+ username: '',
+ form: {
+ wkshopcode: '',
+ mesorderstus: '', // 宸ュ崟鐘舵�佺爜
+ mesordercode: '', // 宸ュ崟缂栧彿
+ partcode: '', // 浜у搧缂栫爜
+ ordertype: '', // ordertype
+ sourceorder: '', // 婧愬崟鍗曞彿
+ saleordercode: '', // 閿�鍞鍗�
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+ creatuser: '', // 鍒涘缓浜哄憳
+ createdate: '', // 鍒涘缓鏃堕棿
+ prop: 'lm_date', // 鎺掑簭瀛楁
+ order: 'desc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ },
+ erporderstusArr: [
+ // { code: 'NEW', name: '鏂板伐鍗�' }
+ // { code: 'CREATING', name: '鎵ц涓�' },
+ // { code: 'CREATED', name: '宸插叧闂�' }
+ // { code: 'ALLO', name: '宸叉淳鍙�' }
+ // 宸插叧闂細CLOSED 鏈叧闂細NOCLOSED
+ { code: 'NOCLOSED', name: '鏈叧闂�' },
+ { code: 'CLOSED', name: '宸插叧闂�' }
+ // { code: 'NOSCHED', name: '寰呮帓绋�' },
+ // { code: 'SCHED', name: '宸叉帓绋�' }
+ ],
+ wkshopcodeArr: [],
+ total: 10,
+ tableData: [],
+ dialogVisible: false,
+ dialogForm: {
+ mesorderstus: 'NEW', // 宸ュ崟鐘舵�佺爜
+ mesordercode: '', // 宸ュ崟缂栧彿
+ ordertype: 'PO', // 宸ュ崟绫诲瀷
+ sourceorderid: '', // 婧愬崟id
+ sourceorder: '', // 婧愬崟鍗曞彿
+
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+
+ mesqty: '', // 宸ュ崟鏁伴噺
+ wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
+ wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
+
+ deliverydate: '', // 浜や粯鏃堕棿
+ data_sources: '', // 鏁版嵁鏉ユ簮
+
+ mesmaxqty: 0// 宸ュ崟鐨勬渶澶у��
+ },
+ ordertypeArr: [// 宸ュ崟绫诲瀷
+ { code: 'PO', name: '鏍囧噯宸ュ崟' },
+ { code: 'FO', name: '鎶ュ簾琛ュ崟' }
+ ],
+ partArr: [], // 浜у搧淇℃伅
+ wkshopArr: [], // 鐢熶骇杞﹂棿鏁扮粍
+ routeArr: [], // 宸ヨ壓璺嚎鏁扮粍
+ orderlevArr: [
+ { code: 1, name: '鐗圭骇' },
+ { code: 2, name: '绱ф��' },
+ { code: 3, name: '姝e父' }
+ ], // 宸ュ崟绛夌骇鏁扮粍
+ operation: '',
+ dialogFormRules: {
+ mesorderstus: [
+ { required: true, message: '璇烽�夋嫨璁㈠崟鐘舵��', trigger: ['blur', 'change'] }
+ ],
+ partcode: [
+ { required: true, message: '璇烽�夋嫨浜у搧淇℃伅', trigger: ['blur', 'change'] }
+ ],
+ mesordercode: [
+ { required: true, validator: validateCode, trigger: ['blur', 'change'] }
+ ],
+ mesqty: [
+ { required: true, message: '璇疯緭鍏ュ伐鍗曟暟閲�', trigger: ['blur', 'change'] }
+ ],
+ wkshopcode: [
+ { required: true, message: '璇烽�夋嫨鐢熶骇杞﹂棿', trigger: ['blur', 'change'] }
+ ],
+ deliverydate: [
+ { required: true, message: '璇烽�夋嫨棰勮浜や粯鏃ユ湡', trigger: ['blur', 'change'] }
+ ],
+ planstartdate: [
+ { required: true, message: '璇烽�夋嫨寮�濮嬫椂闂�', trigger: ['blur', 'change'] }
+ ],
+ planenddate: [
+ { required: true, message: '璇烽�夋嫨缁撴潫鏃堕棿', trigger: ['blur', 'change'] }
+ ],
+ orderlev: [
+ { required: true, message: '璇烽�夋嫨宸ュ崟绛夌骇', trigger: ['blur', 'change'] }
+ ],
+ isAps: [
+ { required: true, message: '璇烽�夋嫨鏄惁鎺掔▼', trigger: ['blur', 'change'] }
+ ],
+ bomId: [
+ { required: true, message: '璇烽�夋嫨鐗╂枡娓呭崟', trigger: ['blur', 'change'] }
+ ]
+
+ },
+ dialogVisibleTask: false,
+ taskTableData: [],
+
+ dialogVisibleSearch: false,
+ searchTableData: [],
+ dialogVisibleApprove: false,
+ tableDataPrint: [], // 鎵撳嵃椤甸潰鍐呭
+ printObj: {
+ id: 'printMe',
+ popTitle: '鎵撳嵃妯℃澘',
+ preview: false,
+ extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
+ closeCallback(vue) { // 鍏抽棴鎵撳嵃鐨勫洖璋冧簨浠讹紙鏃犳硶纭畾鐐瑰嚮鐨勬槸纭杩樻槸鍙栨秷锛�
+ console.log('11212', vue)
+ // vue.dialogVisible = false
+ vue.dialogVisibleApprove = false
+ },
+ beforeOpenCallback(vue) {
+ vue.printLoading = true
+ console.log('鎵撳紑涔嬪墠')
+ console.log()
+ },
+ openCallback(vue) {
+ vue.printLoading = false
+ console.log('鎵ц浜嗘墦鍗�')
+ }
+ },
+
+ formApprove: {
+ m_po: '', // 婧愬崟鍗曞彿
+ mesordercode: '',
+ partcode: '',
+ partname: '',
+ partspec: '',
+ plan_qty: '',
+ routename: '',
+ lm_date: ''
+ },
+ number: '',
+ 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: '',
+ nextstepname: '',
+ operator: '', // 鎿嶄綔浜�
+ operatorTime: ''// 鎿嶄綔鏃堕棿
+ },
+ dialogVisibleSource: false,
+ sourceTableData: [],
+ sourceForm: {
+ mesordercode: '', // 宸ュ崟缂栧彿
+ sourceorder: '', // 璁㈠崟缂栧彿
+ saleordercode: '', // 閿�鍞鍗曞彿
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+ creatuser: '', // 鍒涘缓浜哄憳
+ // paystartdate: '', // 浜や粯鏃堕棿
+ // paystartdate: '', // 棰勮寮�宸ユ椂闂�
+ // payenddate: '', // 棰勮瀹屽伐鏃堕棿
+ createdate: '', // 鍒涘缓鏃堕棿
+
+ prop: 'lm_date', // 鎺掑簭瀛楁
+ order: 'desc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ },
+ sourceFormTotal: 10,
+ radioSelectedId: '',
+ isExpandDialog: false, // 瀵硅瘽妗嗚〃鍗曟槸鍚﹀睍寮�锛岄粯璁や笉灞曞紑
+ dialogVisibleRoute: false,
+ dialogFormRoute: {
+ projectName: '', // 浜у搧鍚嶇О
+ projectCode: '', // 浜у搧浠g爜
+ routeOperationArr: [] // 宸ヨ壓璺嚎闆嗗悎
+ },
+ defaultroute_code: '', // 榛樿宸ヨ壓璺嚎閫変腑鍊�
+ defaultroute_codeArr: '', // 榛樿宸ヨ壓璺嚎鏁扮粍
+ projectTableData: [], // 璁惧鍒楄〃
+ tableDataDetail: [], // 鐐瑰嚮宸ュ崟琛ㄧ殑琛� 鏄剧ず璇︾粏淇℃伅
+ printSize: 0,
+ printSizeSelectArr: [// 瀹�*楂�
+ { code: 0, name: '80*50' },
+ { code: 1, name: '78*60' },
+ { code: 2, name: '60*40' }
+ // { code: 2, name: '50*60' },
+ // { code: 3, name: '50*40' },
+ // { code: 4, name: '50*80' },
+ // { code: 5, name: '40*30' }
+ ],
+ pickerOptions: {
+ disabledDate(time) {
+ return time.getTime() < Date.now() - 8.64e7
+ }
+ },
+
+ isLastPrint: false, // 鏄惁鏄湯閬撴墦鍗�
+ lastPrintArr: [], // 鏈亾鎵撳嵃鐨勬暟缁�(鎵�鏈�)
+ lastPrintArrSelected: [], // 鏈亾鎵撳嵃鐨勬暟缁�(閫変腑)
+
+ switchButton: false,
+
+ routeStepArr: '',
+
+ stepTableData: [],
+ sortable: null,
+ stepSelectArr: [], // 宸ュ簭涓嬫媺鏁版嵁
+ stepSelectedValue: [], // 涓嬫媺閫変腑鍊�
+
+ multipleSelection: []
+ }
+ },
+ watch: {
+ 'stepSelectedValue': {
+ // deep: true,
+ handler: function(val) {
+ // do something with the new and old value of stepSelectedValue
+ console.log(val, 1)
+ const arr = JSON.parse(JSON.stringify(this.stepTableData))
+ const arrStepcode = arr.map(i => i.stepcode)
+ this.stepTableData = []
+ val.forEach(i => {
+ this.stepTableData.push(
+ {
+ stepcode: i,
+ stepname: this.stepSelectArr.find(j => j.stepcode === i).stepname,
+ stepprice: arrStepcode.includes(i) ? arr.find(j => j.stepcode === i).stepprice : 0
+ }
+ )
+ })
+ }
+ }
+ },
+ activated() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+ },
+ created() {
+ this.handleRequest()
+ },
+ mounted() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+
+ // this.$nextTick(() => {
+ // this.setSort()
+ // })
+ },
+ methods: {
+ setSort() {
+ const el = this.$refs.stepTableDataRef.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
+ this.sortable = Sortable.create(el, {
+ ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
+ setData: function(dataTransfer) {
+ // to avoid Firefox bug
+ // Detail see : https://github.com/RubaXa/Sortable/issues/1012
+ dataTransfer.setData('Text', '')
+ },
+ onEnd: evt => {
+ const targetRow = this.stepTableData.splice(evt.oldIndex, 1)[0]
+ this.stepTableData.splice(evt.newIndex, 0, targetRow)
+
+ this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ // for show the changes, you can delete in you code
+ // const tempIndex = this.newList.splice(evt.oldIndex, 1)[0]
+ // this.newList.splice(evt.newIndex, 0, tempIndex)
+ }
+ })
+ },
+ tableRowClassName({ row, rowIndex }) {
+ return 'custom-row'
+ },
+ handleRequest() {
+ this.getMesOrderClosedSearch().then(res => {
+ if (res.code === '200') {
+ this.getSelect()
+ this.getPrentOrganizationNoCompany()
+ }
+ })
+ },
+ async getPrentOrganizationNoCompany() {
+ const { data: res } = await PrentOrganizationNoCompany()
+ this.wkshopcodeArr = res
+ },
+ async getMesOrderClosedSearch() {
+ // let tempDate = this.form.createdate
+ // if (tempDate.length > 0) {
+ // tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
+ // }
+
+ const data = {
+ wkshopcode: this.form.wkshopcode,
+ mesorderstus: this.form.mesorderstus, // 宸ュ崟鐘舵�佺爜
+ mesordercode: this.form.mesordercode, // 宸ュ崟缂栧彿
+ partcode: this.form.partcode, // 浜у搧缂栫爜
+ partname: this.form.partname, // 浜у搧鍚嶇О
+ partspec: this.form.partspec, // 浜у搧瑙勬牸
+ creatuser: this.form.creatuser, // 鍒涘缓浜哄憳
+ sourceorder: this.form.sourceorder, // 婧愬崟鍗曞彿
+ saleordercode: this.form.saleordercode, // 閿�鍞鍗�
+ ordertype: this.form.ordertype, // 鍗曟嵁绫诲瀷
+ createdate: this.form.createdate.toString().length > 0 ? handleDatetime(this.form.createdate) : '', // 鍒涘缓鏃堕棿
+ prop: this.form.prop, // 鎺掑簭瀛楁
+ order: this.form.order, // 鎺掑簭瀛楁
+ page: this.form.page, // 绗嚑椤�
+ rows: this.form.rows // 姣忛〉澶氬皯鏉�
+ }
+ const res = await MesOrderClosedSearch(data)
+ this.tableData = res.data
+ this.total = res.count
+
+ // this.form.createdate = tempDate
+ return { code: res.code }
+ },
+ async getSelect() {
+ // 鑾峰彇浜у搧淇℃伅
+ const { data: res1 } = await PartSelect()
+ this.partArr = res1
+
+ // 鑾峰彇缁勭粐
+ const { data: res2 } = await PrentOrganization()
+ this.wkshopArr = res2
+
+ // 鑾峰彇宸ュ簭
+ const { data: res3 } = await StepData()
+ this.stepSelectArr = res3
+ },
+ // 璁㈠崟鐘舵�佹敼鍙樻椂
+ erporderstusChange(val) {
+ this.form.mesorderstus = val
+ },
+ // 鎺掑簭鏀瑰彉鏃�
+ 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.getMesOrderClosedSearch()
+ },
+ sourceSortChange({ column, prop, order }) {
+ if (order === 'descending') {
+ order = 'desc'
+ } else if (order === 'ascending') {
+ order = 'asc'
+ } else {
+ order = 'desc'
+ }
+ this.sourceForm.order = order
+ this.sourceForm.prop = prop
+ this.getMesBadOrderSearch()
+ },
+ // 鏌ヨ
+ search() {
+ this.getMesOrderClosedSearch()
+ },
+
+ // 閲嶇疆
+ reset(val) {
+ this.form.wkshopcode = ''
+ this.form.mesorderstus = ''
+ this.form.mesordercode = ''
+ this.form.partcode = ''
+ this.form.partname = ''
+ this.form.partspec = ''
+ this.form.paydate = ''
+ this.form.creatuser = ''
+ this.form.sourceorder = ''
+ this.form.ordertype = ''
+ this.form.createdate = ''
+ this.getMesOrderClosedSearch()
+ },
+ // 鏂板鎸夐挳
+ async add(operation) {
+ const { data: res } = await AddMesOrderCodeSearch()
+ this.dialogForm.mesordercode = res
+ this.operation = operation
+ this.dialogVisible = true
+ this.dialogForm.data_sources = 'MES'
+
+ this.$nextTick(() => {
+ this.setSort()
+ })
+ },
+ // 宸ュ簭浠诲姟
+ 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.dialogForm.mesordercode = res[0].wo_code
+ // this.dialogVisibleTask = true
+ },
+ dialogVisibleBack() {
+ this.dialogVisibleTask = false
+ },
+ handleSelectionChange(val) {
+ this.multipleSelection = val.map(i => i.wo_code)
+ },
+
+ selected(row, index) {
+ return row.status !== 'CLOSED'
+ },
+ // 娲惧彂
+ send() {
+ this.$confirm('鏄惁纭娲惧彂?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ MesOrderDistribution(this.multipleSelection).then(res => {
+ if (res.code === '200') {
+ this.$notify.success('娲惧彂鎴愬姛!')
+ if (this.form.page > 1 && this.tableData.length === 1) {
+ this.form.page--
+ }
+ this.getMesOrderClosedSearch()
+ }
+ })
+ }).catch(() => {
+ this.$notify.info('宸插彇娑堟淳鍙�')
+ })
+ },
+ // 鍒犻櫎鎸夐挳
+ async del(row) {
+ if (row.status === 'START' || row.status === 'CLOSED' || row.status === 'SCHED') {
+ return this.$message.info('姝ゅ伐鍗曚笉鍙垹闄わ紒')
+ }
+ this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ const data = {
+ souceid: row.sourceid ? row.sourceid : '',
+ wocode: row.wo_code,
+ m_po: row.m_po,
+ orderqty: row.plan_qty
+ }
+ DeleteMesOrder(data).then(res => {
+ if (res.code === '200') {
+ this.$notify.success('鍒犻櫎鎴愬姛!')
+ if (this.form.page > 1 && this.tableData.length === 1) {
+ this.form.page--
+ }
+ this.getMesOrderClosedSearch()
+ }
+ })
+ }).catch(() => {
+ this.$notify.info('宸插彇娑堝垹闄�')
+ })
+ },
+
+ // 淇敼鎸夐挳
+ async edit(operation, row) {
+ this.operation = operation
+
+ this.dialogForm.data_sources = row.data_sources
+ this.dialogForm.mesorderstus = row.status
+ this.dialogForm.mesordercode = row.wo_code
+ this.dialogForm.ordertype = row.wotype
+ this.dialogForm.sourceorderid = row.sourceid
+ this.dialogForm.sourceorder = row.m_po
+ this.dialogForm.partcode = row.partcode
+ this.dialogForm.partname = row.partname
+ this.dialogForm.partspec = row.partspec
+ this.dialogForm.wkshopcode = row.wkshp_code
+ this.dialogForm.deliverydate = row.saleOrderDeliveryDate.substring(0, 11)
+ this.dialogForm.mesqty = row.plan_qty
+
+ const data = {
+ sourceid: this.dialogForm.sourceorderid,
+ sourcewo: this.dialogForm.sourceorder,
+ wocode: this.dialogForm.mesordercode,
+ data_sources: this.dialogForm.data_sources
+ }
+ const { data: res } = await UpdateMesOrderStepSearch(data)
+ this.dialogForm.mesmaxqty = res.canupdate_qty
+ this.stepTableData = res.stepdata
+ // res.stepdata.forEach(i => {
+ // this.stepTableData.push(
+ // {
+ // stepcode: i.step_code,
+ // stepname: i.stepname,
+ // stepprice: i.stepprice
+ // }
+ // )
+ // })
+ // this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+
+ this.dialogVisible = true
+ },
+ // 宸ュ崟鍏抽棴浜嬩欢
+ async orderClose(row) {
+ this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ if (row) { // 琛屽叧闂伐鍗�
+ this.multipleSelection = [row.wo_code]
+ }
+ MesOrderBitchClosedSeave(this.multipleSelection).then(res => {
+ if (res.code === '200') {
+ this.$notify.success('鍏抽棴鎴愬姛!')
+ // if (this.form.page > 1 && this.tableData.length === 1) {
+ // this.form.page--
+ // }
+ this.getMesOrderClosedSearch()
+ }
+ })
+ }).catch(() => {
+ this.$notify.info('宸插彇娑堝垹闄わ紒')
+ })
+ },
+ // 瀵硅瘽妗嗕骇鍝佷俊鎭�兼敼鍙�
+ partcodeChangeDialog(val) {
+ console.log(val)
+ this.dialogForm.partname = this.partArr.find(item => item.partcode === val).partname
+ this.dialogForm.partcode = this.partArr.find(item => item.partcode === val).partcode
+ this.dialogForm.partspec = this.partArr.find(item => item.partcode === val).partspec
+ },
+ // 瀵硅瘽妗嗗叧闂簨浠�
+ handleClose() {
+ this.dialogForm = {
+ mesorderstus: 'NEW', // 宸ュ崟鐘舵�佺爜
+ mesordercode: '', // 宸ュ崟缂栧彿
+ ordertype: 'PO', // 宸ュ崟绫诲瀷
+ sourceorderid: '', // 婧愬崟id
+ sourceorder: '', // 婧愬崟鍗曞彿
+
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+
+ mesqty: '', // 宸ュ崟鏁伴噺
+ wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
+ wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
+
+ deliverydate: '', // 浜や粯鏃堕棿
+ data_sources: '' // 鏁版嵁鏉ユ簮
+ }
+ this.stepSelectedValue = []
+ this.stepTableData = []
+ this.$refs.dialogForm.clearValidate()
+ },
+ // 瀵硅瘽妗嗗彇娑�
+ dialogVisibleCancel() {
+ this.dialogVisible = false
+ },
+ // 瀵硅瘽妗嗙‘璁�
+ dialogVisibleConfirm() {
+ this.$refs.dialogForm.validate(valid => {
+ if (valid) {
+ if (this.dialogForm.ordertype === 'FO' && this.dialogForm.sourceorder.toString().trim().length <= 0) {
+ return this.$message.info('婧愬崟鍗曞彿涓嶈兘涓虹┖锛�')
+ }
+
+ if (this.dialogForm.data_sources === 'ERP' && this.dialogForm.mesmaxqty < this.dialogForm.mesqty) {
+ return this.$message.info('姝ゅ伐鍗曠殑鏈�澶т慨鏀规暟鍊间负锛�' + this.dialogForm.mesmaxqty)
+ }
+
+ const workListSub = []
+ this.stepTableData.forEach((i, j) => {
+ workListSub.push(
+ {
+ stepseq: j + 1,
+ stepcode: i.stepcode,
+ stepprice: i.stepprice,
+ isbott: j === 0 ? 'Y' : 'N',
+ isend: j === this.stepTableData.length - 1 ? 'Y' : 'N'
+ }
+ )
+ })
+
+ const data = {
+ wostatus: this.dialogForm.mesorderstus, // 宸ュ崟鐘舵��
+ wocode: this.dialogForm.mesordercode, // 宸ュ崟鍙�
+ wotype: this.dialogForm.ordertype, // 宸ュ崟绫诲瀷
+ sourceid: this.dialogForm.sourceorderid, // 婧愬崟id
+ sourcewo: this.dialogForm.sourceorder, // 婧愬崟鍗曞彿
+ partcode: this.dialogForm.partcode, // 浜у搧缂栧彿
+ wkshopcode: this.dialogForm.wkshopcode,
+ woqty: this.dialogForm.mesqty, // 宸ュ崟鏁伴噺
+ deliverydate: this.dialogForm.deliverydate, // 浜や粯鏃堕棿
+ data_sources: this.dialogForm.data_sources, // 鏁版嵁鏉ユ簮
+ isstep: workListSub.length > 0 ? 'Y' : 'N', //
+ workListSub
+ }
+
+ this.$store.state.app.buttonIsDisabled = true
+ AddUpdateMesOrder(data, this.operation === 'add' ? 'Add' : 'Update').then(res => {
+ if (res.code === '200') {
+ this.dialogVisible = false
+ // this.handlePrint()
+ this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '娲惧彂鎴愬姛锛�')
+ this.getMesOrderClosedSearch()
+ this.$store.state.app.buttonIsDisabled = false
+ } else {
+ this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '娲惧彂澶辫触锛�')
+ }
+ })
+ }
+ })
+ },
+ // 娲惧彂鎵撳嵃
+ async sendPrint() {
+ const data = {
+ username: getCookie('admin'),
+ // username: getCookie('username'),
+ mesordercode: this.dialogForm.mesordercode
+ }
+ const res = await MesOrderPrintSearch1(data)
+ // const res = await PrintOrder(data)
+ if (res.code === '200') {
+ // 鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
+ var args = {
+ type: 'print', // preview print
+ showOptionDlg: false, // 濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
+ report: urlAddRandomNo('./static/grf/浜у搧娴佷紶鍗旳4.grf'),
+ data: res.data
+ }
+ webapp_ws_ajax_run(args)
+ }
+ },
+
+ // 鑾峰彇椤甸潰楂樺害
+ getHeight() {
+ this.$nextTick(() => {
+ this.mainHeight = window.innerHeight - 85
+ this.tableHeight = this.mainHeight - 295
+ if (window.innerHeight < 769) {
+ this.tableHeight = this.tableHeight - 20
+ }
+ this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
+ this.$refs.tableDataRef.doLayout()
+ })
+ },
+ // 宸ヨ壓璺嚎鏀惧ぇ闀滅偣鍑�
+ async searchClick() {
+ if (this.dialogForm.routecode === '') {
+ return this.$message.info('璇峰厛閫夋嫨宸ヨ壓璺嚎锛�')
+ }
+ this.dialogVisibleSearch = true
+ const { data: res } = await SelectRouteStep({ routecode: this.dialogForm.routecode })
+ this.searchTableData = res
+ },
+ dialogVisibleSearchBack() {
+ this.dialogVisibleSearch = false
+ },
+ // 澶勭悊鎵撳嵃
+ handlePrint(wo_code) {
+ // const number = Math.random() * Math.random()
+ // this.number = number === 0 ? (10 + Math.random()) : number
+ // console.log(number)
+
+ const data2 = {
+ mesordercode: wo_code || this.dialogForm.mesordercode
+ }
+ MesOrderPrintSearch(data2).then(res2 => {
+ if (res2.code === '200') {
+ const res3 = res2.data.recordset
+
+ this.tableDataPrint = res3
+ this.formApprove.mesordercode = res3[0].wo_code
+ this.formApprove.m_po = res3[0].m_po || '/'
+ this.formApprove.partcode = res3[0].partcode
+ this.formApprove.partname = res3[0].partname
+ this.formApprove.partspec = res3[0].partspec || '/'
+ this.formApprove.plan_qty = res3[0].plan_qty
+ this.formApprove.routename = localStorage.getItem('username') // 鎵撳嵃浜哄憳
+ this.formApprove.lm_date = res3[0].lm_date
+
+ this.$nextTick(() => {
+ res3.forEach(i => {
+ this.bindQRCode(i.seq, i.stepqrcode, 'small')
+ })
+ this.bindQRCode('0', this.formApprove.mesordercode, 'big')
+
+ const div = document.getElementById('qrCode')
+ // 杩欎箞澶氫唬鐮佸彧闇�瑕佽繖涓�鍙ュ疄鐜版垜浠墍闇�瑕佺殑鍔熻兘锛屽畾浣峝iv婊氬姩鏉′綅缃湪搴曢儴锛宻crollHeight璁$畻鍑篸iv鐨勯珮搴︼紝鍐峴crollTop 璁剧疆婊氬姩鏉$殑楂樺害涓哄灏�
+ div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
+ // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
+ })
+ this.dialogVisibleApprove = true
+ }
+ })
+ },
+ dialogVisibleTaskClose() {
+ this.dialogForm.mesordercode = ''
+ },
+ /*
+ * 鎵嬪姩鐐瑰嚮鎵撳嵃
+ * */
+ // 杩斿洖鎸夐挳
+ dialogVisibleBackPreview() {
+ this.dialogVisibleApprove = false
+ },
+ // dialogVisibleConfirmPreview(param) {
+ // this.$refs.dialogForm.validate(valid => {
+ // if (valid) {
+ // const data = {
+ // username: getCookie('admin'),
+ // mesordercode: this.dialogForm.mesordercode
+ // }
+ // MesOrderPrintSearch1(data).then(res => {
+ // if (res.code === '200') {
+ // this.dialogVisibleApprove = true
+ // console.log(res, 11)
+ // }
+ // })
+ // }
+ // })
+ // },
+ // 鐢熸垚浜岀淮鐮� 宸ュ崟鎶ヨ〃浜岀淮鐮�
+ bindQRCode(seq, text, size) {
+ if (size === 'big') {
+ console.log(text, 1)
+ new QRCode(this.$refs.qrCodeDiv0, {
+ text: text,
+ width: size === 'big' ? 90 : 60,
+ height: size === 'big' ? 90 : 60,
+ // colorDark: '#333333', // 浜岀淮鐮侀鑹�
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ } else {
+ new QRCode(this.$refs['qrCodeDiv' + seq], {
+ text: text,
+ width: size === 'big' ? 90 : 60,
+ height: size === 'big' ? 90 : 60,
+ // colorDark: '#333333', // 浜岀淮鐮侀鑹�
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ }
+ },
+
+ dialogVisibleConfirmClose() {
+ // this.dialogForm.mesordercode = ''
+ this.formApprove.mesordercode = ''
+ this.formApprove.m_po = ''
+ this.formApprove.partcode = ''
+ this.formApprove.partname = ''
+ this.formApprove.partspec = ''
+ this.formApprove.plan_qty = ''
+ this.formApprove.routename = ''
+ this.formApprove.lm_date = ''
+
+ // this.$refs.qrCodeDiv0.title = ''
+
+ this.tableDataPrint = []
+ },
+ // 琛ユ墦鎸夐挳
+ supplementClick() {
+ this.dialogVisibleTask = false
+ this.handlePrint()
+ },
+ // 琛ユ墦灏忔爣绛�
+ supplementSmallClick(row) {
+ // let obj = {}
+ console.log(row, 21)
+ // this.taskTableData.forEach((item, index) => {
+ this.tableDataDetail.forEach((item, index) => {
+ if (item.seq === row.seq) {
+ console.log(item)
+ this.qrForm = {
+ // qrvalue: item.seq === this.taskTableData.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.taskTableData[item.seq].stepcode,
+ qrvalue: item.seq === this.tableDataDetail.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.tableDataDetail[item.seq].stepcode,
+ // startqty: item.seq === this.taskTableData.length ? item.plan_qty : this.taskTableData[item.seq].plan_qty,
+ startqty: item.seq === this.tableDataDetail.length ? item.plan_qty : this.tableDataDetail[item.seq].plan_qty,
+ wo_code: item.wo_code,
+ partcode: item.partcode,
+ partname: item.partname,
+ // nextstepname: item.seq === this.taskTableData.length ? item.stepname : this.taskTableData[item.seq].stepname,
+ nextstepname: item.seq === this.tableDataDetail.length ? item.stepname : this.tableDataDetail[item.seq].stepname,
+ operator: getCookie('username'),
+ operatorTime: handleDatetime2(new Date())
+ }
+ this.$nextTick(() => {
+ console.log(this.qrForm.qrvalue, 3333)
+ this.bindQRCode2(this.qrForm.qrvalue)
+
+ const div = document.getElementById('qrCode2')
+ // 杩欎箞澶氫唬鐮佸彧闇�瑕佽繖涓�鍙ュ疄鐜版垜浠墍闇�瑕佺殑鍔熻兘锛屽畾浣峝iv婊氬姩鏉′綅缃湪搴曢儴锛宻crollHeight璁$畻鍑篸iv鐨勯珮搴︼紝鍐峴crollTop 璁剧疆婊氬姩鏉$殑楂樺害涓哄灏�
+ div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
+ // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
+ })
+ }
+ })
+
+ // this.dialogVisibleTask = false
+ this.dialogVisible2 = true
+ console.log(this.qrForm, 1111)
+ },
+ // 琛ユ墦鐢熶骇鍏ュ簱鏉$爜
+ async getProductInHouseLabCode(ordercode) {
+ const res = await ProductInHouseLabCode({ ordercode })
+ console.log(res)
+ this.isLastPrint = true
+
+ this.lastPrintArr = res.data
+
+ this.dialogVisible2 = true
+
+ // 鐢熶骇浜岀淮鐮�
+ this.$nextTick(() => {
+ this.lastPrintArr.forEach((i, index) => {
+ i.checked = false
+ new QRCode(this.$refs.qrCodeDiv2[index], {
+ text: i.inbarcode,
+ width: this.printSize !== 2 ? 60 : 55,
+ height: this.printSize !== 2 ? 60 : 55,
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ })
+ })
+ },
+ dialogVisible2Close() {
+ this.qrForm.qrvalue = ''
+ this.qrForm.startqty = ''
+ this.qrForm.wo_code = ''
+ this.qrForm.partcode = ''
+ this.qrForm.partname = ''
+ this.qrForm.nextstepname = ''
+ this.qrForm.operator = ''
+ this.qrForm.operatorTime = ''
+ // this.$refs.qrCodeDiv2 = ''
+ this.isLastPrint = false
+ this.lastPrintArr = []
+ this.lastPrintArrSelected = []
+ },
+ // 鐢熸垚浜岀淮鐮� 宸ュ簭鏍囩浜岀淮鐮�
+ bindQRCode2(text) {
+ new QRCode(this.$refs.qrCodeDiv2, {
+ text: text,
+ width: this.printSize !== 2 ? 60 : 55,
+ height: this.printSize !== 2 ? 60 : 55,
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ },
+ // 鎶ュ簾琛ュ崟鎯呭喌涓嬪彲鐐瑰嚮閫夋嫨
+ mesordertsourcesearchclick() {
+ if (this.dialogForm.ordertype === 'PO') {
+ return this.$message.info('宸ュ崟绫诲瀷涓烘姤搴熻ˉ鍗曟儏鍐典笅鍙�夋嫨锛�')
+ }
+
+ this.getMesBadOrderSearch()
+
+ this.dialogVisibleSource = true
+ },
+ async getMesBadOrderSearch() {
+ // let tempDate2 = this.sourceForm.paystartdate
+ // if (tempDate2.length > 0) {
+ // tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
+ // }
+
+ let tempDate = this.sourceForm.createdate
+ if (tempDate.length > 0) {
+ tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
+ }
+
+ const data = {
+ mesordercode: this.sourceForm.mesordercode, // 宸ュ崟缂栧彿
+ sourceorder: this.sourceForm.sourceorder, // 璁㈠崟璁㈠崟鍙�
+ saleordercode: this.sourceForm.sourceorder, // 璁㈠崟璁㈠崟鍙�
+ partcode: this.sourceForm.partcode, // 浜у搧缂栫爜
+ partname: this.sourceForm.partname, // 浜у搧鍚嶇О
+ partspec: this.sourceForm.partspec, // 浜у搧瑙勬牸
+ // paystartdate: tempDate2, // 浜や粯鏃堕棿
+ // payenddate: tempDate, // 浜や粯鏃堕棿
+ creatuser: this.sourceForm.creatuser, // 鍒涘缓浜哄憳
+ createdate: tempDate, // 鍒涘缓鏃堕棿
+
+ prop: this.sourceForm.prop, // 鎺掑簭瀛楁
+ order: this.sourceForm.order, // 鎺掑簭瀛楁
+ page: this.sourceForm.page, // 绗嚑椤�
+ rows: this.sourceForm.rows // 姣忛〉澶氬皯鏉�
+
+ }
+
+ const res = await MesBadOrderSearch(data)
+ this.sourceTableData = res.data
+ this.sourceFormTotal = res.count
+ },
+ // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
+ // getCurrentRowSource2(id) {
+ // this.radioSelectedId = id
+ // },
+ // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
+ getCurrentRowSource(row, event, column) {
+ this.radioSelectedId = row.id
+ this.dialogForm.mesqty = row.bad_qty
+ },
+ sourceSearch() {
+ this.getMesBadOrderSearch()
+ },
+ sourceReset() {
+ this.sourceForm.mesordercode = ''
+ this.sourceForm.sourceorder = ''
+ this.sourceForm.partcode = ''
+ this.sourceForm.partname = ''
+ this.sourceForm.partspec = ''
+ // this.sourceForm.paystartdate = ''
+ // this.sourceForm.payenddate = ''
+ this.sourceForm.creatuser = ''
+ this.sourceForm.createdate = ''
+ this.getMesBadOrderSearch()
+ },
+ dialogVisibleSourceClose() {
+ this.radioSelectedId = ''
+
+ this.sourceForm.mesordercode = ''
+ this.sourceForm.sourceorder = ''
+ this.sourceForm.partcode = ''
+ this.sourceForm.partname = ''
+ this.sourceForm.partspec = ''
+ this.sourceForm.paystartdate = ''
+ this.sourceForm.payenddate = ''
+ this.sourceForm.creatuser = ''
+ this.sourceForm.createdate = ''
+
+ this.isExpandDialog = false
+ this.sourceTableData = []
+ },
+ dialogVisibleSourceBack() {
+ this.dialogVisibleSource = false
+ },
+ dialogVisibleSourceConfirm() {
+ console.log(this.radioSelectedId)
+ this.sourceTableData.forEach(item => {
+ if (item.id === this.radioSelectedId) {
+ this.dialogForm.sourceorder = item.wo_code
+ this.dialogForm.partcode = item.partcode
+ this.dialogForm.partspec = item.partspec
+ }
+ })
+ this.dialogVisibleSource = false
+ },
+ mesordertypeChange(val) {
+ if (val === 'PO') {
+ this.dialogForm.sourceorder = ''
+ this.dialogForm.partcode = ''
+ this.dialogForm.partspec = ''
+ }
+ },
+ /* 鍏宠仈宸ヨ壓璺嚎妯″潡*/
+ // 鍏宠仈宸ヨ壓璺嚎
+ async routeClick(row) {
+ console.log(row)
+ // this.defaultroute_code = row.default_route
+ this.dialogFormRoute.projectCode = row.partcode
+ this.dialogFormRoute.projectName = row.partname
+ this.dialogVisibleRoute = true
+ const { data: res } = await InventoryFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode })
+ this.dialogFormRoute.routeOperationArr = res
+
+ this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
+ item.isSelected1 = false
+ item.isSelected2 = false
+ if (index === 0) {
+ item.isSelected1 = true
+ this.projectTableData = item.Data
+ }
+ if (item.flag === 'Y') {
+ item.isSelected2 = true
+ this.$nextTick(() => {
+ $('input:checkbox').eq(index).prop('checked', true)
+ })
+ }
+ })
+
+ this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y')
+ },
+ // 瀵硅瘽妗嗗叧闂�
+ handleCloseRoute() {
+ this.dialogFormRoute.routeOperationArr = []
+ this.defaultroute_codeArr = []
+ this.defaultroute_code = ''
+ this.projectTableData = []
+ },
+ // 鍙栨秷
+ routeDialogVisibleCancel() {
+ this.dialogVisibleRoute = false
+ },
+ // 纭畾
+ async routeDialogVisibleConfirm() {
+ const temp = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
+ if (this.defaultroute_code === '' && temp.length > 0) {
+ return this.$message.info('榛樿宸ヨ壓璺嚎涓嶈兘涓虹┖锛�')
+ }
+
+ // 鎻愪氦鏍煎紡
+ const data = []
+ this.dialogFormRoute.routeOperationArr.forEach(item => {
+ if (item.isSelected2) {
+ data.push({ code: item.code, name: item.name })
+ }
+ })
+
+ const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, this.defaultroute_code, data)
+ if (res.code === '200') {
+ this.$message.success('淇濆瓨鎴愬姛锛�')
+ await this.getMesOrderClosedSearch()
+ this.dialogVisibleRoute = false
+ }
+ },
+ // 澶х洅瀛愮偣鍑讳簨浠�
+ myCheckboxClick(val) {
+ console.log(val, 1)
+ this.dialogFormRoute.routeOperationArr.forEach(item => {
+ item.isSelected1 = val.code === item.code
+ })
+
+ this.projectTableData = val.Data
+ },
+ // 灏忕洅瀛愮偣鍑讳簨浠�
+ myCheckboxInputClick(val) {
+ console.log(val, 2)
+ val.isSelected2 = !val.isSelected2
+
+ this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
+ if (val.code === item.code) {
+ item.flag = !item.flag
+ }
+ })
+ if (val.code === this.defaultroute_code) {
+ this.defaultroute_code = ''
+ }
+ this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
+ },
+ // 琛岀偣鍑讳簨浠�
+ async rowClick(row, event, column) {
+ const data = {
+ sourceid: row.sourceid,
+ sourcewo: row.m_po,
+ wocode: row.wo_code,
+ data_sources: row.data_sources
+ }
+ const { data: res } = await UpdateMesOrderStepSearch(data)
+ this.tableDataDetail = res.stepdata
+ },
+ // 宸ュ簭鍒犻櫎
+ stepDel(row) {
+ console.log(row)
+ const index = this.stepSelectedValue.findIndex(i => i === row.stepcode)
+ this.stepSelectedValue.splice(index, 1)
+ },
+ // 鎵撳嵃宸ュ崟
+ printOrder() {
+
+ },
+ // 閫夋嫨鎵撳嵃灏哄鐨勫ぇ灏忓�兼敼鍙�
+ printSizeChange(val) {
+ this.$nextTick(() => {
+ this.bindQRCode2(this.qrForm.qrvalue)
+ })
+ },
+ printMe2StylePadding(val) {
+ if (val === 0) {
+ return { paddingLeft: '10px', paddingTop: '5px' }
+ }
+ if (val === 5) {
+ return { paddingLeft: '15px', paddingTop: '7px' }
+ }
+ },
+
+ inbarcodeChange(val, item) {
+ // 褰� lastPrintArrSelected涓湭鏈夊綋鍓嶅嬀閫夌殑鍊兼槸 璧皃ush item 鍚﹀垯璧拌繃婊ゆ帀item
+ if (val) {
+ this.lastPrintArrSelected.push(item)
+ } else {
+ this.lastPrintArrSelected = this.lastPrintArrSelected.filter(i => i.inbarcode !== item.inbarcode)
+ }
+
+ // 鐢熶骇浜岀淮鐮�
+ this.$nextTick(() => {
+ this.lastPrintArrSelected.forEach((i, index) => {
+ console.log(i.inbarcode, 'i.inbarcode')
+ new QRCode(this.$refs.qrCodeDiv3[index], {
+ text: i.inbarcode,
+ width: 60,
+ height: 60,
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ })
+
+ // const div = document.getElementById('qrCode3')
+ // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶搴曢儴
+
+ this.$forceUpdate()
+ }, 500)
+ },
+ stepSelectedValueChange(val) {
+ // console.log(val, 123)
+ }
+ }
+}
+</script>
+<style>
+.sortable-ghost {
+ opacity: .8;
+ color: #fff !important;
+ background: #42b983 !important;
+}
+</style>
+<style lang="scss" scoped>
+$main_color: #42b983;
+
+.dialogVisibleRoute {
+ .myCheckboxGroup {
+ display: flex;
+ flex-wrap: wrap;
+
+ .myCheckbox {
+ //border: 1px solid $main_color;
+ border: 1px solid #eee;
+ display: flex;
+ min-width: 100px;
+ padding: 10px;
+ margin: 10px 30px 0 0;
+ border-radius: 5px;
+ cursor: default;
+
+ .myCheckboxInput {
+ margin: 1px 5px 0 0;
+ cursor: pointer;
+ }
+
+ }
+
+ //.myCheckbox{
+ // border: 1px solid $main_color;
+ //}
+
+ input[type=checkbox] {
+ cursor: pointer;
+ position: relative;
+ width: 14px;
+ height: 14px;
+ font-size: 14px;
+ }
+
+ input[type=checkbox]::after {
+ position: absolute;
+ top: 0;
+ //color: rgb(130, 35, 35);
+ color: $main_color;
+ width: 14px;
+ height: 14px;
+ display: inline-block;
+ visibility: visible;
+ padding-left: 0px;
+ text-align: center;
+ content: ' ';
+ border-radius: 3px
+ }
+
+ input[type=checkbox]:checked::after {
+ //content: "鉁�";
+ content: "鈭�";
+ color: #fff;
+ font-size: 12px;
+ font-weight: bold;
+ background-color: $main_color;
+ }
+ }
+}
+
+.dialogVisibleRoute {
+ ::v-deep .el-dialog__body {
+ padding: 20px 20px !important;
+ }
+}
+
+.defaultroute_code ::v-deep .el-input__suffix-inner {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-top: -3px;
+}
+
+.el-date-editor {
+ font-size: 14px;
+}
+
+::v-deep .el-dialog__body {
+ padding: 20px 100px !important;
+}
+
+.dialogVisibleSearch ::v-deep .el-dialog__body {
+ padding: 20px 20px !important;
+}
+
+.dialogVisibleConfirmClass ::v-deep .el-dialog__body {
+ padding: 20px 20px !important;
+}
+
+::v-deep .el-table .caret-wrapper {
+ transform: scale(0.8);
+}
+
+::v-deep .el-button--text {
+ color: $main_color;
+ font-size: 14px;
+ cursor: pointer;
+}
+
+::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
+ margin: 10px 30px 0px 0;
+}
+
+.body ::v-deep .el-form-item {
+ margin-bottom: 0;
+}
+
+.elForm ::v-deep .el-form-item {
+ margin-bottom: 0;
+}
+
+.elTableDiv {
+ ::v-deep .el-radio__label {
+ display: none;
+ }
+
+}
+
+.el-table::before {
+ height: 0;
+}
+
+//.dialogVisibleConfirmClass >>>.el-table--border, .el-table--fit {
+// border-bottom: 2px solid #000 ;
+// //outline: #000 solid 2px !important;
+//}
+
+.tableDataPrint ::v-deep div.cell {
+ display: flex !important;
+ align-items: center !important;
+ justify-content: center !important;
+}
+
+.formContent {
+ width: 240px;
+}
+
+</style>
+
+<style media="print">
+/*@media print {*/
+@page {
+ size: auto;
+ margin: 3mm;
+}
+
+</style>
+<style>
+.formContent .el-form-item__label {
+ color: #000 !important;
+}
+</style>
+<!--鍏叡椤甸潰鏍峰紡-->
+<style lang="scss" scoped>
+$main_color: #42b983;
+
+::v-deep .el-range-input {
+ font-size: 14px !important;
+}
+
+::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-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 .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;
+}
+
+.userDialogVisible ::v-deep .el-form-item {
+ margin-bottom: 0;
+}
+
+.dateMini {
+ ::v-deep .el-input__inner {
+ line-height: 34px;
+ height: 34px;
+ width: 200px;
+ display: flex;
+ font-size: 14px !important;
+ align-items: center !important;
+ }
+
+ ::v-deep .el-input__prefix {
+ margin-top: -3px;
+ }
+
+ //::v-deep .el-range__icon{
+ // line-height: 28px;
+ //}
+}
+
+::v-deep .el-select__caret {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.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/workOrder/workOrderList.vue b/src/views/workOrder/workOrderList.vue
index a299066..1f71997 100644
--- a/src/views/workOrder/workOrderList.vue
+++ b/src/views/workOrder/workOrderList.vue
@@ -1,4038 +1,4142 @@
-<template>
- <div>
- <div class="body" :style="{height:mainHeight+'px'}">
-
- <div class="bodyTopButtonGroup" style="justify-content: space-between">
- <div style="display: flex">
- <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
- <el-button v-waves type="success" icon="el-icon-connection" @click="send">娲惧彂</el-button>
- </div>
-
- <!-- <el-button v-waves icon="el-icon-switch-button" @click="orderClose">鍏抽棴宸ュ崟</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.wkshopcode"
- filterable
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in wkshopcodeArr"
- :key="item.torg_code"
- :label="item.torg_name"
- :value="item.torg_code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">
- <el-select
- v-model="form.mesorderstus"
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- filterable
- @change="erporderstusChange"
- >
- <el-option
- v-for="item in erporderstusArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
- <el-input v-model="form.mesordercode" placeholder="璇疯緭鍏�" style="width: 200px" />
- </el-form-item>
- <el-form-item label="婧愬崟鍗曞彿" style="display: flex;">
- <el-input v-model="form.sourceorder" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="閿�鍞鍗�" style="display: flex;">
- <el-input v-model="form.saleordercode" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="鍗曟嵁绫诲瀷" style=" display: flex;">
- <el-select
- v-model="form.ordertype"
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <!-- @change="mesordertypeChange"-->
- <el-option
- v-for="item in ordertypeArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="浜у搧缂栫爜" style=" display: flex;">
- <el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
- <el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="浜у搧瑙勬牸" style=" display: flex;">
- <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="鍒涘缓浜哄憳" style=" display: flex;">
- <el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <DateType
- ref="DateTypeRef"
- :is-expand-form="isExpandForm"
- style="display:flex;justify-content: center;align-items: center;position: relative"
- :datatype-list="datatypeList"
- @DateTypeChange="DateTypeChange"
- @cycleTimeChange="cycleTimeChange"
- />
- </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+80)+'px'"
- border
- :summary-method="getSummaries"
- show-summary
- :row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px'}"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- @sort-change="sortChange"
- @row-click="rowClick"
- @selection-change="handleSelectionChange"
- >
- <el-table-column
- type="selection"
- width="50"
- :selectable="selected"
- />
- <el-table-column
- prop="rowNum"
- width="50"
- label="搴忓彿"
- fixed
- />
- <el-table-column
- prop="status"
- label="宸ュ崟鐘舵��"
- sortable="custom"
- width="110"
- show-tooltip-when-overflow
- >
- <template slot-scope="{row}">
- <div v-if="row.status==='NEW'">鏂板伐鍗�</div>
- <!-- <div v-if="row.status==='CREATING'">鎵ц涓�</div>-->
- <!-- <div v-if="row.status==='CREATED'">宸插叧闂�</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="宸ュ崟缂栧彿"
- show-tooltip-when-overflow
- sortable="custom"
- min-width="160"
- />
- <el-table-column
- prop="m_po"
- label="婧愬崟鍗曞彿"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="160"
- >
- <template slot-scope="{row}">
- <div v-if="row.m_po">{{ row.m_po }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="saleOrderCode"
- label="閿�鍞鍗�"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="160"
- >
- <template slot-scope="{row}">
- <div v-if="row.saleOrderCode">{{ row.saleOrderCode }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="wotype"
- label="鍗曟嵁绫诲瀷"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="120"
- >
- <template slot-scope="{row}">
- <div v-if="row.wotype==='PO'">鏍囧噯宸ュ崟</div>
- <div v-else-if="row.wotype==='FO'">鎶ュ簾琛ュ崟</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="partcode"
- label="浜у搧缂栫爜"
- show-tooltip-when-overflow
- sortable="custom"
- min-width="120"
- />
- <el-table-column
- prop="partname"
- min-width="150"
- label="浜у搧鍚嶇О"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <el-table-column
- prop="partspec"
- label="浜у搧瑙勬牸"
- sortable="custom"
- width="110"
- show-tooltip-when-overflow
- >
- <template slot-scope="{row}">
- <div v-if="row.partspec">{{ row.partspec }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
-
- <el-table-column
- v-if="mesSetting.route"
- prop="route_name"
- label="宸ヨ壓璺嚎"
- sortable="custom"
- show-tooltip-when-overflow
- width="120"
- >
- <template slot-scope="{row}">
- <div v-if="row.route_name">{{ row.route_name }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
-
- <el-table-column
- prop="plan_qty"
- label="宸ュ崟鏁�"
- sortable="custom"
- show-tooltip-when-overflow
- width="100"
- />
- <el-table-column
- prop="clerkuser"
- label="閿�鍞笟鍔″憳"
- sortable="custom"
- show-tooltip-when-overflow
- width="150"
- >
- <template slot-scope="{row}">
- <div v-if="row.clerkuser">{{ row.clerkuser }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="wkshp_name"
- label="鐢熶骇杞﹂棿"
- show-tooltip-when-overflow
- sortable="custom"
- width="120"
- >
- <template slot-scope="{row}">
- <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="plan_startdate"
- label="棰勮寮�宸ユ棩鏈�"
- sortable="custom"
- width="130"
- >
- <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="棰勮瀹屽伐鏃ユ湡"
- sortable="custom"
- width="130"
- >
- <template slot-scope="{row}">
- <div v-if="row.plan_enddate">{{ row.plan_enddate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="saleOrderDeliveryDate"
- label="棰勮浜や粯鏃ユ湡"
- sortable="custom"
- width="130"
- >
- <template slot-scope="{row}">
- <div v-if="row.saleOrderDeliveryDate">{{ row.saleOrderDeliveryDate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- prop="data_sources"-->
- <!-- show-tooltip-when-overflow-->
- <!-- label="鏁版嵁鏉ユ簮"-->
- <!-- sortable="custom"-->
- <!-- width="120"-->
- <!-- />-->
-
- <el-table-column
- prop="lm_user"
- show-tooltip-when-overflow
- label="鍒涘缓浜哄憳"
- sortable="custom"
- width="120"
- />
- <el-table-column
- prop="lm_date"
- label="鍒涘缓鏃堕棿"
- show-tooltip-when-overflow
- width="160"
- sortable="custom"
- />
- <el-table-column
- label="鎿嶄綔"
- width="160"
- fixed="right"
- >
- <template slot-scope="{row}">
- <div class="operationClass">
-
- <el-tooltip v-del-tab-index class="item" effect="dark" content="SOP棰勮" placement="top">
- <i
- v-if="mesSetting.workOrder"
- class="el-icon-files"
- style="cursor: pointer;color:#42b983;margin-right: 15px"
- @click="pre(row,1)"
- />
- </el-tooltip>
-
- <el-tooltip class="item" effect="dark" content="淇敼" placement="top">
- <i
- class="el-icon-edit-outline"
- :style="{color:$store.state.settings.theme}"
- @click="edit('edit',row)"
- />
- </el-tooltip>
-
- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
- <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click="del(row)" />
- </el-tooltip>
-
- <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
- :style="{color:$store.state.settings.theme}"
- class="el-icon-printer"
- style="cursor: pointer;margin-right: 15px"
- @click="handlePrint(row.wo_code,row.saleOrderCod)"
- />
- </el-tooltip>
-
- <el-tooltip class="item" effect="dark" content="璇︽儏" placement="top">
- <i
- class="el-icon-view"
- style="cursor: pointer;"
- :style="{color:$store.state.settings.theme}"
- @click="edit('view',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,jumper"
- popper-class="select_bottom"
- @pagination="getMesOrderSearch"
- />
-
- <div class="elTableDiv">
- <el-table
- :data="tableDataDetail"
- border
- height="210px"
- :row-class-name="tableRowClassName"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- >
- <!-- <el-table-column-->
- <!-- width="50"-->
- <!-- type="index"-->
- <!-- prop="搴忓彿"-->
- <!-- fixed-->
- <!-- /> -->
- <el-table-column
- width="50"
- prop="seq"
- label="搴忓彿"
- fixed
- />
- <el-table-column
- prop="wo_code"
- show-tooltip-when-overflow
- label="宸ュ崟缂栧彿"
- width="160"
- />
-
- <!-- <el-table-column-->
- <!-- prop="partcode"-->
- <!-- label="浜у搧缂栫爜"-->
- <!-- width="150"-->
- <!-- show-tooltip-when-overflow-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- prop="partname"-->
- <!-- label="浜у搧鍚嶇О"-->
- <!-- width="200"-->
- <!-- show-tooltip-when-overflow-->
- <!-- />-->
-
- <el-table-column
- label="宸ュ簭缂栫爜"
- prop="step_code"
- show-tooltip-when-overflow
- width="150"
- />
- <el-table-column
- label="宸ュ簭鍚嶇О"
- show-tooltip-when-overflow
- prop="stepname"
- width="150"
- />
- <el-table-column
- label="宸ュ簭鍗曚环"
- show-tooltip-when-overflow
- prop="stepprice"
- />
- <el-table-column
- label="宸茬敓浜ф暟閲�"
- show-tooltip-when-overflow
- prop="produceq_qty"
- />
- <el-table-column
- label="鍚堟牸鏁伴噺"
- show-tooltip-when-overflow
- prop="good_qty"
- />
- <el-table-column
- label="涓嶈壇鏁伴噺"
- show-tooltip-when-overflow
- prop="ng_qty"
- />
- <el-table-column
- label="宸ュ簾鏁伴噺"
- show-tooltip-when-overflow
- prop="laborbad_qty"
- />
- <el-table-column
- label="鏂欏簾鏁伴噺"
- show-tooltip-when-overflow
- prop="materielbad_qty"
- />
- <el-table-column
- label="寰呬骇鏁伴噺"
- show-tooltip-when-overflow
- prop="delive_qty"
- />
- <el-table-column
- label="鎿嶄綔"
- width="120"
- fixed="right"
- >
- <template slot-scope="{row}">
- <div class="operationClass">
- <el-tooltip v-del-tab-index class="item" effect="dark" content="SOP棰勮" placement="top">
- <i
- v-if="mesSetting.tech"
- class="el-icon-files"
- style="cursor: pointer;color:#42b983;margin-right: 15px"
- @click="pre(row,2)"
- />
- </el-tooltip>
- <!-- <el-tooltip class="item" effect="dark" content="鎵撳嵃宸ュ簭" placement="top">-->
- <!-- <i-->
- <!-- v-if="tableDataDetail.length!==row.seq"-->
- <!-- class="el-icon-printer"-->
- <!-- :style="{color:$store.state.settings.theme}"-->
- <!-- style="cursor: pointer;margin-right: 15px"-->
- <!-- @click="supplementSmallClick(row)"-->
- <!-- />-->
- <!-- </el-tooltip>-->
- <!-- <el-tooltip class="item" effect="dark" content="琛ユ墦鐢熶骇鍏ュ簱鏉$爜" placement="top">-->
- <!-- <i-->
- <!-- v-if="tableDataDetail.length===row.seq"-->
- <!-- class=" el-icon-camera"-->
- <!-- :style="{color:$store.state.settings.theme}"-->
- <!-- style="cursor: pointer;margin-right: 15px"-->
- <!-- @click="getProductInHouseLabCode(row.wo_code)"-->
- <!-- />-->
- <!-- </el-tooltip>-->
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <!--鏂板娲惧彂瀵硅瘽妗�-->
- <el-dialog
- v-el-drag-dialog
- :title="operation==='add'?'鏂板':(operation==='edit'?'淇敼':'璇︽儏')"
- :visible.sync="dialogVisible"
- width="1200px"
- top="8vh"
- :close-on-click-modal="false"
- @closed="handleClose"
- @close="handleClose"
- >
- <el-form
- ref="dialogForm"
- inline
- :rules="dialogFormRules"
- :model="dialogForm"
- label-width="110px"
- >
-
- <el-divider content-position="left">鍩烘湰淇℃伅</el-divider>
-
- <el-form-item
- label="宸ュ崟鐘舵��"
- prop="mesorderstus"
- >
- <el-select
- v-model="dialogForm.mesorderstus"
- disabled
- filterable
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in erporderstusArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
-
- <el-form-item label="宸ュ崟缂栧彿" prop="mesordercode">
- <!-- <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px" />-->
- <el-input v-model="dialogForm.mesordercode" disabled style="width: 200px" />
- </el-form-item>
- <!-- <div style="display: flex">-->
- <el-form-item label="宸ュ崟绫诲瀷" prop="mesorderstus">
- <el-select
- v-model="dialogForm.ordertype"
- :popper-append-to-body="false"
- style="width: 200px"
- :disabled="operation!=='add'"
- placeholder="璇烽�夋嫨"
- @change="mesordertypeChange"
- >
- <el-option
- v-for="item in ordertypeArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <!-- <div style="display: flex;flex-wrap: nowrap">-->
- <el-form-item label="婧愬崟鍗曞彿">
- <el-input
- v-model="dialogForm.sourceorder"
- :disabled="dialogForm.ordertype==='PO'"
- style="width: 200px"
- >
- <el-button
- slot="append"
- icon="el-icon-search"
- :disabled="operation!=='add'||dialogForm.ordertype==='PO'"
- @click="mesordertsourcesearchclick"
- />
- </el-input>
- </el-form-item>
- <!-- <el-button-->
- <!-- v-waves-->
- <!-- type="primary"-->
- <!-- style="padding: 0 10px;margin-left: -8px;margin-top: 3px"-->
- <!-- class="el-icon-search"-->
- <!-- :disabled="operation!=='add'||dialogForm.ordertype==='PO'"-->
- <!-- @click="mesordertsourcesearchclick"-->
- <!-- />-->
- <!-- </div>-->
- <!-- </div>-->
- <el-form-item label="宸ュ崟鏁伴噺" prop="mesqty">
- <el-input
- v-model="dialogForm.mesqty"
- oninput="value=value.replace(/[^\d]/g,'')"
- style="width: 200px"
- />
- <!-- oninput="value=value.replace(/[^0-9*.{1}0-9*]/g,'')"-->
- </el-form-item>
-
- <el-form-item label="鎵�灞炶溅闂�" prop="wkshopcode">
- <el-select
- v-model="dialogForm.wkshopcode"
- filterable
- :popper-append-to-body="false"
- style="width: 200px;"
- placeholder="璇烽�夋嫨杞﹂棿"
- @change="getMesOrderNewStepContent"
- >
- <!-- @change="sourceType? getMesOrderNewStepContent():routecodeChange()"-->
- <el-option
- v-for="item in wkshopArr"
- :key="item.torg_code"
- :label="item.torg_name"
- :value="item.torg_code"
- />
- </el-select>
- </el-form-item>
-
- <el-form-item
- label="浜у搧鍚嶇О/缂栫爜"
- prop="partcode"
- >
- <el-select
- v-model="dialogForm.partcode"
- filterable
- :disabled="operation!=='add'"
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- @change="partcodeChangeDialog"
- >
- <el-option
- v-for="item in partArr"
- :key="item.partcode"
- :label="item.partname+'/'+item.partcode"
- :value="item.partcode"
- />
- </el-select>
- </el-form-item>
- <!-- <el-form-item v-if="operation!=='add'" label="浜у搧鍚嶇О" prop="partname">-->
- <!-- <el-input v-model="dialogForm.partname" disabled style="width: 200px" />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item v-if="operation!=='add'" label="浜у搧缂栫爜">-->
- <!-- <el-input v-model="dialogForm.partcode" disabled style="width: 200px" />-->
- <!-- </el-form-item>-->
- <el-form-item label="浜у搧瑙勬牸" prop="partspec">
- <el-input v-model="dialogForm.partspec" disabled style="width: 200px" />
- </el-form-item>
- <!-- :disabled="dialogForm.partcode===''"-->
-
- <el-form-item v-if="mesSetting.route" label="宸ヨ壓璺嚎" prop="wkshopcode">
- <el-select
- v-model="dialogForm.routecode"
- filterable
- :popper-append-to-body="false"
- style="width: 200px;"
- placeholder="璇烽�夋嫨宸ヨ壓璺嚎"
- @change="sourceType? getMesOrderNewStepContent():routecodeChange()"
- >
- <el-option
- v-for="item in routecodeArr"
- :key="item.route_code"
- :label="item.route_name"
- :value="item.route_code"
- />
- </el-select>
- </el-form-item>
-
- <el-form-item label="棰勮浜や粯鏃ユ湡" prop="deliverydate">
- <el-date-picker
- v-model="dialogForm.deliverydate"
- type="date"
- size="mini"
- :clearable="false"
- class="dateMini"
- :picker-options="pickerOptions"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- />
- <!-- :disabled="dialogForm.deliverydate"-->
- </el-form-item>
- <el-form-item label="宸ュ簭鏉ユ簮" required>
- <el-switch
- v-model="sourceType"
- style="width: 200px;"
- inactive-text="鍩虹璁剧疆"
- active-text="鍘嗗彶鏈�鏂�"
- :disabled="!dialogForm.wkshopcode"
- @change="sourceTypeChange"
- />
- </el-form-item>
-
- <el-divider content-position="left">宸ュ簭淇℃伅</el-divider>
-
- <div style="display: flex;align-items: center">
- <div style="font-weight: bolder">宸ュ簭閫夋嫨锛�</div>
-
- <el-select
- v-model="stepSelectedValue"
- class="stepSelectedValueClass"
- style="width: 930px;"
- multiple
- placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"
- @change="stepSelectedValueChange"
- >
- <el-option
- v-for="item in stepSelectArr"
- :key="item.stepcode"
- :label="item.stepname"
- :value="item.stepcode"
- />
- </el-select>
-
- <!-- <el-drag-select-->
- <!-- v-model="stepSelectedValue"-->
- <!-- style="width:930px;"-->
- <!-- multiple-->
- <!-- placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"-->
- <!-- @change="stepSelectedValueChange"-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="item in stepSelectArr"-->
- <!-- :key="item.stepcode"-->
- <!-- :label="item.stepname"-->
- <!-- :value="item.stepcode"-->
- <!-- />-->
- <!-- </el-drag-select>-->
- </div>
-
- <el-table
- ref="stepTableDataRef"
- :data="stepTableData"
- border
- :row-class-name="tableRowClassName"
- height="300"
- style="width: 100%;margin-top: 15px;"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- row-key="stepcode"
- >
- <el-table-column
- type="index"
- label="搴忓彿"
- width="50"
- />
- <el-table-column
- prop="stepcode"
- show-tooltip-when-overflow
- label="宸ュ簭缂栫爜"
- />
- <el-table-column
- prop="stepname"
- label="宸ュ簭鍚嶇О"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="stepprice"
- label="鐢熶骇鍗曚环"
- show-tooltip-when-overflow
- >
- <template slot-scope="{row}">
- <el-input
- v-model="row.stepprice"
- placeholder="璇疯緭鍏ュ伐搴忓崟浠�"
- oninput="value=value.replace(/[^0-9.]/g,'')"
- style="width: 100%"
- @click=""
- />
- </template>
- </el-table-column>
- <el-table-column
- label="鎿嶄綔"
- width="120"
- >
- <template slot-scope="{row}">
- <div class="operationClass">
- <!-- <el-tooltip class="item" effect="dark" content="绉诲姩" placement="top">-->
- <i
- class="el-icon-rank"
- :style="{color:$store.state.settings.theme}"
- style="cursor: move"
- />
- <!-- </el-tooltip>-->
- <!-- @click="edit('edit',row)"-->
-
- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
- <i
- class="el-icon-delete"
- :style="{color:$store.state.settings.theme}"
- style="margin-left: 15px;"
- @click="stepDel(row)"
- />
- </el-tooltip>
- </div>
- </template>
- </el-table-column>
- </el-table>
-
- </el-form>
-
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">棰勮</el-button>-->
- <el-button
- v-if="operation!=='view'&&(dialogForm.mesorderstus==='NEW'||dialogForm.mesorderstus==='ALLO')"
- v-waves
- type="primary"
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- @click="dialogVisibleConfirm"
- >纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!-- 宸ュ簭浠诲姟瀵硅瘽妗�-->
- <el-dialog
- v-el-drag-dialog
- title="宸ュ簭浠诲姟"
- :visible.sync="dialogVisibleTask"
- width="840px"
- top="15vh"
- class="dialogVisibleSearch"
- :close-on-click-modal="false"
- @close="dialogVisibleTaskClose"
- >
- <el-button
- v-waves
- style="margin-bottom: 15px"
- type="primary"
- @click="supplementClick"
- >琛ユ墦
- </el-button>
- <el-table
- :data="taskTableData"
- border
- :row-class-name="tableRowClassName"
- height="300"
- style="width: 100%;"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- >
- <el-table-column
- prop="seq"
- width="50"
- label="搴忓彿"
- fixed
- />
- <el-table-column
- prop="wo_code"
- show-tooltip-when-overflow
- label="宸ュ崟缂栧彿"
- width="200"
- />
- <el-table-column
- prop="stepcode"
- label="宸ュ簭缂栫爜"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="stepname"
- show-tooltip-when-overflow
- label="宸ュ簭鍚嶇О"
- />
- <!-- <el-table-column-->
- <!-- prop="flwtype"-->
- <!-- label="宸ュ簭绫诲瀷"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.flwtype==='W'">澶栧崗</div>-->
- <!-- <div v-if="row.flwtype==='Z'">鑷埗</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- prop="descr"-->
- <!-- label="宸ュ簭鎻忚堪"-->
- <!-- />-->
- <el-table-column
- prop="plan_qty"
- show-tooltip-when-overflow
- label="浠诲姟鏁伴噺"
- />
- <el-table-column
- prop="good_qty"
- show-tooltip-when-overflow
- label="鍚堟牸鏁伴噺"
- />
- <el-table-column
- prop="ng_qty"
- show-tooltip-when-overflow
- label="涓嶈壇鏁伴噺"
- />
- <el-table-column
- label="鎿嶄綔"
- fixed="right"
- >
- <template slot-scope="{row}">
- <el-button v-waves type="text" style="padding: 0;" @click="supplementSmallClick(row)">琛ユ墦</el-button>
- </template>
- </el-table-column>
- </el-table>
-
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleBack">杩� 鍥�</el-button>
- <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
- </div>
- </span>
- </el-dialog>
-
- <!-- 婧愬崟鍗曞彿瀵硅瘽妗�-->
- <el-dialog
- v-el-drag-dialog
- title="婧愬崟鍗曞彿"
- :visible.sync="dialogVisibleSource"
- width="1200px"
- top="10vh"
- class="dialogVisibleSearch"
- :close-on-click-modal="false"
- @close="dialogVisibleSourceClose"
- >
- <div class="bodyTopFormGroup">
- <el-form
- ref="sourceForm"
- :model="sourceForm"
- label-width="100px"
- inline
- style="display: flex;justify-content: space-between"
- >
- <div class="elForm" style="justify-content: flex-start">
- <!-- <el-form-item-->
- <!-- label="棰勮寮�宸ユ椂闂�"-->
- <!-- label-width="100px"-->
- <!-- style=" display: flex;font-size: 14px;margin-top: 3px"-->
- <!-- >-->
- <!-- <el-date-picker-->
- <!-- v-model="sourceForm.paystartdate"-->
- <!-- type="daterange"-->
- <!-- range-separator="~"-->
- <!-- class="timeMini"-->
- <!-- size="mini"-->
- <!-- style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"-->
- <!-- :clearable="false"-->
- <!-- start-placeholder="寮�濮嬫棩鏈�"-->
- <!-- end-placeholder="缁撴潫鏃ユ湡"-->
- <!-- />-->
- <!-- <!– :picker-options="expireTimeOption"–>-->
-
- <!-- </el-form-item>-->
- <!-- <el-form-item-->
- <!-- label="棰勮瀹屽伐鏃堕棿"-->
- <!-- label-width="100px"-->
- <!-- style=" display: flex;font-size: 14px;margin-top: 3px"-->
- <!-- >-->
- <!-- <el-date-picker-->
- <!-- v-model="sourceForm.payenddate"-->
- <!-- type="daterange"-->
- <!-- :clearable="false"-->
- <!-- class="timeMini"-->
- <!-- range-separator="~"-->
- <!-- start-placeholder="寮�濮嬫棩鏈�"-->
- <!-- style="width: 200px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;"-->
- <!-- end-placeholder="缁撴潫鏃ユ湡"-->
- <!-- size="mini"-->
- <!-- />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">-->
- <!-- <el-select-->
- <!-- v-model="sourceForm.mesordercode"-->
- <!-- filterable-->
- <!-- :popper-append-to-body="false"-->
- <!-- style="width: 200px"-->
- <!-- placeholder="璇烽�夋嫨"-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="item in erporderstusArr"-->
- <!-- :key="item.code"-->
- <!-- :label="item.name"-->
- <!-- :value="item.code"-->
- <!-- />-->
- <!-- </el-select>-->
- <!-- </el-form-item>-->
- <el-form-item label="杞﹂棿鍚嶇О" style=" display: flex;">
- <el-select
- v-model="sourceForm.wkshopcode"
- filterable
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in wkshopcodeArr"
- :key="item.torg_code"
- :label="item.torg_name"
- :value="item.torg_code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
- <el-input v-model="sourceForm.mesordercode" placeholder="璇疯緭鍏�" style="width: 200px" />
- </el-form-item>
- <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
- <el-input v-model="sourceForm.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
-
- <el-form-item v-show="isExpandDialog" label="浜у搧鍚嶇О" style=" display: flex;">
- <el-input v-model="sourceForm.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <!-- <el-form-item v-show="isExpandDialog" label="浜у搧瑙勬牸" style=" display: flex;">-->
- <!-- <el-input v-model="sourceForm.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />-->
- <!-- </el-form-item>-->
- <el-form-item v-show="isExpandDialog" label="鍒涘缓浜哄憳" style=" display: flex;">
- <el-input v-model="sourceForm.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
-
- <el-form-item
- v-show="isExpandDialog"
- label="鍒涘缓鏃堕棿"
- label-width="100px"
- style=" display: flex;font-size: 14px;margin-top: 3px"
- >
- <el-date-picker
- v-model="sourceForm.createdate"
- type="daterange"
- range-separator="~"
- class="timeMini"
- size="mini"
- style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"
- :clearable="false"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡"
- />
- <!-- :picker-options="expireTimeOption"-->
-
- </el-form-item>
-
- </div>
-
- <div style="display: flex;align-items: start;margin-top: 3px;z-index: 2;justify-content: end">
- <el-button v-waves type="primary" icon="el-icon-search" @click="sourceSearch">鏌ヨ</el-button>
- <el-button v-waves type="info" icon="el-icon-refresh" @click="sourceReset">閲嶇疆</el-button>
- </div>
-
- </el-form>
- <div
- class="bodyTopFormExpand"
- >
- <svg-icon
- v-show="mouseHoverTypeDialog==='mouseout'"
- style="cursor: pointer"
- :icon-class="!isExpandDialog?'doubleDown3':'doubleUp3'"
- @mouseenter="mouseHoverTypeDialog=$event.type"
- />
- <svg-icon
- v-show="mouseHoverTypeDialog==='mouseenter'"
- style="cursor: pointer"
- :icon-class="!isExpandDialog?'doubleDown':'doubleUp'"
- @click="isExpandDialog=!isExpandDialog"
- @mouseout="mouseHoverTypeDialog=$event.type"
- />
- </div>
- </div>
-
- <div class="elTableDiv">
- <el-table
- :data="sourceTableData"
- :height="isExpandDialog?(tableHeight+100)+'px':(tableHeight+140)+'px'"
- border
- :row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:isExpandDialog?(tableHeight+100)+'px':(tableHeight+140)+'px',}"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- @sort-change="sourceSortChange"
- @row-click="getCurrentRowSource"
- >
- <!-- <el-table-column-->
- <!-- type="selection"-->
- <!-- width="50"-->
- <!-- />-->
- <el-table-column
- width="50"
- fixed
- >
- <template slot-scope="{row}">
- <el-radio
- v-model="radioSelectedId"
- :label="row.id"
- style="color: transparent;padding-left: 10px;"
- />
- <!-- @change.native="getCurrentRowSource(row.id)"-->
- </template>
- </el-table-column>
- <el-table-column
- prop="rowNum"
- width="50"
- fixed
- label="搴忓彿"
- />
- <!-- <el-table-column-->
- <!-- prop="status"-->
- <!-- label="宸ュ崟鐘舵��"-->
- <!-- show-tooltip-when-overflow-->
- <!-- sortable="custom"-->
- <!-- width="110"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.status==='NEW'">鏂拌鍗�</div>-->
- <!-- <div v-if="row.status==='CREATING'">閮ㄥ垎涓嬭揪</div>-->
- <!-- <div v-if="row.status==='CREATED'">鍏ㄩ儴涓嬭揪</div>-->
- <!-- <div v-if="row.status==='CLOSED'">宸插叧闂�</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- label="宸ュ崟缂栧彿"
- prop="wo_code"
- show-tooltip-when-overflow
- min-width="150"
- sortable="custom"
- >
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.m_po">{{ row.m_po }}</div>-->
- <!-- <div v-else>{{ row.wo_code }}</div>-->
- <!-- </template>-->
- </el-table-column>
- <el-table-column
- prop="partcode"
- label="浜у搧缂栫爜"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="150"
- />
- <el-table-column
- prop="partname"
- label="浜у搧鍚嶇О"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="150"
- />
- <el-table-column
- prop="partspec"
- label="浜у搧瑙勬牸"
- show-tooltip-when-overflow
- sortable="custom"
- min-width="110"
- >
- <template slot-scope="{row}">
- <div v-if="row.partspec">{{ row.partspec }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="plan_qty"
- label="浠诲姟鏁伴噺"
- width="150"
- show-tooltip-when-overflow
- sortable="custom"
- />
-
- <el-table-column
- prop="laborbad_qty"
- label="宸ュ簾鏁伴噺"
- width="150"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <el-table-column
- prop="materielbad_qty"
- label="鏂欏簾鏁伴噺"
- width="150"
- show-tooltip-when-overflow
- sortable="custom"
- />
-
- <!-- <el-table-column-->
- <!-- prop="relse_qty"-->
- <!-- show-tooltip-when-overflow-->
- <!-- label="宸蹭笅鍗曟暟閲�"-->
- <!-- width="150"-->
- <!-- sortable="custom"-->
- <!-- />-->
- <el-table-column
- prop="wkshp_name"
- label="鐢熶骇杞﹂棿"
- show-tooltip-when-overflow
- sortable="custom"
- width="150"
- >
- <template slot-scope="{row}">
- <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- prop="plan_startdate"-->
- <!-- label="棰勮寮�宸ユ椂闂�"-->
- <!-- show-tooltip-when-overflow-->
- <!-- sortable="custom"-->
- <!-- width="130"-->
- <!-- >-->
- <!-- <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-->
- <!-- sortable="custom"-->
- <!-- width="130"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.plan_enddate">{{ row.plan_enddate.substring(0, 11) }}</div>-->
- <!-- <div v-else>/</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- prop="lm_user"
- label="鍒涘缓浜哄憳"
- show-tooltip-when-overflow
- sortable="custom"
- width="150"
- >
- <template slot-scope="{row}">
- <div v-if="row.lm_user">{{ row.lm_user }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="lm_date"
- label="鍒涘缓鏃堕棿"
- show-tooltip-when-overflow
- width="130"
- 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-->
- <!-- label="鎿嶄綔"-->
- <!-- fixed="right"-->
- <!-- width="80"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div class="operationClass">-->
- <!-- <el-tooltip class="item" effect="dark" content="涓嬭揪" placement="top">-->
- <!-- <!– <el-button v-waves type="text" @click="edit('edit',row)">涓嬭揪</el-button>–>-->
- <!-- <i-->
- <!-- class="el-icon-bottom"-->
- <!-- style="color:#42b983;cursor: pointer;margin-left: 5px"-->
- <!-- @click="edit('edit',row)"-->
- <!-- />-->
- <!-- </el-tooltip>-->
- <!-- </div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- </el-table>
- </div>
- <!--鍒嗛〉-->
- <pagination
- :total="sourceFormTotal"
- :page.sync="sourceForm.page"
- :limit.sync="sourceForm.rows"
- align="right"
- layout="total,prev, pager, next,sizes"
- popper-class="select_bottom"
- @pagination="getMesBadOrderSearch"
- />
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleSourceBack">杩� 鍥�</el-button>
- <el-button v-waves type="primary" @click="dialogVisibleSourceConfirm">纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!--鎵撳嵃棰勮瀵硅瘽妗� 澶ф爣绛�-->
- <el-dialog
- v-el-drag-dialog
- title=""
- top="7vh"
- :visible.sync="dialogVisibleApprove"
- width="812px"
- class="dialogVisibleConfirmClass"
- append-to-body
- :close-on-click-modal="false"
- @close="dialogVisibleConfirmClose"
- >
- <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
- <div id="printMe" style="padding: 30px">
- <!-- <div v-for="(item,index) in tableDataPrint" :key="index">-->
- <div>
- <div style="font-size: 26px; text-align: center">娴佺▼鍗�</div>
-
- <div style="display: flex;justify-content: space-around;margin-top: 20px; position: relative;">
- <div style="width: 78%">
- <el-form
- ref="formApprove"
- :model="formApprove"
- label-width="80px"
- inline
- style="display: flex;justify-content: space-between"
- >
- <div class="elForm">
- <el-form-item label="閿�鍞崟鍙�:" class="formContent">
- {{ formApprove.saleOrderCode ? formApprove.saleOrderCode : '/' }}
- </el-form-item>
- <el-form-item label="宸ュ崟缂栧彿:" class="formContent">
- {{ formApprove.mesordercode }}
- </el-form-item>
- <el-form-item label="婧愬崟鍗曞彿:" class="formContent">
- {{ formApprove.m_po }}
- </el-form-item>
- <el-form-item label="浜у搧缂栫爜:" class="formContent">
- {{ formApprove.partcode }}
- </el-form-item>
- <el-form-item label="浜у搧鍚嶇О:" class="formContent">
- {{ formApprove.partname }}
- </el-form-item>
- <el-form-item label="浜у搧瑙勬牸:" class="formContent">
- {{ formApprove.partspec }}
- </el-form-item>
- <el-form-item label="宸ュ崟鏁伴噺:" class="formContent">
- {{ formApprove.plan_qty }}
- </el-form-item>
- <!-- <el-form-item label="宸ヨ壓璺嚎:" class="formContent">-->
- <!-- {{ formApprove.routename }}-->
- <!-- </el-form-item>-->
- <el-form-item label="鎵撳嵃浜哄憳:" class="formContent">
- <!-- {{ localStorage.getItem('username') }}-->
- {{ formApprove.routename }}
- </el-form-item>
- <el-form-item label="鎵撳嵃鏃堕棿:" class="formContent">
- {{ formApprove.lm_date }}
- </el-form-item>
- </div>
- </el-form>
- </div>
- <div
- id="qrCode0"
- style="width: 22%;height:90px;
- margin-top: 20px;
- overflow-y: scroll;display: flex;
- justify-content: center;
- position: relative;"
- >
- <div id="qrCode00" ref="qrCodeDiv00" />
- </div>
- <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />
- <div
- style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"
- />
- </div>
-
- <el-table
- id="table"
- :data="tableDataPrint[0]"
- border
- class="tableDataPrint"
- :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000'}"
- :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000'}"
- style="width: 100%;margin-top: 20px;text-align: center;border-color: #000"
- >
- <el-table-column
- id="column0"
- prop="seq"
- label="宸ュ簭鍙�"
- width="70"
- align="center"
- />
- <el-table-column
- id="column1"
- prop="stepqrcode"
- label="宸ュ簭浜岀淮鐮�"
- width="100"
- align="center"
- >
- <template slot-scope="{row}">
-
- <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />
- </template>
- </el-table-column>
- <el-table-column
- id="column2"
- prop="stepname"
- label="宸ュ簭"
- width="120"
- align="center"
- />
- <el-table-column
- id="column3"
- prop="plan_qty"
- label="鍔犲伐鏁伴噺"
- width="100"
- align="center"
- />
- <el-table-column
- id="column4"
- prop="good_qty"
- width="100"
- align="center"
- label="鍚堟牸鏁伴噺"
- />
- <el-table-column
- id="column5"
- width="100"
- prop="ng_qty"
- align="center"
- label="涓嶈壇鏁伴噺"
- />
- <el-table-column
- id="column6"
- prop="desc"
- align="center"
- width="120"
- label="澶囨敞"
- />
- </el-table>
- </div>
-
- <div v-if="tableDataPrint[1]" style="margin-top: 100px;">
- <div style="font-size: 26px; text-align: center">娴佺▼鍗�</div>
-
- <div style="display: flex;justify-content: space-around;margin-top: 20px; position: relative;">
- <div style="width: 78%">
- <el-form
- ref="formApprove"
- :model="formApprove"
- label-width="80px"
- inline
- style="display: flex;justify-content: space-between"
- >
- <div class="elForm">
- <el-form-item label="閿�鍞崟鍙�:" class="formContent">
- {{ formApprove.saleOrderCode ? formApprove.saleOrderCode : '/' }}
- </el-form-item>
- <el-form-item label="宸ュ崟缂栧彿:" class="formContent">
- {{ formApprove.mesordercode }}
- </el-form-item>
- <el-form-item label="婧愬崟鍗曞彿:" class="formContent">
- {{ formApprove.m_po }}
- </el-form-item>
- <el-form-item label="浜у搧缂栫爜:" class="formContent">
- {{ formApprove.partcode }}
- </el-form-item>
- <el-form-item label="浜у搧鍚嶇О:" class="formContent">
- {{ formApprove.partname }}
- </el-form-item>
- <el-form-item label="浜у搧瑙勬牸:" class="formContent">
- {{ formApprove.partspec }}
- </el-form-item>
- <el-form-item label="宸ュ崟鏁伴噺:" class="formContent">
- {{ formApprove.plan_qty }}
- </el-form-item>
- <!-- <el-form-item label="宸ヨ壓璺嚎:" class="formContent">-->
- <!-- {{ formApprove.routename }}-->
- <!-- </el-form-item>-->
- <el-form-item label="鎵撳嵃浜哄憳:" class="formContent">
- <!-- {{ localStorage.getItem('username') }}-->
- {{ formApprove.routename }}
- </el-form-item>
- <el-form-item label="鎵撳嵃鏃堕棿:" class="formContent">
- {{ formApprove.lm_date }}
- </el-form-item>
- </div>
- </el-form>
- </div>
- <div
- id="qrCode1"
- style="width: 22%;height:90px;
- margin-top: 20px;
- overflow-y: scroll;display: flex;
- justify-content: center;
- position: relative;"
- >
- <div id="qrCode01" ref="qrCodeDiv01" />
- </div>
- <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />
- <div
- style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"
- />
- </div>
-
- <el-table
- id="table"
- :data="tableDataPrint[1]"
- border
- class="tableDataPrint"
- :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000'}"
- :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000'}"
- style="width: 100%;margin-top: 20px;text-align: center;border-color: #000"
- >
- <el-table-column
- id="column0"
- prop="seq"
- label="宸ュ簭鍙�"
- width="70"
- align="center"
- />
- <el-table-column
- id="column1"
- prop="stepqrcode"
- label="宸ュ簭浜岀淮鐮�"
- width="100"
- align="center"
- >
- <template slot-scope="{row}">
-
- <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />
- </template>
- </el-table-column>
- <el-table-column
- id="column2"
- prop="stepname"
- label="宸ュ簭"
- width="120"
- align="center"
- />
- <el-table-column
- id="column3"
- prop="plan_qty"
- label="鍔犲伐鏁伴噺"
- width="100"
- align="center"
- />
- <el-table-column
- id="column4"
- prop="good_qty"
- width="100"
- align="center"
- label="鍚堟牸鏁伴噺"
- />
- <el-table-column
- id="column5"
- width="100"
- prop="ng_qty"
- align="center"
- label="涓嶈壇鏁伴噺"
- />
- <el-table-column
- id="column6"
- prop="desc"
- align="center"
- width="120"
- label="澶囨敞"
- />
- </el-table>
- </div>
-
- </div>
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleBackPreview">杩� 鍥�</el-button>
- <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
- <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�/鎵� 鍗�</el-button>-->
- <el-button v-waves v-print="printObj" type="primary">鎵� 鍗�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!--鎵撳嵃棰勮椤甸潰 灏忔爣绛�-->
- <el-dialog
- v-el-drag-dialog
- title="棰勮"
- :visible.sync="dialogVisible2"
- width="1000"
- top="10vh"
- :close-on-click-modal="false"
- @close="dialogVisible2Close"
- >
- <div style="height: 650px;overflow:auto;">
- <!-- 涓嬫媺妗嗛�夋嫨鎵撳嵃灏哄-->
- <div v-if="!isLastPrint" style="display: flex;align-items: center;margin: 0 0 20px 0">
- <div>閫夋嫨鎵撳嵃灏哄锛�</div>
- <el-select
- v-model="printSize"
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- @change="printSizeChange"
- >
-
- <el-option
- v-for="item in printSizeSelectArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </div>
- <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
- <!-- <div id="printMe2" :style="{paddingLeft:'10px',paddingTop: '5px'}">-->
- <div v-if="!isLastPrint" :style="printMe2StylePadding(printSize)">
- <!-- 80 * 50-->
- <div
- v-if="printSize===0"
- style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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;">涓嬮亾宸ュ簭:</div>
- <div>{{ qrForm.nextstepname }}</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>
- <!-- 78 * 60 -->
- <div
- v-if="printSize===1"
- style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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;">涓嬮亾宸ュ簭:</div>
- <div>{{ qrForm.nextstepname }}</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>
- <!-- 60 * 40 -->
- <div
- v-if="printSize===2"
- style="display: flex;width: 220px;height: 130px;border: 1px solid #000;text-align: center;font-size: 12px"
- >
-
- <div style="width: 70px;display: flex;flex-direction: column;border-right: 1px solid #000">
- <div
- style="display: flex;height: 60%;border-bottom:1px solid #000;
- justify-content: center;align-items: center;position: relative"
- >
- <div
- id="qrCode2"
- ref="qrCodeDiv2"
- style="overflow-y: hidden;height:71%;position: absolute;left: 7px;"
- />
- </div>
- <div
- style="display: flex;height: 20%;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
- >
- <div style="margin-left: 3px; ">鏁伴噺:{{ qrForm.startqty }}</div>
- </div>
- <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;">
- <div style="margin-left: 3px; ">鎿嶄綔:{{ qrForm.operator }}</div>
-
- </div>
- </div>
-
- <div style="width:150px;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="margin-left: 3px;">缂栧彿:{{ 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="margin-left: 3px;">浜у搧缂栫爜:{{ 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="margin-left: 3px;">浜у搧鍚嶇О:{{ 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="margin-left: 3px;">涓嬮亾宸ュ簭:{{ qrForm.nextstepname }}</div>
-
- </div>
- <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
- <div style=" margin-left: 3px;">鏃堕棿: {{ qrForm.operatorTime }}</div>
- <!-- <div>{{ qrForm.operatorTime?qrForm.operatorTime.substring(5):'' }}</div>-->
- <!-- <div>{{ qrForm.operatorTime }}</div>-->
- </div>
-
- </div>
-
- </div>
- <div
- v-if="printSize===5"
- style="display: flex;width: 140px;height: 80px;border: 1px solid #000;text-align: center;font-size: 10px;"
- >
-
- <div v-if="false" style="width: 45px;display: flex;flex-direction: column;border-right: 1px solid #000">
- <div
- style="display: flex;height: 60px;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: 20px;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: 20px;justify-content: flex-start;align-items: center">
- <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
- {{ qrForm.operator }}
- </div>
- </div>
-
- <div style="width:100%;display: flex;flex-direction: column;">
- <div
- style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: center;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: center;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: center;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: center;align-items: center;text-align: left"
- >
- <!-- <div style="width:60px;margin-left: 5px;">涓嬮亾宸ュ簭:</div>-->
- <div>{{ qrForm.nextstepname }}</div>
- </div>
- <div style="display: flex;height: 20%;justify-content: center;align-items: center;text-align: left">
- <!-- <div style="width: 60px;margin-left: 5px;">澶勭悊鏃堕棿:</div>-->
- <div>{{ qrForm.operatorTime }}</div>
- </div>
-
- </div>
-
- </div>
- </div>
-
- <div v-if="isLastPrint" style="display: flex;flex-direction: column">
-
- <div style="display: flex;font-weight: bold;font-size: 16px;margin-bottom: 20px;">
- <div style="width: 48%;">
- 璇烽�夋嫨鍏ュ簱鏉$爜
- </div>
- <div style="width: 48%;margin-left: 4%;">
- 宸查�変腑鐨勫叆搴撴潯鐮�
- </div>
- </div>
-
- <div style="display: flex;">
- <!-- 璇烽�夋嫨鍏ュ簱鏉$爜-->
- <div style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;">
- <div
- v-for="(item,index) in lastPrintArr"
- :key="item.inbarcode"
- :style="{marginTop:index===0?'':'15px'}"
- style="display: flex;align-items: center;"
- >
-
- <!-- v-if="printSize===0"-->
- <div style="margin-right:40px">
- <el-checkbox
- :key="item.inbarcode"
- v-model="item.checked"
- @change="val=>inbarcodeChange(val,item)"
- />
- </div>
- <div
- style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
- >
- <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
- {{ item.good_qty }}
- </div>
- <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
- <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
- {{ item.username }}
- </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>{{ item.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>{{ item.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>{{ item.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;">浜у搧瑙勬牸:</div>
- <div>{{ item.partspec ? item.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>{{ item.lm_date }}</div>
- </div>
-
- </div>
-
- </div>
-
- </div>
- </div>
-
- <!-- 宸查�変腑鐨勫叆搴撴潯鐮�-->
- <div
- style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;margin-left: 50px;"
- >
- <div id="printMe2">
- <div
- v-for="(item,index) in lastPrintArrSelected"
- v-if="item.checked"
- :key="item.inbarcode"
- :style="{marginTop:index===0?'':'15px'}"
- style="display: flex;align-items: center;"
- >
- <div
- style="display: flex;width: 280px;height: 160px;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: 96px;border-bottom:1px solid #000;
- justify-content: center;align-items: center;position: relative"
- >
- <div
- id="qrCode3"
- ref="qrCodeDiv3"
- style="overflow-y: hidden;height:60px;position: absolute;left: 14px;"
- />
- </div>
- <div
- style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
- >
- <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
- {{ item.good_qty }}
- </div>
- <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
- <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
- {{ item.username }}
- </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>{{ item.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>{{ item.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>{{ item.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;">浜у搧瑙勬牸:</div>
- <div>{{ item.partspec ? item.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>{{ item.lm_date }}</div>
- </div>
-
- </div>
-
- </div>
-
- </div>
- </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
- :close-on-click-modal="false"
- title="鍏宠仈宸ヨ壓璺嚎"
- :visible.sync="dialogVisibleRoute"
- width="800px"
- top="10vh"
- :fullscreen="isIpad"
- class="dialogVisibleRoute"
- @closed="handleCloseRoute"
- @close="handleCloseRoute"
- >
- <div>
- <i class="el-icon-s-comment" style="color:#42b983;" /> 浜у搧鍚嶇О锛歿{ dialogFormRoute.projectName }}
- </div>
- <el-divider />
- <div style="margin-bottom: 10px">
- <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ヨ壓璺嚎闆嗗悎
- </div>
-
- <div class="myCheckboxGroup">
- <div
- v-for="item in dialogFormRoute.routeOperationArr"
- :key="item.code"
- :style="{border:item.isSelected1?'1px solid #42b983':'1px solid #eee'}"
- class="myCheckbox"
- @click="myCheckboxClick(item)"
- >
- <input
- class="myCheckboxInput"
- type="checkbox"
- :value="item.code"
- :name="item.name"
- :style="{color:item.isSelected2?'#42b983':'#fff'}"
- @click="myCheckboxInputClick(item)"
- >{{ item.name }}
- <!-- 鐖跺瓙鐐瑰嚮浜嬩欢涓嶅奖鍝�-->
- <!-- onClick="event.cancelBubble = true"-->
- </div>
- </div>
-
- <el-divider />
- <div>
- <i class="el-icon-s-operation" style="color:#42b983;" /> 榛樿宸ヨ壓璺嚎
- </div>
- <div style="margin-top: 20px">
- <el-select
- v-model="defaultroute_code"
- filterable
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- class="defaultroute_code"
- >
- <el-option
- v-for="item in defaultroute_codeArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </div>
- <el-divider />
- <div style="margin-bottom: 10px">
- <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ュ簭鍒楄〃
- </div>
- <div style="overflow-y: scroll">
- <el-table
- ref="projectTableData"
- :data="projectTableData"
- border
- height="280"
- :row-class-name="tableRowClassName"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- >
- <el-table-column
- prop="seq"
- width="100"
- label="宸ュ簭搴忓彿"
- fixed
- />
- <el-table-column
- prop="stepcode"
- label="宸ュ簭缂栫爜"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="stepname"
- label="宸ュ簭鍚嶇О"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="enable"
- label="鍚敤鐘舵��"
- fixed="right"
- >
- <template slot-scope="{row}">
- <div v-if="row.enable==='Y'">
- <svg-icon icon-class="circleYes" style="margin-right: 2px" />
- 鏄�
- </div>
- <div v-if="row.enable==='N'">
- <svg-icon icon-class="circleNo" style="margin-right: 2px" />
- 鍚�
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="routeDialogVisibleCancel">鍙� 娑�</el-button>
- <el-button v-waves type="primary" @click="routeDialogVisibleConfirm">纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!-- 宸ュ崟sop/宸ュ簭sop-->
- <el-dialog
- v-el-drag-dialog
- class="sop"
- title="璁惧SOP棰勮"
- :visible.sync="SopDialogVisible"
- width="800px"
- :close-on-click-modal="false"
- top="15vh"
- @closed="handleSopClose"
- @close="handleSopClose"
- >
-
- <el-form inline label-width="110px" style="display:flex">
- <el-form-item label="宸ュ崟SOP">
- <el-select
- v-model="dialogSopForm.sop"
- style="width:200px"
- placeholder="璇烽�夋嫨"
- filterable
- :popper-append-to-body="false"
- @change="sopChange"
- >
- <el-option
- v-for="item in sopArr"
- :key="item.filepath"
- :label="item.filename"
- :value="item.filepath"
- />
- </el-select>
- </el-form-item>
-
- <el-form-item label="Sop鐗堟湰">
- <el-input v-model="dialogSopForm.v" disabled style="width: 200px" />
- </el-form-item>
- </el-form>
-
- <el-button
- v-waves
- type="primary"
- style="margin-left: 37px"
- @click="view"
- >棰� 瑙�/涓� 杞�
- </el-button>
-
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="handleSopClose">鍙� 娑�</el-button>
- <!-- <el-button-->
- <!-- v-waves-->
- <!-- type="primary"-->
- <!-- :loading="$store.state.app.buttonIsDisabled"-->
- <!-- :disabled="$store.state.app.buttonIsDisabled"-->
- <!-- @click="handleSopConfirm"-->
- <!-- >纭� 瀹�</el-button>-->
- </div>
- </span>
- </el-dialog>
-
- </div>
-</template>
-
-<script>
-import Pagination from '@/components/Pagination'
-import { handleDatetime, handleDatetime2, validateCode } from '@/utils/global'
-import { getCookie } from '@/utils/auth'
-import QRCode from 'qrcodejs2'
-import $ from 'jquery'
-import elDragDialog from '@/directive/el-drag-dialog'
-import waves from '@/directive/waves'
-import {
- AddMesOrderCodeSearch,
- AddUpdateMesOrder, DeleteMesOrder,
- MesBadOrderSearch, MesOrderDistribution, MesOrderNewStepContent, MesOrderProcessSopSearch,
- MesOrderSearch, MesOrderSopSearch,
- UpdateMesOrderStepSearch
-} from '@/api/WorkOrder'
-import { PartSelect } from '@/api/ProductModel'
-import { PrentOrganization, PrentOrganizationNoCompany, StepData } from '@/api/GeneralBasicData'
-import Sortable from 'sortablejs'
-import ElDragSelect from '@/components/DragSelect'
-import { MesOrderPrintSearch } from '@/api/GridReport' // base on element-ui
-import DateType from '@/components/DateType'
-import { PartSelectRpute, RouteSelectStep } from '@/api/basicSettings'
-import { DeviceSopSearch } from '@/api/DeviceManager'
-
-export default {
- name: 'WorkOrderList',
- components: {
- Pagination, ElDragSelect, DateType
- },
- directives: { elDragDialog, waves },
- data() {
- return {
- mouseHoverType: 'mouseout',
- mouseHoverTypeDialog: 'mouseout',
- isExpandForm: false,
- isIpad: false,
- mainHeight: 0,
- tableHeight: 0,
- username: '',
- form: {
- wkshopcode: '', // 杞﹂棿缂栫爜
- mesorderstus: '', // 宸ュ崟鐘舵�佺爜
- mesordercode: '', // 宸ュ崟缂栧彿
- partcode: '', // 浜у搧缂栫爜
- ordertype: '', // ordertype
- sourceorder: '', // 婧愬崟鍗曞彿
- saleordercode: '', // 閿�鍞鍗�
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
- creatuser: '', // 鍒涘缓浜哄憳
- // createdate: '', // 鍒涘缓鏃堕棿
- datatype: 'ED', // 鏃ユ湡绫诲瀷(璁″垝寮�宸�(PS)銆佽鍒掑畬宸�(PE)銆侀璁′氦浠�(ED)銆佸垱寤烘棩鏈�(CT))
- timeValue: [], // 鏌ヨ鏃ユ湡
- prop: 'lm_date', // 鎺掑簭瀛楁
- order: 'desc', // 鎺掑簭瀛楁
- page: 1, // 绗嚑椤�
- rows: 20 // 姣忛〉澶氬皯鏉�
- },
- erporderstusArr: [
- { code: 'NEW', name: '鏂板伐鍗�' },
- // { code: 'CREATING', name: '鎵ц涓�' },
- // { code: 'CREATED', name: '宸插叧闂�' }
- { code: 'ALLO', name: '宸叉淳鍙�' },
- { code: 'START', name: '寮�宸�' },
- { code: 'CLOSED', name: '瀹屽伐' }
- // { code: 'NOSCHED', name: '寰呮帓绋�' },
- // { code: 'SCHED', name: '宸叉帓绋�' }
- ],
- wkshopcodeArr: [],
- total: 10,
- tableData: [],
- dialogVisible: false,
- dialogForm: {
- mesorderstus: 'NEW', // 宸ュ崟鐘舵�佺爜
- mesordercode: '', // 宸ュ崟缂栧彿
- ordertype: 'PO', // 宸ュ崟绫诲瀷
- sourceorderid: '', // 婧愬崟id
- sourceorder: '', // 婧愬崟鍗曞彿
-
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
-
- mesqty: '', // 宸ュ崟鏁伴噺
- wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
- wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
-
- deliverydate: '', // 浜や粯鏃堕棿
- data_sources: '', // 鏁版嵁鏉ユ簮
-
- routecode: '', // 宸ヨ壓璺嚎
-
- mesmaxqty: 0, // 宸ュ崟鐨勬渶澶у��
- mesqtyinit: 0// 宸ュ崟鏁伴噺鍒濆鍊�
- },
- ordertypeArr: [// 宸ュ崟绫诲瀷
- { code: 'PO', name: '鏍囧噯宸ュ崟' },
- { code: 'FO', name: '鎶ュ簾琛ュ崟' }
- ],
- partArr: [], // 浜у搧淇℃伅
- wkshopArr: [], // 鐢熶骇杞﹂棿鏁扮粍
- routeArr: [], // 宸ヨ壓璺嚎鏁扮粍
- orderlevArr: [
- { code: 1, name: '鐗圭骇' },
- { code: 2, name: '绱ф��' },
- { code: 3, name: '姝e父' }
- ], // 宸ュ崟绛夌骇鏁扮粍
- operation: '',
- dialogFormRules: {
- mesorderstus: [
- { required: true, message: '璇烽�夋嫨璁㈠崟鐘舵��', trigger: ['blur', 'change'] }
- ],
- partcode: [
- { required: true, message: '璇烽�夋嫨浜у搧淇℃伅', trigger: ['blur', 'change'] }
- ],
- mesordercode: [
- { required: true, validator: validateCode, trigger: ['blur', 'change'] }
- ],
- mesqty: [
- { required: true, message: '璇疯緭鍏ュ伐鍗曟暟閲�', trigger: ['blur', 'change'] }
- ],
- wkshopcode: [
- { required: true, message: '璇烽�夋嫨鐢熶骇杞﹂棿', trigger: ['blur', 'change'] }
- ],
- deliverydate: [
- { required: true, message: '璇烽�夋嫨棰勮浜や粯鏃ユ湡', trigger: ['blur', 'change'] }
- ],
- planstartdate: [
- { required: true, message: '璇烽�夋嫨寮�濮嬫椂闂�', trigger: ['blur', 'change'] }
- ],
- planenddate: [
- { required: true, message: '璇烽�夋嫨缁撴潫鏃堕棿', trigger: ['blur', 'change'] }
- ],
- orderlev: [
- { required: true, message: '璇烽�夋嫨宸ュ崟绛夌骇', trigger: ['blur', 'change'] }
- ],
- isAps: [
- { required: true, message: '璇烽�夋嫨鏄惁鎺掔▼', trigger: ['blur', 'change'] }
- ],
- bomId: [
- { required: true, message: '璇烽�夋嫨鐗╂枡娓呭崟', trigger: ['blur', 'change'] }
- ]
-
- },
- dialogVisibleTask: false,
- taskTableData: [],
-
- dialogVisibleSearch: false,
- searchTableData: [],
- dialogVisibleApprove: false,
- tableDataPrint: [], // 鎵撳嵃椤甸潰鍐呭
- printObj: {
- id: 'printMe',
- popTitle: '鎵撳嵃妯℃澘',
- preview: false,
- extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
- closeCallback(vue) { // 鍏抽棴鎵撳嵃鐨勫洖璋冧簨浠讹紙鏃犳硶纭畾鐐瑰嚮鐨勬槸纭杩樻槸鍙栨秷锛�
- console.log('11212', vue)
- // vue.dialogVisible = false
- vue.dialogVisibleApprove = false
- },
- beforeOpenCallback(vue) {
- vue.printLoading = true
- console.log('鎵撳紑涔嬪墠')
- console.log()
- },
- openCallback(vue) {
- vue.printLoading = false
- console.log('鎵ц浜嗘墦鍗�')
- }
- },
-
- formApprove: {
- m_po: '', // 婧愬崟鍗曞彿
- mesordercode: '',
- partcode: '',
- partname: '',
- partspec: '',
- plan_qty: '',
- routename: '',
- lm_date: ''
- },
- number: '',
- 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: '',
- nextstepname: '',
- operator: '', // 鎿嶄綔浜�
- operatorTime: ''// 鎿嶄綔鏃堕棿
- },
- dialogVisibleSource: false,
- sourceTableData: [],
- sourceForm: {
- wkshopcode: '', // 杞﹂棿缂栫爜
- mesordercode: '', // 宸ュ崟缂栧彿
- sourceorder: '', // 璁㈠崟缂栧彿
- saleordercode: '', // 閿�鍞鍗曞彿
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
- creatuser: '', // 鍒涘缓浜哄憳
- // paystartdate: '', // 浜や粯鏃堕棿
- // paystartdate: '', // 棰勮寮�宸ユ椂闂�
- // payenddate: '', // 棰勮瀹屽伐鏃堕棿
- createdate: '', // 鍒涘缓鏃堕棿
-
- prop: 'lm_date', // 鎺掑簭瀛楁
- order: 'desc', // 鎺掑簭瀛楁
- page: 1, // 绗嚑椤�
- rows: 20 // 姣忛〉澶氬皯鏉�
- },
- sourceFormTotal: 10,
- radioSelectedId: '',
- isExpandDialog: false, // 瀵硅瘽妗嗚〃鍗曟槸鍚﹀睍寮�锛岄粯璁や笉灞曞紑
- dialogVisibleRoute: false,
- dialogFormRoute: {
- projectName: '', // 浜у搧鍚嶇О
- projectCode: '', // 浜у搧浠g爜
- routeOperationArr: [] // 宸ヨ壓璺嚎闆嗗悎
- },
- defaultroute_code: '', // 榛樿宸ヨ壓璺嚎閫変腑鍊�
- defaultroute_codeArr: '', // 榛樿宸ヨ壓璺嚎鏁扮粍
- projectTableData: [], // 璁惧鍒楄〃
- tableDataDetail: [], // 鐐瑰嚮宸ュ崟琛ㄧ殑琛� 鏄剧ず璇︾粏淇℃伅
- printSize: 0,
- printSizeSelectArr: [// 瀹�*楂�
- { code: 0, name: '80*50' },
- { code: 1, name: '78*60' },
- { code: 2, name: '60*40' }
- // { code: 2, name: '50*60' },
- // { code: 3, name: '50*40' },
- // { code: 4, name: '50*80' },
- // { code: 5, name: '40*30' }
- ],
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() < Date.now() - 8.64e7
- }
- },
-
- isLastPrint: false, // 鏄惁鏄湯閬撴墦鍗�
- lastPrintArr: [], // 鏈亾鎵撳嵃鐨勬暟缁�(鎵�鏈�)
- lastPrintArrSelected: [], // 鏈亾鎵撳嵃鐨勬暟缁�(閫変腑)
-
- switchButton: false,
-
- routeStepArr: '',
-
- stepTableData: [],
- sortable: null,
- stepSelectArr: [], // 宸ュ簭涓嬫媺鏁版嵁
- stepSelectedValue: [], // 涓嬫媺閫変腑鍊�
-
- multipleSelection: [],
-
- datatypeList: [
- { code: 'PS', name: '棰勮寮�宸ユ棩鏈�' },
- { code: 'PE', name: '棰勮瀹屽伐鏃ユ湡' },
- { code: 'ED', name: '棰勮浜や粯鏃ユ湡' },
- { code: 'CT', name: '宸ュ崟鍒涘缓鏃ユ湡' }
- ],
-
- routecodeArr: [], //
-
- sourceType: false, // 宸ュ簭鐨勬暟鎹潵婧�
-
- mesSetting: JSON.parse(localStorage.getItem('mesSetting')),
-
- SopDialogVisible: false,
- dialogSopForm: { // 璁惧SOP琛ㄥ崟
- sop: '',
- v: ''
- },
- sopArr: [],
- routeCode: '', // 宸ヨ壓璺嚎code
- partCode: ''
- }
- },
- watch: {
- 'stepSelectedValue': {
- // deep: true,
- handler: function(val) {
- // do something with the new and old value of stepSelectedValue
- console.log(val, 1)
- const arr = JSON.parse(JSON.stringify(this.stepTableData))
- const arrStepcode = arr.map(i => i.stepcode)
- this.stepTableData = []
- val.forEach(i => {
- this.stepTableData.push(
- {
- stepcode: i,
- stepname: this.stepSelectArr.find(j => j.stepcode === i).stepname,
- stepprice: arrStepcode.includes(i) ? arr.find(j => j.stepcode === i).stepprice : 0
- }
- )
- })
- }
- }
- },
- activated() {
window.addEventListener('resize', this.getHeight)
this.getHeight()
},
created() {
- this.handleRequest()
- },
- mounted() {
- window.addEventListener('resize', this.getHeight)
- this.getHeight()
-
- // this.$nextTick(() => {
- // this.setSort()
- // })
- },
- methods: {
- // 寮瑰嚭妗嗗叧闂�
- handleSopClose() {
- this.SopDialogVisible = false
- this.dialogSopForm = { // 璁惧SOP琛ㄥ崟
- sop: '',
- v: ''
- }
- },
- // 棰勮
- view() {
- window.open(process.env.VUE_APP_BASE_API_FILE + this.dialogSopForm.sop)
- },
- sopChange(val) {
- this.dialogSopForm.v = this.sopArr.find(i => i.filepath === val).version
- },
- async pre(row, type) {
- if (type === 1) {
- const data = {
- wocode: row.wo_code,
- materielcode: row.partcode
- }
- const { data: res } = await MesOrderSopSearch(data)
- this.sopArr = res
- }
-
- if (type === 2) {
- const data = {
- materielcode: this.partCode,
- routecode: this.routeCode ? this.routeCode : '',
- stepcode: row.step_code
- }
- const { data: res } = await MesOrderProcessSopSearch(data)
- this.sopArr = res
- }
-
- this.SopDialogVisible = true
- },
- // 宸ュ簭鏉ユ簮鍒囨崲
- sourceTypeChange(val) {
- this.stepTableData = []
- if (val) {
- this.getMesOrderNewStepContent()
- } else {
- if (this.mesSetting.route) {
- this.routecodeChange()
- } else {
- this.getBasicProcessData()
- }
- }
- },
-
- DateTypeChange(value) {
- this.form.datatype = value
- },
- cycleTimeChange(val) {
- this.form.timeValue = val
- },
- setSort() {
- const el = this.$refs.stepTableDataRef.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
- this.sortable = Sortable.create(el, {
- ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
- setData: function(dataTransfer) {
- // to avoid Firefox bug
- // Detail see : https://github.com/RubaXa/Sortable/issues/1012
- dataTransfer.setData('Text', '')
- },
- onEnd: evt => {
- const targetRow = this.stepTableData.splice(evt.oldIndex, 1)[0]
- this.stepTableData.splice(evt.newIndex, 0, targetRow)
-
- this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
- // for show the changes, you can delete in you code
- // const tempIndex = this.newList.splice(evt.oldIndex, 1)[0]
- // this.newList.splice(evt.newIndex, 0, tempIndex)
- }
- })
- },
- tableRowClassName({ row, rowIndex }) {
- return 'custom-row'
- },
- handleRequest() {
- this.getMesOrderSearch().then(res => {
- if (res.code === '200') {
- this.getSelect()
- this.getPrentOrganizationNoCompany()
- }
- })
- },
- async getPrentOrganizationNoCompany() {
- const { data: res } = await PrentOrganizationNoCompany()
- this.wkshopcodeArr = res
- },
- async getMesOrderSearch() {
- // let tempDate = this.form.createdate
- // if (tempDate.length > 0) {
- // tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
- // }
-
- const data = {
- wkshopcode: this.form.wkshopcode,
- mesorderstus: this.form.mesorderstus, // 宸ュ崟鐘舵�佺爜
- mesordercode: this.form.mesordercode, // 宸ュ崟缂栧彿
- partcode: this.form.partcode, // 浜у搧缂栫爜
- partname: this.form.partname, // 浜у搧鍚嶇О
- partspec: this.form.partspec, // 浜у搧瑙勬牸
- creatuser: this.form.creatuser, // 鍒涘缓浜哄憳
- sourceorder: this.form.sourceorder, // 婧愬崟鍗曞彿
- saleordercode: this.form.saleordercode, // 閿�鍞鍗�
- ordertype: this.form.ordertype, // 鍗曟嵁绫诲瀷
- datatype: this.form.datatype,
- searchdate: this.form.timeValue.join('~'),
- // createdate: this.form.createdate.toString().length > 0 ? handleDatetime(this.form.createdate) : '', // 鍒涘缓鏃堕棿
- prop: this.form.prop, // 鎺掑簭瀛楁
- order: this.form.order, // 鎺掑簭瀛楁
- page: this.form.page, // 绗嚑椤�
- rows: this.form.rows // 姣忛〉澶氬皯鏉�
- }
- const res = await MesOrderSearch(data)
- this.tableData = res.data
- this.total = res.count
-
- // this.form.createdate = tempDate
- return { code: res.code }
- },
- async getSelect() {
- // 鑾峰彇浜у搧淇℃伅
- const { data: res1 } = await PartSelect()
- this.partArr = res1
-
- // 鑾峰彇缁勭粐
- const { data: res2 } = await PrentOrganization()
- this.wkshopArr = res2
-
- // 鑾峰彇宸ュ簭
- const { data: res3 } = await StepData()
- this.stepSelectArr = res3
- },
- // 璁㈠崟鐘舵�佹敼鍙樻椂
- erporderstusChange(val) {
- this.form.mesorderstus = val
- },
- // 鎺掑簭鏀瑰彉鏃�
- 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.getMesOrderSearch()
- },
- sourceSortChange({ column, prop, order }) {
- if (order === 'descending') {
- order = 'desc'
- } else if (order === 'ascending') {
- order = 'asc'
- } else {
- order = 'desc'
- }
- this.sourceForm.order = order
- this.sourceForm.prop = prop
- this.getMesBadOrderSearch()
- },
- // 鏌ヨ
- search() {
- this.getMesOrderSearch()
- },
-
- // 閲嶇疆
- reset(val) {
- this.form.wkshopcode = ''
- this.form.mesorderstus = ''
- this.form.mesordercode = ''
- this.form.partcode = ''
- this.form.partname = ''
- this.form.partspec = ''
- this.form.paydate = ''
- this.form.creatuser = ''
- this.form.sourceorder = ''
- this.form.ordertype = ''
- // this.form.createdate = ''
-
- this.form.timeValue = []
- this.cycleTime = null
- this.$refs.DateTypeRef.clearValue()
-
- this.getMesOrderSearch()
- },
- // 鏂板鎸夐挳
- async add(operation) {
- const { data: res } = await AddMesOrderCodeSearch()
- this.dialogForm.mesordercode = res
- this.operation = operation
- this.dialogVisible = true
- this.dialogForm.data_sources = 'MES'
-
- this.$nextTick(() => {
- this.setSort()
- })
- },
- // 宸ュ簭浠诲姟
- 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.dialogForm.mesordercode = res[0].wo_code
- // this.dialogVisibleTask = true
- },
- dialogVisibleBack() {
- this.dialogVisibleTask = false
- },
- handleSelectionChange(val) {
- this.multipleSelection = val.map(i => i.wo_code)
- },
-
- selected(row, index) {
- return row.status === 'NEW' && row.isstep === 'Y'
- },
- // 娲惧彂
- send() {
- if (this.multipleSelection.length === 0) {
- return this.$message.info('璇峰厛鍕鹃�夌浉瀵瑰簲鐨勫伐鍗曪紒')
- }
-
- this.$confirm('鏄惁纭娲惧彂?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- MesOrderDistribution(this.multipleSelection).then(res => {
- if (res.code === '200') {
- this.$notify.success('娲惧彂鎴愬姛!')
- this.getMesOrderSearch()
- }
- })
- }).catch(() => {
- this.$notify.info('宸插彇娑堟淳鍙�')
- })
- },
- // 鍒犻櫎鎸夐挳
- async del(row) {
- if (row.status === 'START' || row.status === 'CLOSED' || row.status === 'SCHED') {
- return this.$message.info('姝ゅ伐鍗曚笉鍙垹闄わ紒')
- }
- this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- const data = {
- souceid: row.sourceid ? row.sourceid : '',
- wocode: row.wo_code,
- m_po: row.m_po,
- orderqty: row.plan_qty
- }
- DeleteMesOrder(data).then(res => {
- if (res.code === '200') {
- this.$notify.success('鍒犻櫎鎴愬姛!')
- if (this.form.page > 1 && this.tableData.length === 1) {
- this.form.page--
- }
- this.getMesOrderSearch()
- }
- })
- }).catch(() => {
- this.$notify.info('宸插彇娑堝垹闄�')
- })
- },
-
- // 淇敼鎸夐挳
- async edit(operation, row) {
- this.operation = operation
-
- this.dialogForm.data_sources = row.data_sources
- this.dialogForm.mesorderstus = row.status
- this.dialogForm.mesordercode = row.wo_code
- this.dialogForm.ordertype = row.wotype
- this.dialogForm.sourceorderid = row.sourceid
- this.dialogForm.sourceorder = row.m_po
- this.dialogForm.partcode = row.partcode
- this.dialogForm.partname = row.partname
- this.dialogForm.partspec = row.partspec
- this.dialogForm.wkshopcode = row.wkshp_code
- this.dialogForm.routecode = row.route_code
- this.dialogForm.deliverydate = row.saleOrderDeliveryDate.substring(0, 11)
- this.dialogForm.mesqty = row.plan_qty
-
- this.dialogForm.mesqtyinit = row.plan_qty
-
- const data = {
- sourceid: this.dialogForm.sourceorderid,
- sourcewo: this.dialogForm.sourceorder,
- wocode: this.dialogForm.mesordercode,
- data_sources: this.dialogForm.data_sources
- }
- const { data: res } = await UpdateMesOrderStepSearch(data)
- this.dialogForm.mesmaxqty = res.canupdate_qty
-
- if (this.mesSetting.route) { // 鎸夊伐鑹鸿矾绾胯蛋妯″紡
- if (!this.dialogForm.routecode) {
- await this.getPartcodeChangeDialog()
- }
-
- if (res.stepdata.length > 0) {
- res.stepdata.forEach(i => {
- this.stepTableData.push(
- {
- stepcode: i.step_code,
- stepname: i.stepname,
- stepprice: i.stepprice
- }
- )
- })
- this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
- } else {
- const data2 = {
- wkshopcode: this.dialogForm.wkshopcode,
- partcode: this.dialogForm.partcode
- }
- const { data: res2 } = await MesOrderNewStepContent(data2)
- if (res2.length > 0) {
- res2.forEach(i => {
- this.stepTableData.push(
- {
- stepcode: i.step_code,
- // stepname: i.stepname,
- stepprice: i.stepprice
- }
- )
- })
- this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
- }
- }
- } else {
- if (res.stepdata.length > 0) {
- res.stepdata.forEach(i => {
- this.stepTableData.push(
- {
- stepcode: i.step_code,
- stepname: i.stepname,
- stepprice: i.stepprice
- }
- )
- })
- this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
- } else {
- await this.getBasicProcessData()
- }
- }
-
- this.dialogVisible = true
- this.$nextTick(() => {
- this.setSort()
- })
- },
- // 鎸夊伐搴忔ā寮忚蛋鐨勬椂鍊� 寮曠敤鍩虹璧勬枡 宸ヨ壓
- async getBasicProcessData() {
- const { data: res } = await PartSelectRpute({ partcode: this.dialogForm.partcode })
- res.sort((a, b) => a.step_seq - b.step_seq)
- this.stepTableData = []
- res.forEach(i => {
- this.stepTableData.push(
- {
- stepcode: i.step_code,
- stepname: i.step_name,
- stepprice: i.unprice
- }
- )
- })
- this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
- },
- // 宸ュ崟鍏抽棴浜嬩欢
- orderClose() {
- console.log('宸ュ崟鍏抽棴浜嬩欢')
- },
- // 瀵硅瘽妗嗕骇鍝佷俊鎭�兼敼鍙�
- partcodeChangeDialog(val) {
- console.log(val)
- this.dialogForm.partname = this.partArr.find(item => item.partcode === val).partname
- this.dialogForm.partcode = this.partArr.find(item => item.partcode === val).partcode
- this.dialogForm.partspec = this.partArr.find(item => item.partcode === val).partspec
-
- this.dialogForm.routecode = ''
-
- if (this.mesSetting.route) {
- this.getPartcodeChangeDialog()
- } else {
- this.getBasicProcessData()
- }
- },
-
- async getPartcodeChangeDialog() {
- const { data: res } = await PartSelectRpute({ partcode: this.dialogForm.partcode })
- this.routecodeArr = res
-
- // if (this.mesSetting.route) { // 鎸夊伐鑹鸿矾绾胯蛋妯″紡
- this.dialogForm.routecode = this.partArr.find(item => item.partcode === this.dialogForm.partcode).default_route
- if (this.dialogForm.routecode && !this.sourceType) {
- await this.routecodeChange()
- } else {
- await this.getMesOrderNewStepContent()
- }
- // }
- // else { // 鎸夊伐搴忚蛋妯″紡
- // await this.getMesOrderNewStepContent()
- // }
- },
- // 宸ヨ壓璺嚎鍊兼敼鍙�
- async routecodeChange() {
- const data = {
- partcode: this.dialogForm.partcode,
- routecode: this.dialogForm.routecode
- }
- const { data: res } = await RouteSelectStep(data)
-
- this.stepSelectedValue = []
- this.stepTableData = []
- if (res.length > 0) {
- res.sort((a, b) => a.step_seq - b.step_seq)
- res.forEach(i => {
- this.stepTableData.push(
- {
- stepcode: i.step_code,
- // stepname: i.stepname,
- stepprice: i.unprice
- }
- )
- })
- this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
- }
- },
-
- async getMesOrderNewStepContent() {
- // if (!this.mesSetting.route && this.operation === 'edit') {
- // return
- // }
-
- const data = {
- routecode: this.dialogForm.routecode,
- wkshopcode: this.dialogForm.wkshopcode,
- partcode: this.dialogForm.partcode
- }
- const { data: res } = await MesOrderNewStepContent(data)
- // console.log(res)
- this.stepSelectedValue = []
- this.stepTableData = []
- if (res.length > 0) {
- res.forEach(i => {
- this.stepTableData.push(
- {
- stepcode: i.step_code,
- // stepname: i.stepname,
- stepprice: i.stepprice
- }
- )
- })
- this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
- }
- },
-
- // 瀵硅瘽妗嗗叧闂簨浠�
- handleClose() {
- this.dialogForm = {
- mesorderstus: 'NEW', // 宸ュ崟鐘舵�佺爜
- mesordercode: '', // 宸ュ崟缂栧彿
- ordertype: 'PO', // 宸ュ崟绫诲瀷
- sourceorderid: '', // 婧愬崟id
- sourceorder: '', // 婧愬崟鍗曞彿
-
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
-
- mesqty: '', // 宸ュ崟鏁伴噺
- wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
- wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
-
- deliverydate: '', // 浜や粯鏃堕棿
- data_sources: '' // 鏁版嵁鏉ユ簮
- }
-
- this.sourceType = false
-
- this.stepSelectedValue = []
- this.stepTableData = []
- this.$refs.dialogForm.clearValidate()
- },
- // 瀵硅瘽妗嗗彇娑�
- dialogVisibleCancel() {
- this.dialogVisible = false
- },
- // 瀵硅瘽妗嗙‘璁�
- dialogVisibleConfirm() {
- this.$refs.dialogForm.validate(valid => {
- if (valid) {
- if (this.dialogForm.ordertype === 'FO' && this.dialogForm.sourceorder.toString().trim().length <= 0) {
- return this.$message.info('婧愬崟鍗曞彿涓嶈兘涓虹┖锛�')
- }
-
- if (this.dialogForm.mesqty <= 0) {
- return this.$message.info('宸ュ崟鏁伴噺涓嶈兘绛変簬闆讹紒')
- }
-
- if (this.dialogForm.data_sources === 'ERP' && this.dialogForm.mesmaxqty < this.dialogForm.mesqty) {
- return this.$message.info('姝ゅ伐鍗曠殑鏈�澶т慨鏀规暟鍊间负锛�' + this.dialogForm.mesmaxqty)
- }
-
- const workListSub = []
- this.stepTableData.forEach((i, j) => {
- workListSub.push(
- {
- stepseq: j + 1,
- stepcode: i.stepcode,
- stepprice: i.stepprice,
- isbott: j === 0 ? 'Y' : 'N',
- isend: j === this.stepTableData.length - 1 ? 'Y' : 'N'
- }
- )
- })
-
- if (workListSub.length === 0) {
- return this.$message.info('宸ュ簭涓嶈兘涓虹┖锛�')
- }
-
- const data = {
- wostatus: this.dialogForm.mesorderstus, // 宸ュ崟鐘舵��
- wocode: this.dialogForm.mesordercode, // 宸ュ崟鍙�
- wotype: this.dialogForm.ordertype, // 宸ュ崟绫诲瀷
- sourceid: this.dialogForm.sourceorderid, // 婧愬崟id
- sourcewo: this.dialogForm.sourceorder, // 婧愬崟鍗曞彿
- partcode: this.dialogForm.partcode, // 浜у搧缂栧彿
- wkshopcode: this.dialogForm.wkshopcode,
- woqty: this.dialogForm.mesqty, // 宸ュ崟鏁伴噺
- deliverydate: this.dialogForm.deliverydate, // 浜や粯鏃堕棿
- data_sources: this.dialogForm.data_sources, // 鏁版嵁鏉ユ簮
- isstep: workListSub.length > 0 ? 'Y' : 'N', //
- difference: this.dialogForm.mesqty - this.dialogForm.mesqtyinit, // 鏁版嵁宸��
- routecode: this.dialogForm.routecode,
- workListSub
- }
-
- this.$store.state.app.buttonIsDisabled = true
- AddUpdateMesOrder(data, this.operation === 'add' ? 'Add' : 'Update').then(res => {
- if (res.code === '200') {
- this.dialogVisible = false
- // this.handlePrint()
- this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇濆瓨鎴愬姛锛�')
- this.getMesOrderSearch()
- this.$store.state.app.buttonIsDisabled = false
- } else {
- this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇濆瓨澶辫触锛�')
- }
- })
- }
- })
- },
- // 娲惧彂鎵撳嵃
- async sendPrint() {
- const data = {
- username: getCookie('admin'),
- // username: getCookie('username'),
- mesordercode: this.dialogForm.mesordercode
- }
- const res = await MesOrderPrintSearch1(data)
- // const res = await PrintOrder(data)
- if (res.code === '200') {
- // 鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
- var args = {
- type: 'print', // preview print
- showOptionDlg: false, // 濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
- report: urlAddRandomNo('./static/grf/浜у搧娴佷紶鍗旳4.grf'),
- data: res.data
- }
- webapp_ws_ajax_run(args)
- }
- },
-
- // 鑾峰彇椤甸潰楂樺害
- getHeight() {
- this.$nextTick(() => {
- this.mainHeight = window.innerHeight - 85
- // this.tableHeight = this.mainHeight - 250
- this.tableHeight = this.mainHeight - 515
- if (window.innerHeight < 769) {
- this.tableHeight = this.tableHeight - 20
- }
- this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
- this.$refs.tableDataRef.doLayout()
- })
- },
- // 宸ヨ壓璺嚎鏀惧ぇ闀滅偣鍑�
- async searchClick() {
- if (this.dialogForm.routecode === '') {
- return this.$message.info('璇峰厛閫夋嫨宸ヨ壓璺嚎锛�')
- }
- this.dialogVisibleSearch = true
- const { data: res } = await SelectRouteStep({ routecode: this.dialogForm.routecode })
- this.searchTableData = res
- },
- dialogVisibleSearchBack() {
- this.dialogVisibleSearch = false
- },
- // 澶勭悊鎵撳嵃
- handlePrint(wo_code, saleOrderCode) {
- // const number = Math.random() * Math.random()
- // this.number = number === 0 ? (10 + Math.random()) : number
- // console.log(number)
- this.formApprove.saleOrderCode = this.formApprove.saleOrderCode !== '' ? this.formApprove.saleOrderCode : saleOrderCode
- const data2 = {
- mesordercode: wo_code || this.dialogForm.mesordercode
- }
- MesOrderPrintSearch(data2).then(res2 => {
- if (res2.code === '200') {
- this.dialogVisibleApprove = true
-
- const res3 = res2.data.recordset
- // this.tableDataPrint = res3
- this.tableDataPrint = this.chunkArray(res3, 8)
-
- this.formApprove.mesordercode = res3[0].wo_code
- this.formApprove.m_po = res3[0].m_po || '/'
- this.formApprove.partcode = res3[0].partcode
- this.formApprove.partname = res3[0].partname
- this.formApprove.partspec = res3[0].partspec || '/'
- this.formApprove.plan_qty = res3[0].plan_qty
- this.formApprove.routename = localStorage.getItem('username') // 鎵撳嵃浜哄憳
- this.formApprove.lm_date = res3[0].lm_date
-
- this.$nextTick(() => {
- this.tableDataPrint.forEach((item, index) => {
- item.forEach(i => {
- this.bindQRCode(i.seq, i.stepqrcode, 'small')
- })
- this.bindQRCode(index, this.formApprove.mesordercode, 'big')
- const div = document.getElementById('qrCode' + index)
- div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
- })
-
- // const div = document.getElementById('qrCode')
- // 杩欎箞澶氫唬鐮佸彧闇�瑕佽繖涓�鍙ュ疄鐜版垜浠墍闇�瑕佺殑鍔熻兘锛屽畾浣峝iv婊氬姩鏉′綅缃湪搴曢儴锛宻crollHeight璁$畻鍑篸iv鐨勯珮搴︼紝鍐峴crollTop 璁剧疆婊氬姩鏉$殑楂樺害涓哄灏�
- // div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
- // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
- })
- }
- })
- },
- dialogVisibleTaskClose() {
- this.dialogForm.mesordercode = ''
- },
- /*
- * 鎵嬪姩鐐瑰嚮鎵撳嵃
- * */
- // 杩斿洖鎸夐挳
- dialogVisibleBackPreview() {
- this.dialogVisibleApprove = false
- },
- chunkArray(array, size) {
- const chunked = []
- let i = 0
- while (i < array.length) {
- chunked.push(array.slice(i, i + size))
- i += size
- }
- return chunked
- },
- // dialogVisibleConfirmPreview(param) {
- // this.$refs.dialogForm.validate(valid => {
- // if (valid) {
- // const data = {
- // username: getCookie('admin'),
- // mesordercode: this.dialogForm.mesordercode
- // }
- // MesOrderPrintSearch1(data).then(res => {
- // if (res.code === '200') {
- // this.dialogVisibleApprove = true
- // console.log(res, 11)
- // }
- // })
- // }
- // })
- // },
- // 鐢熸垚浜岀淮鐮� 宸ュ崟鎶ヨ〃浜岀淮鐮�
- bindQRCode(seq, text, size) {
- if (size === 'big') {
- new QRCode(this.$refs['qrCodeDiv0' + seq], {
- text: text,
- width: size === 'big' ? 90 : 60,
- height: size === 'big' ? 90 : 60,
- // colorDark: '#333333', // 浜岀淮鐮侀鑹�
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- } else {
- new QRCode(this.$refs['qrCodeDiv' + seq], {
- text: text,
- width: size === 'big' ? 90 : 60,
- height: size === 'big' ? 90 : 60,
- // colorDark: '#333333', // 浜岀淮鐮侀鑹�
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- }
- },
-
- dialogVisibleConfirmClose() {
- this.formApprove.saleOrderCode = ''
- // this.dialogForm.mesordercode = ''
- this.formApprove.mesordercode = ''
- this.formApprove.m_po = ''
- this.formApprove.partcode = ''
- this.formApprove.partname = ''
- this.formApprove.partspec = ''
- this.formApprove.plan_qty = ''
- this.formApprove.routename = ''
- this.formApprove.lm_date = ''
-
- // this.$refs.qrCodeDiv0.title = ''
-
- this.tableDataPrint = []
- },
- // 琛ユ墦鎸夐挳
- supplementClick() {
- this.dialogVisibleTask = false
- this.handlePrint()
- },
- // 琛ユ墦灏忔爣绛�
- supplementSmallClick(row) {
- // let obj = {}
- console.log(row, 21)
- // this.taskTableData.forEach((item, index) => {
- this.tableDataDetail.forEach((item, index) => {
- if (item.seq === row.seq) {
- console.log(item)
- this.qrForm = {
- // qrvalue: item.seq === this.taskTableData.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.taskTableData[item.seq].stepcode,
- qrvalue: item.seq === this.tableDataDetail.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.tableDataDetail[item.seq].stepcode,
- // startqty: item.seq === this.taskTableData.length ? item.plan_qty : this.taskTableData[item.seq].plan_qty,
- startqty: item.seq === this.tableDataDetail.length ? item.plan_qty : this.tableDataDetail[item.seq].plan_qty,
- wo_code: item.wo_code,
- partcode: item.partcode,
- partname: item.partname,
- // nextstepname: item.seq === this.taskTableData.length ? item.stepname : this.taskTableData[item.seq].stepname,
- nextstepname: item.seq === this.tableDataDetail.length ? item.stepname : this.tableDataDetail[item.seq].stepname,
- operator: getCookie('username'),
- operatorTime: handleDatetime2(new Date())
- }
- this.$nextTick(() => {
- console.log(this.qrForm.qrvalue, 3333)
- this.bindQRCode2(this.qrForm.qrvalue)
-
- const div = document.getElementById('qrCode2')
- // 杩欎箞澶氫唬鐮佸彧闇�瑕佽繖涓�鍙ュ疄鐜版垜浠墍闇�瑕佺殑鍔熻兘锛屽畾浣峝iv婊氬姩鏉′綅缃湪搴曢儴锛宻crollHeight璁$畻鍑篸iv鐨勯珮搴︼紝鍐峴crollTop 璁剧疆婊氬姩鏉$殑楂樺害涓哄灏�
- div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
- // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
- })
- }
- })
-
- // this.dialogVisibleTask = false
- this.dialogVisible2 = true
- console.log(this.qrForm, 1111)
- },
- // 琛ユ墦鐢熶骇鍏ュ簱鏉$爜
- async getProductInHouseLabCode(ordercode) {
- const res = await ProductInHouseLabCode({ ordercode })
- console.log(res)
- this.isLastPrint = true
-
- this.lastPrintArr = res.data
-
- this.dialogVisible2 = true
-
- // 鐢熶骇浜岀淮鐮�
- this.$nextTick(() => {
- this.lastPrintArr.forEach((i, index) => {
- i.checked = false
- new QRCode(this.$refs.qrCodeDiv2[index], {
- text: i.inbarcode,
- width: this.printSize !== 2 ? 60 : 55,
- height: this.printSize !== 2 ? 60 : 55,
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- })
- })
- },
- dialogVisible2Close() {
- this.qrForm.qrvalue = ''
- this.qrForm.startqty = ''
- this.qrForm.wo_code = ''
- this.qrForm.partcode = ''
- this.qrForm.partname = ''
- this.qrForm.nextstepname = ''
- this.qrForm.operator = ''
- this.qrForm.operatorTime = ''
- // this.$refs.qrCodeDiv2 = ''
- this.isLastPrint = false
- this.lastPrintArr = []
- this.lastPrintArrSelected = []
- },
- // 鐢熸垚浜岀淮鐮� 宸ュ簭鏍囩浜岀淮鐮�
- bindQRCode2(text) {
- new QRCode(this.$refs.qrCodeDiv2, {
- text: text,
- width: this.printSize !== 2 ? 60 : 55,
- height: this.printSize !== 2 ? 60 : 55,
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- },
- // 鎶ュ簾琛ュ崟鎯呭喌涓嬪彲鐐瑰嚮閫夋嫨
- mesordertsourcesearchclick() {
- if (this.dialogForm.ordertype === 'PO') {
- return this.$message.info('宸ュ崟绫诲瀷涓烘姤搴熻ˉ鍗曟儏鍐典笅鍙�夋嫨锛�')
- }
-
- this.getMesBadOrderSearch()
-
- this.dialogVisibleSource = true
- },
- async getMesBadOrderSearch() {
- // let tempDate2 = this.sourceForm.paystartdate
- // if (tempDate2.length > 0) {
- // tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
- // }
-
- let tempDate = this.sourceForm.createdate
- if (tempDate.length > 0) {
- tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
- }
-
- const data = {
- wkshopcode: this.form.wkshopcode, // 杞﹂棿缂栫爜
- mesordercode: this.sourceForm.mesordercode, // 宸ュ崟缂栧彿
- sourceorder: '', // 婧愬崟鍗曞彿
- saleordercode: '', // 閿�鍞崟鍙�
- partcode: this.sourceForm.partcode, // 浜у搧缂栫爜
- partname: this.sourceForm.partname, // 浜у搧鍚嶇О
- partspec: this.sourceForm.partspec, // 浜у搧瑙勬牸
- // paystartdate: tempDate2, // 浜や粯鏃堕棿
- // payenddate: tempDate, // 浜や粯鏃堕棿
- creatuser: this.sourceForm.creatuser, // 鍒涘缓浜哄憳
- createdate: tempDate, // 鍒涘缓鏃堕棿
-
- prop: this.sourceForm.prop, // 鎺掑簭瀛楁
- order: this.sourceForm.order, // 鎺掑簭瀛楁
- page: this.sourceForm.page, // 绗嚑椤�
- rows: this.sourceForm.rows // 姣忛〉澶氬皯鏉�
-
- }
-
- const res = await MesBadOrderSearch(data)
- this.sourceTableData = res.data
- this.sourceFormTotal = res.count
- },
- // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
- // getCurrentRowSource2(id) {
- // this.radioSelectedId = id
- // },
- // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
- getCurrentRowSource(row, event, column) {
- this.radioSelectedId = row.id
- this.dialogForm.mesqty = row.bad_qty
- },
- sourceSearch() {
- this.getMesBadOrderSearch()
- },
- sourceReset() {
- this.sourceForm.wkshopcode = ''
- this.sourceForm.mesordercode = ''
- this.sourceForm.sourceorder = ''
- this.sourceForm.partcode = ''
- this.sourceForm.partname = ''
- this.sourceForm.partspec = ''
- // this.sourceForm.paystartdate = ''
- // this.sourceForm.payenddate = ''
- this.sourceForm.creatuser = ''
- this.sourceForm.createdate = ''
- this.getMesBadOrderSearch()
- },
- dialogVisibleSourceClose() {
- this.radioSelectedId = ''
-
- this.sourceForm.wkshopcode = ''
- this.sourceForm.mesordercode = ''
- this.sourceForm.sourceorder = ''
- this.sourceForm.partcode = ''
- this.sourceForm.partname = ''
- this.sourceForm.partspec = ''
- this.sourceForm.paystartdate = ''
- this.sourceForm.payenddate = ''
- this.sourceForm.creatuser = ''
- this.sourceForm.createdate = ''
-
- this.isExpandDialog = false
- this.sourceTableData = []
- },
- dialogVisibleSourceBack() {
- this.dialogVisibleSource = false
- },
- dialogVisibleSourceConfirm() {
- console.log(this.radioSelectedId)
- this.sourceTableData.forEach(item => {
- if (item.id === this.radioSelectedId) {
- this.dialogForm.sourceorder = item.wo_code
- this.dialogForm.partcode = item.partcode
- this.dialogForm.partspec = item.partspec
- }
- })
- this.dialogVisibleSource = false
- },
- mesordertypeChange(val) {
- if (val === 'PO') {
- this.dialogForm.sourceorder = ''
- this.dialogForm.partcode = ''
- this.dialogForm.partspec = ''
- }
- },
- /* 鍏宠仈宸ヨ壓璺嚎妯″潡*/
- // 鍏宠仈宸ヨ壓璺嚎
- async routeClick(row) {
- console.log(row)
- // this.defaultroute_code = row.default_route
- this.dialogFormRoute.projectCode = row.partcode
- this.dialogFormRoute.projectName = row.partname
- this.dialogVisibleRoute = true
- const { data: res } = await InventoryFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode })
- this.dialogFormRoute.routeOperationArr = res
-
- this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
- item.isSelected1 = false
- item.isSelected2 = false
- if (index === 0) {
- item.isSelected1 = true
- this.projectTableData = item.Data
- }
- if (item.flag === 'Y') {
- item.isSelected2 = true
- this.$nextTick(() => {
- $('input:checkbox').eq(index).prop('checked', true)
- })
- }
- })
-
- this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y')
- },
- // 瀵硅瘽妗嗗叧闂�
- handleCloseRoute() {
- this.dialogFormRoute.routeOperationArr = []
- this.defaultroute_codeArr = []
- this.defaultroute_code = ''
- this.projectTableData = []
- },
- // 鍙栨秷
- routeDialogVisibleCancel() {
- this.dialogVisibleRoute = false
- },
- // 纭畾
- async routeDialogVisibleConfirm() {
- const temp = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
- if (this.defaultroute_code === '' && temp.length > 0) {
- return this.$message.info('榛樿宸ヨ壓璺嚎涓嶈兘涓虹┖锛�')
- }
-
- // 鎻愪氦鏍煎紡
- const data = []
- this.dialogFormRoute.routeOperationArr.forEach(item => {
- if (item.isSelected2) {
- data.push({ code: item.code, name: item.name })
- }
- })
-
- const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, this.defaultroute_code, data)
- if (res.code === '200') {
- this.$message.success('淇濆瓨鎴愬姛锛�')
- await this.getMesOrderSearch()
- this.dialogVisibleRoute = false
- }
- },
- // 澶х洅瀛愮偣鍑讳簨浠�
- myCheckboxClick(val) {
- console.log(val, 1)
- this.dialogFormRoute.routeOperationArr.forEach(item => {
- item.isSelected1 = val.code === item.code
- })
-
- this.projectTableData = val.Data
- },
- // 灏忕洅瀛愮偣鍑讳簨浠�
- myCheckboxInputClick(val) {
- console.log(val, 2)
- val.isSelected2 = !val.isSelected2
-
- this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
- if (val.code === item.code) {
- item.flag = !item.flag
- }
- })
- if (val.code === this.defaultroute_code) {
- this.defaultroute_code = ''
- }
- this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
- },
- // 琛岀偣鍑讳簨浠�
- async rowClick(row, event, column) {
- this.formApprove.saleOrderCode = row.saleOrderCode
- this.routeCode = row.route_code ? row.route_code : ''
- this.partCode = row.partcode ? row.partcode : ''
- const data = {
- sourceid: row.sourceid,
- sourcewo: row.m_po,
- wocode: row.wo_code,
- data_sources: row.data_sources
- }
- const { data: res } = await UpdateMesOrderStepSearch(data)
- this.tableDataDetail = res.stepdata
- },
- // 宸ュ簭鍒犻櫎
- stepDel(row) {
- console.log(row)
- const index = this.stepSelectedValue.findIndex(i => i === row.stepcode)
- this.stepSelectedValue.splice(index, 1)
- },
- // 鎵撳嵃宸ュ崟
- printOrder() {
-
- },
- // 閫夋嫨鎵撳嵃灏哄鐨勫ぇ灏忓�兼敼鍙�
- printSizeChange(val) {
- this.$nextTick(() => {
- this.bindQRCode2(this.qrForm.qrvalue)
- })
- },
- printMe2StylePadding(val) {
- if (val === 0) {
- return { paddingLeft: '10px', paddingTop: '5px' }
- }
- if (val === 5) {
- return { paddingLeft: '15px', paddingTop: '7px' }
- }
- },
-
- inbarcodeChange(val, item) {
- // 褰� lastPrintArrSelected涓湭鏈夊綋鍓嶅嬀閫夌殑鍊兼槸 璧皃ush item 鍚﹀垯璧拌繃婊ゆ帀item
- if (val) {
- this.lastPrintArrSelected.push(item)
- } else {
- this.lastPrintArrSelected = this.lastPrintArrSelected.filter(i => i.inbarcode !== item.inbarcode)
- }
-
- // 鐢熶骇浜岀淮鐮�
- this.$nextTick(() => {
- this.lastPrintArrSelected.forEach((i, index) => {
- console.log(i.inbarcode, 'i.inbarcode')
- new QRCode(this.$refs.qrCodeDiv3[index], {
- text: i.inbarcode,
- width: 60,
- height: 60,
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- })
-
- // const div = document.getElementById('qrCode3')
- // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶搴曢儴
-
- this.$forceUpdate()
- }, 500)
- },
- stepSelectedValueChange(val) {
- // console.log(val, 123)
- },
- getSummaries(param) {
- const { columns, data } = param
- const sums = []
- const i = 9
- columns.forEach((column, index) => {
- if (index === i) {
- sums[index] = '鎬绘暟'
- return
- }
- const values = data.map(item => Number(item[column.property]))
- if (column.property === 'plan_qty') {
- sums[index] = values.reduce((prev, curr) => {
- const value = Number(curr)
- if (!isNaN(value)) {
- return prev + curr
- // return Math.round(prev * 100) / 100 + Math.round(curr * 100) / 100
- }
- }, 0)
-
- sums[index] += ' 鍗�'
- }
- })
-
- this.$nextTick(() => {
- this.$refs.tableDataRef.doLayout()
- })
- return sums
- }
- }
-}
-</script>
-<style>
-.sortable-ghost {
- opacity: .8;
- color: #fff !important;
- background: #42b983 !important;
-}
-</style>
-<style lang="scss" scoped>
-$main_color: #42b983;
-
-.stepSelectedValueClass{
- ::v-deep input{
- //min-height: 34px !important;
- height: 68px !important;
- }
-}
-
-.dialogVisibleRoute {
- .myCheckboxGroup {
- display: flex;
- flex-wrap: wrap;
-
- .myCheckbox {
- //border: 1px solid $main_color;
- border: 1px solid #eee;
- display: flex;
- min-width: 100px;
- padding: 10px;
- margin: 10px 30px 0 0;
- border-radius: 5px;
- cursor: default;
-
- .myCheckboxInput {
- margin: 1px 5px 0 0;
- cursor: pointer;
- }
-
- }
-
- //.myCheckbox{
- // border: 1px solid $main_color;
- //}
-
- input[type=checkbox] {
- cursor: pointer;
- position: relative;
- width: 14px;
- height: 14px;
- font-size: 14px;
- }
-
- input[type=checkbox]::after {
- position: absolute;
- top: 0;
- //color: rgb(130, 35, 35);
- color: $main_color;
- width: 14px;
- height: 14px;
- display: inline-block;
- visibility: visible;
- padding-left: 0px;
- text-align: center;
- content: ' ';
- border-radius: 3px
- }
-
- input[type=checkbox]:checked::after {
- //content: "鉁�";
- content: "鈭�";
- color: #fff;
- font-size: 12px;
- font-weight: bold;
- background-color: $main_color;
- }
- }
-}
-
-.dialogVisibleRoute {
- ::v-deep .el-dialog__body {
- padding: 20px 20px !important;
- }
-}
-
-.defaultroute_code ::v-deep .el-input__suffix-inner {
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: -3px;
-}
-
-.el-date-editor {
- font-size: 14px;
-}
-
-::v-deep .el-dialog__body {
- padding: 20px 100px !important;
-}
-
-.sop {
- ::v-deep .el-dialog__body {
- padding: 50px 80px !important;
- }
-}
-
-.dialogVisibleSearch ::v-deep .el-dialog__body {
- padding: 20px 20px !important;
-}
-
-.dialogVisibleConfirmClass ::v-deep .el-dialog__body {
- padding: 20px 20px !important;
-}
-
-::v-deep .el-table .caret-wrapper {
- transform: scale(0.8);
-}
-
-::v-deep .el-button--text {
- color: $main_color;
- font-size: 14px;
- cursor: pointer;
-}
-
-::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
- margin: 10px 30px 0px 0;
-}
-
-.body ::v-deep .el-form-item {
- margin-bottom: 0;
-}
-
-.elForm ::v-deep .el-form-item {
- margin-bottom: 0;
-}
-
-.elTableDiv {
- ::v-deep .el-radio__label {
- display: none;
- }
-
-}
-
-.el-table::before {
- height: 0;
-}
-
-//.dialogVisibleConfirmClass >>>.el-table--border, .el-table--fit {
-// border-bottom: 2px solid #000 ;
-// //outline: #000 solid 2px !important;
-//}
-
-.tableDataPrint ::v-deep div.cell {
- display: flex !important;
- align-items: center !important;
- justify-content: center !important;
-}
-
-.formContent {
- width: 240px;
-}
-
-</style>
-
-<style media="print">
-/*@media print {*/
-@page {
- size: auto;
- margin: 3mm;
-}
-
-</style>
-<style>
-.formContent .el-form-item__label {
- color: #000 !important;
-}
-</style>
-<!--鍏叡椤甸潰鏍峰紡-->
-<style lang="scss" scoped>
-$main_color: #42b983;
-
-::v-deep .el-range-input {
- font-size: 14px !important;
-}
-
-::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-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 .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;
-}
-
-.userDialogVisible ::v-deep .el-form-item {
- margin-bottom: 0;
-}
-
-.dateMini {
- ::v-deep .el-input__inner {
- line-height: 34px;
- height: 34px;
- width: 200px;
- display: flex;
- font-size: 14px !important;
- align-items: center !important;
- }
-
- ::v-deep .el-input__prefix {
- margin-top: -3px;
- }
-
- //::v-deep .el-range__icon{
- // line-height: 28px;
- //}
-}
-
-::v-deep .el-select__caret {
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.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>
-<style>
-.sortable-ghost {
- opacity: .8;
- color: #fff !important;
- background: #42b983 !important;
-}
+<template>
+ <div>
+ <div class="body" :style="{height:mainHeight+'px'}">
+
+ <div class="bodyTopButtonGroup" style="justify-content: space-between">
+ <div style="display: flex">
+ <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
+ <el-button v-waves type="success" icon="el-icon-connection" @click="send">娲惧彂</el-button>
+ </div>
+
+ <!-- <el-button v-waves icon="el-icon-switch-button" @click="orderClose">鍏抽棴宸ュ崟</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.wkshopcode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in wkshopcodeArr"
+ :key="item.torg_code"
+ :label="item.torg_name"
+ :value="item.torg_code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">
+ <el-select
+ v-model="form.mesorderstus"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ @change="erporderstusChange"
+ >
+ <el-option
+ v-for="item in erporderstusArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
+ <el-input v-model="form.mesordercode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="婧愬崟鍗曞彿" style="display: flex;">
+ <el-input v-model="form.sourceorder" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="閿�鍞鍗�" style="display: flex;">
+ <el-input v-model="form.saleordercode" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="鍗曟嵁绫诲瀷" style=" display: flex;">
+ <el-select
+ v-model="form.ordertype"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <!-- @change="mesordertypeChange"-->
+ <el-option
+ v-for="item in ordertypeArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="浜у搧缂栫爜" style=" display: flex;">
+ <el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="浜у搧瑙勬牸" style=" display: flex;">
+ <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="鍒涘缓浜哄憳" style=" display: flex;">
+ <el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <DateType
+ ref="DateTypeRef"
+ :is-expand-form="isExpandForm"
+ style="display:flex;justify-content: center;align-items: center;position: relative"
+ :datatype-list="datatypeList"
+ @DateTypeChange="DateTypeChange"
+ @cycleTimeChange="cycleTimeChange"
+ />
+ </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+80)+'px'"
+ border
+ :summary-method="getSummaries"
+ show-summary
+ :row-class-name="tableRowClassName"
+ :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px'}"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ @sort-change="sortChange"
+ @row-click="rowClick"
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column
+ type="selection"
+ width="50"
+ :selectable="selected"
+ />
+ <el-table-column
+ prop="rowNum"
+ width="50"
+ label="搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="status"
+ label="宸ュ崟鐘舵��"
+ sortable="custom"
+ width="110"
+ show-tooltip-when-overflow
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.status==='NEW'">鏂板伐鍗�</div>
+ <!-- <div v-if="row.status==='CREATING'">鎵ц涓�</div>-->
+ <!-- <div v-if="row.status==='CREATED'">宸插叧闂�</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="宸ュ崟缂栧彿"
+ show-tooltip-when-overflow
+ sortable="custom"
+ min-width="160"
+ />
+ <el-table-column
+ prop="m_po"
+ label="婧愬崟鍗曞彿"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="160"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.m_po">{{ row.m_po }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="saleOrderCode"
+ label="閿�鍞鍗�"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="160"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.saleOrderCode">{{ row.saleOrderCode }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wotype"
+ label="鍗曟嵁绫诲瀷"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="120"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.wotype==='PO'">鏍囧噯宸ュ崟</div>
+ <div v-else-if="row.wotype==='FO'">鎶ュ簾琛ュ崟</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="partcode"
+ label="浜у搧缂栫爜"
+ show-tooltip-when-overflow
+ sortable="custom"
+ min-width="120"
+ />
+ <el-table-column
+ prop="partname"
+ min-width="150"
+ label="浜у搧鍚嶇О"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partspec"
+ label="浜у搧瑙勬牸"
+ sortable="custom"
+ width="110"
+ show-tooltip-when-overflow
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.partspec">{{ row.partspec }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ v-if="mesSetting.route"
+ prop="route_name"
+ label="宸ヨ壓璺嚎"
+ sortable="custom"
+ show-tooltip-when-overflow
+ width="120"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.route_name">{{ row.route_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ prop="plan_qty"
+ label="宸ュ崟鏁�"
+ sortable="custom"
+ show-tooltip-when-overflow
+ width="100"
+ />
+ <el-table-column
+ prop="priuserdefnvc1"
+ label="瀹㈡埛鍚嶇О"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc1 ? row.priuserdefnvc1 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc6"
+ label="瀹㈡埛缂栫爜"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc6 ? row.priuserdefnvc6 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc2"
+ label="瀵瑰唴鍚嶇О"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc2 ? row.priuserdefnvc2 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc3"
+ label="CTP鏃ユ湡"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc3 ? row.priuserdefnvc3 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc4"
+ label="閽㈠垁缂栧彿"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc4 ? row.priuserdefnvc4 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc5"
+ label="鐩掑瀷"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc5 ? row.priuserdefnvc5 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="clerkuser"
+ label="閿�鍞笟鍔″憳"
+ sortable="custom"
+ show-tooltip-when-overflow
+ width="150"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.clerkuser">{{ row.clerkuser }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wkshp_name"
+ label="鐢熶骇杞﹂棿"
+ show-tooltip-when-overflow
+ sortable="custom"
+ width="120"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="plan_startdate"
+ label="棰勮寮�宸ユ棩鏈�"
+ sortable="custom"
+ width="130"
+ >
+ <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="棰勮瀹屽伐鏃ユ湡"
+ sortable="custom"
+ width="130"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.plan_enddate">{{ row.plan_enddate.substring(0, 11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="saleOrderDeliveryDate"
+ label="棰勮浜や粯鏃ユ湡"
+ sortable="custom"
+ width="130"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.saleOrderDeliveryDate">{{ row.saleOrderDeliveryDate.substring(0, 11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column-->
+ <!-- prop="data_sources"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- label="鏁版嵁鏉ユ簮"-->
+ <!-- sortable="custom"-->
+ <!-- width="120"-->
+ <!-- />-->
+
+ <el-table-column
+ prop="lm_user"
+ show-tooltip-when-overflow
+ label="鍒涘缓浜哄憳"
+ sortable="custom"
+ width="120"
+ />
+ <el-table-column
+ prop="lm_date"
+ label="鍒涘缓鏃堕棿"
+ show-tooltip-when-overflow
+ width="160"
+ sortable="custom"
+ />
+ <el-table-column
+ label="鎿嶄綔"
+ width="160"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <div class="operationClass">
+
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="SOP棰勮" placement="top">
+ <i
+ v-if="mesSetting.workOrder"
+ class="el-icon-files"
+ style="cursor: pointer;color:#42b983;margin-right: 15px"
+ @click="pre(row,1)"
+ />
+ </el-tooltip>
+
+ <el-tooltip class="item" effect="dark" content="淇敼" placement="top">
+ <i
+ class="el-icon-edit-outline"
+ :style="{color:$store.state.settings.theme}"
+ @click="edit('edit',row)"
+ />
+ </el-tooltip>
+
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
+ <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click="del(row)" />
+ </el-tooltip>
+
+ <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
+ :style="{color:$store.state.settings.theme}"
+ class="el-icon-printer"
+ style="cursor: pointer;margin-right: 15px"
+ @click="handlePrint(row.wo_code,row.saleOrderCod,row)"
+ />
+ </el-tooltip>
+
+ <el-tooltip class="item" effect="dark" content="璇︽儏" placement="top">
+ <i
+ class="el-icon-view"
+ style="cursor: pointer;"
+ :style="{color:$store.state.settings.theme}"
+ @click="edit('view',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,jumper"
+ popper-class="select_bottom"
+ @pagination="getMesOrderSearch"
+ />
+
+ <div class="elTableDiv">
+ <el-table
+ :data="tableDataDetail"
+ border
+ height="210px"
+ :row-class-name="tableRowClassName"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ >
+ <!-- <el-table-column-->
+ <!-- width="50"-->
+ <!-- type="index"-->
+ <!-- prop="搴忓彿"-->
+ <!-- fixed-->
+ <!-- /> -->
+ <el-table-column
+ width="50"
+ prop="seq"
+ label="搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="wo_code"
+ show-tooltip-when-overflow
+ label="宸ュ崟缂栧彿"
+ width="160"
+ />
+
+ <!-- <el-table-column-->
+ <!-- prop="partcode"-->
+ <!-- label="浜у搧缂栫爜"-->
+ <!-- width="150"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- prop="partname"-->
+ <!-- label="浜у搧鍚嶇О"-->
+ <!-- width="200"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- />-->
+
+ <el-table-column
+ label="宸ュ簭缂栫爜"
+ prop="step_code"
+ show-tooltip-when-overflow
+ width="150"
+ />
+ <el-table-column
+ label="宸ュ簭鍚嶇О"
+ show-tooltip-when-overflow
+ prop="stepname"
+ width="150"
+ />
+ <el-table-column
+ label="宸ュ簭鍗曚环"
+ show-tooltip-when-overflow
+ prop="stepprice"
+ />
+ <el-table-column
+ label="宸茬敓浜ф暟閲�"
+ show-tooltip-when-overflow
+ prop="produceq_qty"
+ />
+ <el-table-column
+ label="鍚堟牸鏁伴噺"
+ show-tooltip-when-overflow
+ prop="good_qty"
+ />
+ <el-table-column
+ label="涓嶈壇鏁伴噺"
+ show-tooltip-when-overflow
+ prop="ng_qty"
+ />
+ <el-table-column
+ label="宸ュ簾鏁伴噺"
+ show-tooltip-when-overflow
+ prop="laborbad_qty"
+ />
+ <el-table-column
+ label="鏂欏簾鏁伴噺"
+ show-tooltip-when-overflow
+ prop="materielbad_qty"
+ />
+ <el-table-column
+ label="寰呬骇鏁伴噺"
+ show-tooltip-when-overflow
+ prop="delive_qty"
+ />
+ <el-table-column
+ label="鎿嶄綔"
+ width="120"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <div class="operationClass">
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="SOP棰勮" placement="top">
+ <i
+ v-if="mesSetting.tech"
+ class="el-icon-files"
+ style="cursor: pointer;color:#42b983;margin-right: 15px"
+ @click="pre(row,2)"
+ />
+ </el-tooltip>
+ <!-- <el-tooltip class="item" effect="dark" content="鎵撳嵃宸ュ簭" placement="top">-->
+ <!-- <i-->
+ <!-- v-if="tableDataDetail.length!==row.seq"-->
+ <!-- class="el-icon-printer"-->
+ <!-- :style="{color:$store.state.settings.theme}"-->
+ <!-- style="cursor: pointer;margin-right: 15px"-->
+ <!-- @click="supplementSmallClick(row)"-->
+ <!-- />-->
+ <!-- </el-tooltip>-->
+ <!-- <el-tooltip class="item" effect="dark" content="琛ユ墦鐢熶骇鍏ュ簱鏉$爜" placement="top">-->
+ <!-- <i-->
+ <!-- v-if="tableDataDetail.length===row.seq"-->
+ <!-- class=" el-icon-camera"-->
+ <!-- :style="{color:$store.state.settings.theme}"-->
+ <!-- style="cursor: pointer;margin-right: 15px"-->
+ <!-- @click="getProductInHouseLabCode(row.wo_code)"-->
+ <!-- />-->
+ <!-- </el-tooltip>-->
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+ <!--鏂板娲惧彂瀵硅瘽妗�-->
+ <el-dialog
+ v-el-drag-dialog
+ :title="operation==='add'?'鏂板':(operation==='edit'?'淇敼':'璇︽儏')"
+ :visible.sync="dialogVisible"
+ width="1200px"
+ top="8vh"
+ :close-on-click-modal="false"
+ @closed="handleClose"
+ @close="handleClose"
+ >
+ <el-form
+ ref="dialogForm"
+ inline
+ :rules="dialogFormRules"
+ :model="dialogForm"
+ label-width="110px"
+ >
+
+ <el-divider content-position="left">鍩烘湰淇℃伅</el-divider>
+
+ <el-form-item
+ label="宸ュ崟鐘舵��"
+ prop="mesorderstus"
+ >
+ <el-select
+ v-model="dialogForm.mesorderstus"
+ disabled
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in erporderstusArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="宸ュ崟缂栧彿" prop="mesordercode">
+ <!-- <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px" />-->
+ <el-input v-model="dialogForm.mesordercode" disabled style="width: 200px" />
+ </el-form-item>
+ <!-- <div style="display: flex">-->
+ <el-form-item label="宸ュ崟绫诲瀷" prop="mesorderstus">
+ <el-select
+ v-model="dialogForm.ordertype"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ :disabled="operation!=='add'"
+ placeholder="璇烽�夋嫨"
+ @change="mesordertypeChange"
+ >
+ <el-option
+ v-for="item in ordertypeArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <!-- <div style="display: flex;flex-wrap: nowrap">-->
+ <el-form-item label="婧愬崟鍗曞彿">
+ <el-input
+ v-model="dialogForm.sourceorder"
+ :disabled="dialogForm.ordertype==='PO'"
+ style="width: 200px"
+ >
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ :disabled="operation!=='add'||dialogForm.ordertype==='PO'"
+ @click="mesordertsourcesearchclick"
+ />
+ </el-input>
+ </el-form-item>
+ <!-- <el-button-->
+ <!-- v-waves-->
+ <!-- type="primary"-->
+ <!-- style="padding: 0 10px;margin-left: -8px;margin-top: 3px"-->
+ <!-- class="el-icon-search"-->
+ <!-- :disabled="operation!=='add'||dialogForm.ordertype==='PO'"-->
+ <!-- @click="mesordertsourcesearchclick"-->
+ <!-- />-->
+ <!-- </div>-->
+ <!-- </div>-->
+ <el-form-item label="宸ュ崟鏁伴噺" prop="mesqty">
+ <el-input
+ v-model="dialogForm.mesqty"
+ oninput="value=value.replace(/[^\d]/g,'')"
+ style="width: 200px"
+ />
+ <!-- oninput="value=value.replace(/[^0-9*.{1}0-9*]/g,'')"-->
+ </el-form-item>
+
+ <el-form-item label="鎵�灞炶溅闂�" prop="wkshopcode">
+ <el-select
+ v-model="dialogForm.wkshopcode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨杞﹂棿"
+ @change="getMesOrderNewStepContent"
+ >
+ <!-- @change="sourceType? getMesOrderNewStepContent():routecodeChange()"-->
+ <el-option
+ v-for="item in wkshopArr"
+ :key="item.torg_code"
+ :label="item.torg_name"
+ :value="item.torg_code"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item
+ label="浜у搧鍚嶇О/缂栫爜"
+ prop="partcode"
+ >
+ <el-select
+ v-model="dialogForm.partcode"
+ filterable
+ :disabled="operation!=='add'"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ @change="partcodeChangeDialog"
+ >
+ <el-option
+ v-for="item in partArr"
+ :key="item.partcode"
+ :label="item.partname+'/'+item.partcode"
+ :value="item.partcode"
+ />
+ </el-select>
+ </el-form-item>
+ <!-- <el-form-item v-if="operation!=='add'" label="浜у搧鍚嶇О" prop="partname">-->
+ <!-- <el-input v-model="dialogForm.partname" disabled style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item v-if="operation!=='add'" label="浜у搧缂栫爜">-->
+ <!-- <el-input v-model="dialogForm.partcode" disabled style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <el-form-item label="浜у搧瑙勬牸" prop="partspec">
+ <el-input v-model="dialogForm.partspec" disabled style="width: 200px" />
+ </el-form-item>
+ <!-- :disabled="dialogForm.partcode===''"-->
+
+ <el-form-item v-if="mesSetting.route" label="宸ヨ壓璺嚎" prop="wkshopcode">
+ <el-select
+ v-model="dialogForm.routecode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨宸ヨ壓璺嚎"
+ @change="sourceType? getMesOrderNewStepContent():routecodeChange()"
+ >
+ <el-option
+ v-for="item in routecodeArr"
+ :key="item.route_code"
+ :label="item.route_name"
+ :value="item.route_code"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="棰勮浜や粯鏃ユ湡" prop="deliverydate">
+ <el-date-picker
+ v-model="dialogForm.deliverydate"
+ type="date"
+ size="mini"
+ :clearable="false"
+ class="dateMini"
+ :picker-options="pickerOptions"
+ format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ />
+ <!-- :disabled="dialogForm.deliverydate"-->
+ </el-form-item>
+ <el-form-item label="宸ュ簭鏉ユ簮" required>
+ <el-switch
+ v-model="sourceType"
+ style="width: 200px;"
+ inactive-text="鍩虹璁剧疆"
+ active-text="鍘嗗彶鏈�鏂�"
+ :disabled="!dialogForm.wkshopcode"
+ @change="sourceTypeChange"
+ />
+ </el-form-item>
+
+ <el-divider content-position="left">宸ュ簭淇℃伅</el-divider>
+
+ <div style="display: flex;align-items: center">
+ <div style="font-weight: bolder">宸ュ簭閫夋嫨锛�</div>
+
+ <el-select
+ v-model="stepSelectedValue"
+ class="stepSelectedValueClass"
+ style="width: 930px;"
+ multiple
+ placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"
+ @change="stepSelectedValueChange"
+ >
+ <el-option
+ v-for="item in stepSelectArr"
+ :key="item.stepcode"
+ :label="item.stepname"
+ :value="item.stepcode"
+ />
+ </el-select>
+
+ <!-- <el-drag-select-->
+ <!-- v-model="stepSelectedValue"-->
+ <!-- style="width:930px;"-->
+ <!-- multiple-->
+ <!-- placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"-->
+ <!-- @change="stepSelectedValueChange"-->
+ <!-- >-->
+ <!-- <el-option-->
+ <!-- v-for="item in stepSelectArr"-->
+ <!-- :key="item.stepcode"-->
+ <!-- :label="item.stepname"-->
+ <!-- :value="item.stepcode"-->
+ <!-- />-->
+ <!-- </el-drag-select>-->
+ </div>
+
+ <el-table
+ ref="stepTableDataRef"
+ :data="stepTableData"
+ border
+ :row-class-name="tableRowClassName"
+ height="300"
+ style="width: 100%;margin-top: 15px;"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ row-key="stepcode"
+ >
+ <el-table-column
+ type="index"
+ label="搴忓彿"
+ width="50"
+ />
+ <el-table-column
+ prop="stepcode"
+ show-tooltip-when-overflow
+ label="宸ュ簭缂栫爜"
+ />
+ <el-table-column
+ prop="stepname"
+ label="宸ュ簭鍚嶇О"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="stepprice"
+ label="鐢熶骇鍗曚环"
+ show-tooltip-when-overflow
+ >
+ <template slot-scope="{row}">
+ <el-input
+ v-model="row.stepprice"
+ placeholder="璇疯緭鍏ュ伐搴忓崟浠�"
+ oninput="value=value.replace(/[^0-9.]/g,'')"
+ style="width: 100%"
+ @click=""
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎿嶄綔"
+ width="120"
+ >
+ <template slot-scope="{row}">
+ <div class="operationClass">
+ <!-- <el-tooltip class="item" effect="dark" content="绉诲姩" placement="top">-->
+ <i
+ class="el-icon-rank"
+ :style="{color:$store.state.settings.theme}"
+ style="cursor: move"
+ />
+ <!-- </el-tooltip>-->
+ <!-- @click="edit('edit',row)"-->
+
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
+ <i
+ class="el-icon-delete"
+ :style="{color:$store.state.settings.theme}"
+ style="margin-left: 15px;"
+ @click="stepDel(row)"
+ />
+ </el-tooltip>
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ </el-form>
+
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
+ <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">棰勮</el-button>-->
+ <el-button
+ v-if="operation!=='view'&&(dialogForm.mesorderstus==='NEW'||dialogForm.mesorderstus==='ALLO')"
+ v-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="dialogVisibleConfirm"
+ >纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!-- 宸ュ簭浠诲姟瀵硅瘽妗�-->
+ <el-dialog
+ v-el-drag-dialog
+ title="宸ュ簭浠诲姟"
+ :visible.sync="dialogVisibleTask"
+ width="840px"
+ top="15vh"
+ class="dialogVisibleSearch"
+ :close-on-click-modal="false"
+ @close="dialogVisibleTaskClose"
+ >
+ <el-button
+ v-waves
+ style="margin-bottom: 15px"
+ type="primary"
+ @click="supplementClick"
+ >琛ユ墦
+ </el-button>
+ <el-table
+ :data="taskTableData"
+ border
+ :row-class-name="tableRowClassName"
+ height="300"
+ style="width: 100%;"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ >
+ <el-table-column
+ prop="seq"
+ width="50"
+ label="搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="wo_code"
+ show-tooltip-when-overflow
+ label="宸ュ崟缂栧彿"
+ width="200"
+ />
+ <el-table-column
+ prop="stepcode"
+ label="宸ュ簭缂栫爜"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="stepname"
+ show-tooltip-when-overflow
+ label="宸ュ簭鍚嶇О"
+ />
+ <!-- <el-table-column-->
+ <!-- prop="flwtype"-->
+ <!-- label="宸ュ簭绫诲瀷"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.flwtype==='W'">澶栧崗</div>-->
+ <!-- <div v-if="row.flwtype==='Z'">鑷埗</div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <!-- <el-table-column-->
+ <!-- prop="descr"-->
+ <!-- label="宸ュ簭鎻忚堪"-->
+ <!-- />-->
+ <el-table-column
+ prop="plan_qty"
+ show-tooltip-when-overflow
+ label="浠诲姟鏁伴噺"
+ />
+ <el-table-column
+ prop="good_qty"
+ show-tooltip-when-overflow
+ label="鍚堟牸鏁伴噺"
+ />
+ <el-table-column
+ prop="ng_qty"
+ show-tooltip-when-overflow
+ label="涓嶈壇鏁伴噺"
+ />
+ <el-table-column
+ label="鎿嶄綔"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <el-button v-waves type="text" style="padding: 0;" @click="supplementSmallClick(row)">琛ユ墦</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleBack">杩� 鍥�</el-button>
+ <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
+ </div>
+ </span>
+ </el-dialog>
+
+ <!-- 婧愬崟鍗曞彿瀵硅瘽妗�-->
+ <el-dialog
+ v-el-drag-dialog
+ title="婧愬崟鍗曞彿"
+ :visible.sync="dialogVisibleSource"
+ width="1200px"
+ top="10vh"
+ class="dialogVisibleSearch"
+ :close-on-click-modal="false"
+ @close="dialogVisibleSourceClose"
+ >
+ <div class="bodyTopFormGroup">
+ <el-form
+ ref="sourceForm"
+ :model="sourceForm"
+ label-width="100px"
+ inline
+ style="display: flex;justify-content: space-between"
+ >
+ <div class="elForm" style="justify-content: flex-start">
+ <!-- <el-form-item-->
+ <!-- label="棰勮寮�宸ユ椂闂�"-->
+ <!-- label-width="100px"-->
+ <!-- style=" display: flex;font-size: 14px;margin-top: 3px"-->
+ <!-- >-->
+ <!-- <el-date-picker-->
+ <!-- v-model="sourceForm.paystartdate"-->
+ <!-- type="daterange"-->
+ <!-- range-separator="~"-->
+ <!-- class="timeMini"-->
+ <!-- size="mini"-->
+ <!-- style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"-->
+ <!-- :clearable="false"-->
+ <!-- start-placeholder="寮�濮嬫棩鏈�"-->
+ <!-- end-placeholder="缁撴潫鏃ユ湡"-->
+ <!-- />-->
+ <!-- <!– :picker-options="expireTimeOption"–>-->
+
+ <!-- </el-form-item>-->
+ <!-- <el-form-item-->
+ <!-- label="棰勮瀹屽伐鏃堕棿"-->
+ <!-- label-width="100px"-->
+ <!-- style=" display: flex;font-size: 14px;margin-top: 3px"-->
+ <!-- >-->
+ <!-- <el-date-picker-->
+ <!-- v-model="sourceForm.payenddate"-->
+ <!-- type="daterange"-->
+ <!-- :clearable="false"-->
+ <!-- class="timeMini"-->
+ <!-- range-separator="~"-->
+ <!-- start-placeholder="寮�濮嬫棩鏈�"-->
+ <!-- style="width: 200px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;"-->
+ <!-- end-placeholder="缁撴潫鏃ユ湡"-->
+ <!-- size="mini"-->
+ <!-- />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">-->
+ <!-- <el-select-->
+ <!-- v-model="sourceForm.mesordercode"-->
+ <!-- filterable-->
+ <!-- :popper-append-to-body="false"-->
+ <!-- style="width: 200px"-->
+ <!-- placeholder="璇烽�夋嫨"-->
+ <!-- >-->
+ <!-- <el-option-->
+ <!-- v-for="item in erporderstusArr"-->
+ <!-- :key="item.code"-->
+ <!-- :label="item.name"-->
+ <!-- :value="item.code"-->
+ <!-- />-->
+ <!-- </el-select>-->
+ <!-- </el-form-item>-->
+ <el-form-item label="杞﹂棿鍚嶇О" style=" display: flex;">
+ <el-select
+ v-model="sourceForm.wkshopcode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in wkshopcodeArr"
+ :key="item.torg_code"
+ :label="item.torg_name"
+ :value="item.torg_code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
+ <el-input v-model="sourceForm.mesordercode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
+ <el-input v-model="sourceForm.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+
+ <el-form-item v-show="isExpandDialog" label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-input v-model="sourceForm.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <!-- <el-form-item v-show="isExpandDialog" label="浜у搧瑙勬牸" style=" display: flex;">-->
+ <!-- <el-input v-model="sourceForm.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />-->
+ <!-- </el-form-item>-->
+ <el-form-item v-show="isExpandDialog" label="鍒涘缓浜哄憳" style=" display: flex;">
+ <el-input v-model="sourceForm.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+
+ <el-form-item
+ v-show="isExpandDialog"
+ label="鍒涘缓鏃堕棿"
+ label-width="100px"
+ style=" display: flex;font-size: 14px;margin-top: 3px"
+ >
+ <el-date-picker
+ v-model="sourceForm.createdate"
+ type="daterange"
+ range-separator="~"
+ class="timeMini"
+ size="mini"
+ style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"
+ :clearable="false"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ />
+ <!-- :picker-options="expireTimeOption"-->
+
+ </el-form-item>
+
+ </div>
+
+ <div style="display: flex;align-items: start;margin-top: 3px;z-index: 2;justify-content: end">
+ <el-button v-waves type="primary" icon="el-icon-search" @click="sourceSearch">鏌ヨ</el-button>
+ <el-button v-waves type="info" icon="el-icon-refresh" @click="sourceReset">閲嶇疆</el-button>
+ </div>
+
+ </el-form>
+ <div
+ class="bodyTopFormExpand"
+ >
+ <svg-icon
+ v-show="mouseHoverTypeDialog==='mouseout'"
+ style="cursor: pointer"
+ :icon-class="!isExpandDialog?'doubleDown3':'doubleUp3'"
+ @mouseenter="mouseHoverTypeDialog=$event.type"
+ />
+ <svg-icon
+ v-show="mouseHoverTypeDialog==='mouseenter'"
+ style="cursor: pointer"
+ :icon-class="!isExpandDialog?'doubleDown':'doubleUp'"
+ @click="isExpandDialog=!isExpandDialog"
+ @mouseout="mouseHoverTypeDialog=$event.type"
+ />
+ </div>
+ </div>
+
+ <div class="elTableDiv">
+ <el-table
+ :data="sourceTableData"
+ :height="isExpandDialog?(tableHeight+100)+'px':(tableHeight+140)+'px'"
+ border
+ :row-class-name="tableRowClassName"
+ :style="{width: 100+'%',height:isExpandDialog?(tableHeight+100)+'px':(tableHeight+140)+'px',}"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ @sort-change="sourceSortChange"
+ @row-click="getCurrentRowSource"
+ >
+ <!-- <el-table-column-->
+ <!-- type="selection"-->
+ <!-- width="50"-->
+ <!-- />-->
+ <el-table-column
+ width="50"
+ fixed
+ >
+ <template slot-scope="{row}">
+ <el-radio
+ v-model="radioSelectedId"
+ :label="row.id"
+ style="color: transparent;padding-left: 10px;"
+ />
+ <!-- @change.native="getCurrentRowSource(row.id)"-->
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="rowNum"
+ width="50"
+ fixed
+ label="搴忓彿"
+ />
+ <!-- <el-table-column-->
+ <!-- prop="status"-->
+ <!-- label="宸ュ崟鐘舵��"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- sortable="custom"-->
+ <!-- width="110"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.status==='NEW'">鏂拌鍗�</div>-->
+ <!-- <div v-if="row.status==='CREATING'">閮ㄥ垎涓嬭揪</div>-->
+ <!-- <div v-if="row.status==='CREATED'">鍏ㄩ儴涓嬭揪</div>-->
+ <!-- <div v-if="row.status==='CLOSED'">宸插叧闂�</div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <el-table-column
+ label="宸ュ崟缂栧彿"
+ prop="wo_code"
+ show-tooltip-when-overflow
+ min-width="150"
+ sortable="custom"
+ >
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.m_po">{{ row.m_po }}</div>-->
+ <!-- <div v-else>{{ row.wo_code }}</div>-->
+ <!-- </template>-->
+ </el-table-column>
+ <el-table-column
+ prop="partcode"
+ label="浜у搧缂栫爜"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="150"
+ />
+ <el-table-column
+ prop="partname"
+ label="浜у搧鍚嶇О"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="150"
+ />
+ <el-table-column
+ prop="partspec"
+ label="浜у搧瑙勬牸"
+ show-tooltip-when-overflow
+ sortable="custom"
+ min-width="110"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.partspec">{{ row.partspec }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="plan_qty"
+ label="浠诲姟鏁伴噺"
+ width="150"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+
+ <el-table-column
+ prop="laborbad_qty"
+ label="宸ュ簾鏁伴噺"
+ width="150"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+ <el-table-column
+ prop="materielbad_qty"
+ label="鏂欏簾鏁伴噺"
+ width="150"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+
+ <!-- <el-table-column-->
+ <!-- prop="relse_qty"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- label="宸蹭笅鍗曟暟閲�"-->
+ <!-- width="150"-->
+ <!-- sortable="custom"-->
+ <!-- />-->
+ <el-table-column
+ prop="wkshp_name"
+ label="鐢熶骇杞﹂棿"
+ show-tooltip-when-overflow
+ sortable="custom"
+ width="150"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column-->
+ <!-- prop="plan_startdate"-->
+ <!-- label="棰勮寮�宸ユ椂闂�"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- sortable="custom"-->
+ <!-- width="130"-->
+ <!-- >-->
+ <!-- <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-->
+ <!-- sortable="custom"-->
+ <!-- width="130"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.plan_enddate">{{ row.plan_enddate.substring(0, 11) }}</div>-->
+ <!-- <div v-else>/</div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <el-table-column
+ prop="lm_user"
+ label="鍒涘缓浜哄憳"
+ show-tooltip-when-overflow
+ sortable="custom"
+ width="150"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.lm_user">{{ row.lm_user }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="lm_date"
+ label="鍒涘缓鏃堕棿"
+ show-tooltip-when-overflow
+ width="130"
+ 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-->
+ <!-- label="鎿嶄綔"-->
+ <!-- fixed="right"-->
+ <!-- width="80"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div class="operationClass">-->
+ <!-- <el-tooltip class="item" effect="dark" content="涓嬭揪" placement="top">-->
+ <!-- <!– <el-button v-waves type="text" @click="edit('edit',row)">涓嬭揪</el-button>–>-->
+ <!-- <i-->
+ <!-- class="el-icon-bottom"-->
+ <!-- style="color:#42b983;cursor: pointer;margin-left: 5px"-->
+ <!-- @click="edit('edit',row)"-->
+ <!-- />-->
+ <!-- </el-tooltip>-->
+ <!-- </div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ </el-table>
+ </div>
+ <!--鍒嗛〉-->
+ <pagination
+ :total="sourceFormTotal"
+ :page.sync="sourceForm.page"
+ :limit.sync="sourceForm.rows"
+ align="right"
+ layout="total,prev, pager, next,sizes"
+ popper-class="select_bottom"
+ @pagination="getMesBadOrderSearch"
+ />
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleSourceBack">杩� 鍥�</el-button>
+ <el-button v-waves type="primary" @click="dialogVisibleSourceConfirm">纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!--鎵撳嵃棰勮瀵硅瘽妗� 澶ф爣绛�-->
+ <el-dialog
+ v-el-drag-dialog
+ title=""
+ top="7vh"
+ :visible.sync="dialogVisibleApprove"
+ width="812px"
+ class="dialogVisibleConfirmClass"
+ append-to-body
+ :close-on-click-modal="false"
+ @close="dialogVisibleConfirmClose"
+ >
+ <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
+ <div id="printMe" style="padding: 30px">
+ <!-- <div v-for="(item,index) in tableDataPrint" :key="index">-->
+ <div>
+ <div style="font-size: 26px; text-align: center">娴佺▼鍗�</div>
+
+ <div style="display: flex;justify-content: space-around;margin-top: 20px; position: relative;">
+ <div style="width: 78%">
+ <el-form
+ ref="formApprove"
+ :model="formApprove"
+ label-width="80px"
+ inline
+ style="display: flex;justify-content: space-between"
+ >
+ <div class="elForm">
+ <el-form-item label="閿�鍞崟鍙�:" class="formContent">
+ {{ formApprove.saleOrderCode ? formApprove.saleOrderCode : '/' }}
+ </el-form-item>
+ <el-form-item label="宸ュ崟缂栧彿:" class="formContent">
+ {{ formApprove.mesordercode }}
+ </el-form-item>
+ <el-form-item label="婧愬崟鍗曞彿:" class="formContent">
+ {{ formApprove.m_po }}
+ </el-form-item>
+ <el-form-item label="浜у搧缂栫爜:" class="formContent">
+ {{ formApprove.partcode }}
+ </el-form-item>
+ <el-form-item label="浜у搧鍚嶇О:" class="formContent">
+ {{ formApprove.partname }}
+ </el-form-item>
+ <el-form-item label="浜у搧瑙勬牸:" class="formContent">
+ {{ formApprove.partspec }}
+ </el-form-item>
+ <el-form-item label="宸ュ崟鏁伴噺:" class="formContent">
+ {{ formApprove.plan_qty }}
+ </el-form-item>
+
+ <el-form-item label="瀹㈡埛鍚嶇О:" class="formContent">
+ {{ formApprove.priuserdefnvc1 }}
+ </el-form-item>
+ <el-form-item label="瀹㈡埛缂栫爜:" class="formContent">
+ {{ formApprove.priuserdefnvc6 }}
+ </el-form-item>
+ <el-form-item label="瀵瑰唴鍚嶇О:" class="formContent">
+ {{ formApprove.priuserdefnvc2 }}
+ </el-form-item>
+ <el-form-item label="CTP鏃ユ湡:" class="formContent">
+ {{ formApprove.priuserdefnvc3 }}
+ </el-form-item>
+ <el-form-item label="閽㈠垁缂栧彿:" class="formContent">
+ {{ formApprove.priuserdefnvc4 }}
+ </el-form-item>
+ <el-form-item label="鐩掑瀷:" class="formContent">
+ {{ formApprove.priuserdefnvc5 }}
+ </el-form-item>
+
+ <!-- <el-form-item label="宸ヨ壓璺嚎:" class="formContent">-->
+ <!-- {{ formApprove.routename }}-->
+ <!-- </el-form-item>-->
+ <el-form-item label="鎵撳嵃浜哄憳:" class="formContent">
+ <!-- {{ localStorage.getItem('username') }}-->
+ {{ formApprove.routename }}
+ </el-form-item>
+ <el-form-item label="鎵撳嵃鏃堕棿:" class="formContent">
+ {{ formApprove.lm_date }}
+ </el-form-item>
+ </div>
+ </el-form>
+ </div>
+ <div
+ id="qrCode0"
+ style="width: 22%;height:90px;
+ margin-top: 20px;
+ overflow-y: scroll;display: flex;
+ justify-content: center;
+ position: relative;"
+ >
+ <div id="qrCode00" ref="qrCodeDiv00" />
+ </div>
+ <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />
+ <div
+ style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"
+ />
+ </div>
+
+ <el-table
+ id="table"
+ :data="tableDataPrint[0]"
+ border
+ class="tableDataPrint"
+ :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000'}"
+ :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000'}"
+ style="width: 100%;margin-top: 20px;text-align: center;border-color: #000"
+ >
+ <el-table-column
+ id="column0"
+ prop="seq"
+ label="宸ュ簭鍙�"
+ width="70"
+ align="center"
+ />
+ <el-table-column
+ id="column1"
+ prop="stepqrcode"
+ label="宸ュ簭浜岀淮鐮�"
+ width="100"
+ align="center"
+ >
+ <template slot-scope="{row}">
+
+ <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />
+ </template>
+ </el-table-column>
+ <el-table-column
+ id="column2"
+ prop="stepname"
+ label="宸ュ簭"
+ width="120"
+ align="center"
+ />
+ <el-table-column
+ id="column3"
+ prop="plan_qty"
+ label="鍔犲伐鏁伴噺"
+ width="100"
+ align="center"
+ />
+ <el-table-column
+ id="column4"
+ prop="good_qty"
+ width="100"
+ align="center"
+ label="鍚堟牸鏁伴噺"
+ />
+ <el-table-column
+ id="column5"
+ width="100"
+ prop="ng_qty"
+ align="center"
+ label="涓嶈壇鏁伴噺"
+ />
+ <el-table-column
+ id="column6"
+ prop="desc"
+ align="center"
+ width="120"
+ label="澶囨敞"
+ />
+ </el-table>
+ </div>
+
+ <div v-if="tableDataPrint[1]" style="margin-top: 100px;">
+ <div style="font-size: 26px; text-align: center">娴佺▼鍗�</div>
+
+ <div style="display: flex;justify-content: space-around;margin-top: 20px; position: relative;">
+ <div style="width: 78%">
+ <el-form
+ ref="formApprove"
+ :model="formApprove"
+ label-width="80px"
+ inline
+ style="display: flex;justify-content: space-between"
+ >
+ <div class="elForm">
+ <el-form-item label="閿�鍞崟鍙�:" class="formContent">
+ {{ formApprove.saleOrderCode ? formApprove.saleOrderCode : '/' }}
+ </el-form-item>
+ <el-form-item label="宸ュ崟缂栧彿:" class="formContent">
+ {{ formApprove.mesordercode }}
+ </el-form-item>
+ <el-form-item label="婧愬崟鍗曞彿:" class="formContent">
+ {{ formApprove.m_po }}
+ </el-form-item>
+ <el-form-item label="浜у搧缂栫爜:" class="formContent">
+ {{ formApprove.partcode }}
+ </el-form-item>
+ <el-form-item label="浜у搧鍚嶇О:" class="formContent">
+ {{ formApprove.partname }}
+ </el-form-item>
+ <el-form-item label="浜у搧瑙勬牸:" class="formContent">
+ {{ formApprove.partspec }}
+ </el-form-item>
+ <el-form-item label="宸ュ崟鏁伴噺:" class="formContent">
+ {{ formApprove.plan_qty }}
+ </el-form-item>
+ <!-- <el-form-item label="宸ヨ壓璺嚎:" class="formContent">-->
+ <!-- {{ formApprove.routename }}-->
+ <!-- </el-form-item>-->
+ <el-form-item label="鎵撳嵃浜哄憳:" class="formContent">
+ <!-- {{ localStorage.getItem('username') }}-->
+ {{ formApprove.routename }}
+ </el-form-item>
+ <el-form-item label="鎵撳嵃鏃堕棿:" class="formContent">
+ {{ formApprove.lm_date }}
+ </el-form-item>
+ </div>
+ </el-form>
+ </div>
+ <div
+ id="qrCode1"
+ style="width: 22%;height:90px;
+ margin-top: 20px;
+ overflow-y: scroll;display: flex;
+ justify-content: center;
+ position: relative;"
+ >
+ <div id="qrCode01" ref="qrCodeDiv01" />
+ </div>
+ <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />
+ <div
+ style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"
+ />
+ </div>
+
+ <el-table
+ id="table"
+ :data="tableDataPrint[1]"
+ border
+ class="tableDataPrint"
+ :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000'}"
+ :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000'}"
+ style="width: 100%;margin-top: 20px;text-align: center;border-color: #000"
+ >
+ <el-table-column
+ id="column0"
+ prop="seq"
+ label="宸ュ簭鍙�"
+ width="70"
+ align="center"
+ />
+ <el-table-column
+ id="column1"
+ prop="stepqrcode"
+ label="宸ュ簭浜岀淮鐮�"
+ width="100"
+ align="center"
+ >
+ <template slot-scope="{row}">
+
+ <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />
+ </template>
+ </el-table-column>
+ <el-table-column
+ id="column2"
+ prop="stepname"
+ label="宸ュ簭"
+ width="120"
+ align="center"
+ />
+ <el-table-column
+ id="column3"
+ prop="plan_qty"
+ label="鍔犲伐鏁伴噺"
+ width="100"
+ align="center"
+ />
+ <el-table-column
+ id="column4"
+ prop="good_qty"
+ width="100"
+ align="center"
+ label="鍚堟牸鏁伴噺"
+ />
+ <el-table-column
+ id="column5"
+ width="100"
+ prop="ng_qty"
+ align="center"
+ label="涓嶈壇鏁伴噺"
+ />
+ <el-table-column
+ id="column6"
+ prop="desc"
+ align="center"
+ width="120"
+ label="澶囨敞"
+ />
+ </el-table>
+ </div>
+
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleBackPreview">杩� 鍥�</el-button>
+ <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
+ <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�/鎵� 鍗�</el-button>-->
+ <el-button v-waves v-print="printObj" type="primary">鎵� 鍗�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!--鎵撳嵃棰勮椤甸潰 灏忔爣绛�-->
+ <el-dialog
+ v-el-drag-dialog
+ title="棰勮"
+ :visible.sync="dialogVisible2"
+ width="1000"
+ top="10vh"
+ :close-on-click-modal="false"
+ @close="dialogVisible2Close"
+ >
+ <div style="height: 650px;overflow:auto;">
+ <!-- 涓嬫媺妗嗛�夋嫨鎵撳嵃灏哄-->
+ <div v-if="!isLastPrint" style="display: flex;align-items: center;margin: 0 0 20px 0">
+ <div>閫夋嫨鎵撳嵃灏哄锛�</div>
+ <el-select
+ v-model="printSize"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ @change="printSizeChange"
+ >
+
+ <el-option
+ v-for="item in printSizeSelectArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </div>
+ <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
+ <!-- <div id="printMe2" :style="{paddingLeft:'10px',paddingTop: '5px'}">-->
+ <div v-if="!isLastPrint" :style="printMe2StylePadding(printSize)">
+ <!-- 80 * 50-->
+ <div
+ v-if="printSize===0"
+ style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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;">涓嬮亾宸ュ簭:</div>
+ <div>{{ qrForm.nextstepname }}</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>
+ <!-- 78 * 60 -->
+ <div
+ v-if="printSize===1"
+ style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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;">涓嬮亾宸ュ簭:</div>
+ <div>{{ qrForm.nextstepname }}</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>
+ <!-- 60 * 40 -->
+ <div
+ v-if="printSize===2"
+ style="display: flex;width: 220px;height: 130px;border: 1px solid #000;text-align: center;font-size: 12px"
+ >
+
+ <div style="width: 70px;display: flex;flex-direction: column;border-right: 1px solid #000">
+ <div
+ style="display: flex;height: 60%;border-bottom:1px solid #000;
+ justify-content: center;align-items: center;position: relative"
+ >
+ <div
+ id="qrCode2"
+ ref="qrCodeDiv2"
+ style="overflow-y: hidden;height:71%;position: absolute;left: 7px;"
+ />
+ </div>
+ <div
+ style="display: flex;height: 20%;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+ >
+ <div style="margin-left: 3px; ">鏁伴噺:{{ qrForm.startqty }}</div>
+ </div>
+ <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;">
+ <div style="margin-left: 3px; ">鎿嶄綔:{{ qrForm.operator }}</div>
+
+ </div>
+ </div>
+
+ <div style="width:150px;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="margin-left: 3px;">缂栧彿:{{ 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="margin-left: 3px;">浜у搧缂栫爜:{{ 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="margin-left: 3px;">浜у搧鍚嶇О:{{ 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="margin-left: 3px;">涓嬮亾宸ュ簭:{{ qrForm.nextstepname }}</div>
+
+ </div>
+ <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
+ <div style=" margin-left: 3px;">鏃堕棿: {{ qrForm.operatorTime }}</div>
+ <!-- <div>{{ qrForm.operatorTime?qrForm.operatorTime.substring(5):'' }}</div>-->
+ <!-- <div>{{ qrForm.operatorTime }}</div>-->
+ </div>
+
+ </div>
+
+ </div>
+ <div
+ v-if="printSize===5"
+ style="display: flex;width: 140px;height: 80px;border: 1px solid #000;text-align: center;font-size: 10px;"
+ >
+
+ <div v-if="false" style="width: 45px;display: flex;flex-direction: column;border-right: 1px solid #000">
+ <div
+ style="display: flex;height: 60px;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: 20px;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: 20px;justify-content: flex-start;align-items: center">
+ <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
+ {{ qrForm.operator }}
+ </div>
+ </div>
+
+ <div style="width:100%;display: flex;flex-direction: column;">
+ <div
+ style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: center;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: center;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: center;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: center;align-items: center;text-align: left"
+ >
+ <!-- <div style="width:60px;margin-left: 5px;">涓嬮亾宸ュ簭:</div>-->
+ <div>{{ qrForm.nextstepname }}</div>
+ </div>
+ <div style="display: flex;height: 20%;justify-content: center;align-items: center;text-align: left">
+ <!-- <div style="width: 60px;margin-left: 5px;">澶勭悊鏃堕棿:</div>-->
+ <div>{{ qrForm.operatorTime }}</div>
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+
+ <div v-if="isLastPrint" style="display: flex;flex-direction: column">
+
+ <div style="display: flex;font-weight: bold;font-size: 16px;margin-bottom: 20px;">
+ <div style="width: 48%;">
+ 璇烽�夋嫨鍏ュ簱鏉$爜
+ </div>
+ <div style="width: 48%;margin-left: 4%;">
+ 宸查�変腑鐨勫叆搴撴潯鐮�
+ </div>
+ </div>
+
+ <div style="display: flex;">
+ <!-- 璇烽�夋嫨鍏ュ簱鏉$爜-->
+ <div style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;">
+ <div
+ v-for="(item,index) in lastPrintArr"
+ :key="item.inbarcode"
+ :style="{marginTop:index===0?'':'15px'}"
+ style="display: flex;align-items: center;"
+ >
+
+ <!-- v-if="printSize===0"-->
+ <div style="margin-right:40px">
+ <el-checkbox
+ :key="item.inbarcode"
+ v-model="item.checked"
+ @change="val=>inbarcodeChange(val,item)"
+ />
+ </div>
+ <div
+ style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+ >
+ <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
+ {{ item.good_qty }}
+ </div>
+ <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
+ <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
+ {{ item.username }}
+ </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>{{ item.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>{{ item.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>{{ item.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;">浜у搧瑙勬牸:</div>
+ <div>{{ item.partspec ? item.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>{{ item.lm_date }}</div>
+ </div>
+
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+
+ <!-- 宸查�変腑鐨勫叆搴撴潯鐮�-->
+ <div
+ style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;margin-left: 50px;"
+ >
+ <div id="printMe2">
+ <div
+ v-for="(item,index) in lastPrintArrSelected"
+ v-if="item.checked"
+ :key="item.inbarcode"
+ :style="{marginTop:index===0?'':'15px'}"
+ style="display: flex;align-items: center;"
+ >
+ <div
+ style="display: flex;width: 280px;height: 160px;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: 96px;border-bottom:1px solid #000;
+ justify-content: center;align-items: center;position: relative"
+ >
+ <div
+ id="qrCode3"
+ ref="qrCodeDiv3"
+ style="overflow-y: hidden;height:60px;position: absolute;left: 14px;"
+ />
+ </div>
+ <div
+ style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+ >
+ <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
+ {{ item.good_qty }}
+ </div>
+ <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
+ <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
+ {{ item.username }}
+ </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>{{ item.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>{{ item.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>{{ item.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;">浜у搧瑙勬牸:</div>
+ <div>{{ item.partspec ? item.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>{{ item.lm_date }}</div>
+ </div>
+
+ </div>
+
+ </div>
+
+ </div>
+ </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
+ :close-on-click-modal="false"
+ title="鍏宠仈宸ヨ壓璺嚎"
+ :visible.sync="dialogVisibleRoute"
+ width="800px"
+ top="10vh"
+ :fullscreen="isIpad"
+ class="dialogVisibleRoute"
+ @closed="handleCloseRoute"
+ @close="handleCloseRoute"
+ >
+ <div>
+ <i class="el-icon-s-comment" style="color:#42b983;" /> 浜у搧鍚嶇О锛歿{ dialogFormRoute.projectName }}
+ </div>
+ <el-divider />
+ <div style="margin-bottom: 10px">
+ <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ヨ壓璺嚎闆嗗悎
+ </div>
+
+ <div class="myCheckboxGroup">
+ <div
+ v-for="item in dialogFormRoute.routeOperationArr"
+ :key="item.code"
+ :style="{border:item.isSelected1?'1px solid #42b983':'1px solid #eee'}"
+ class="myCheckbox"
+ @click="myCheckboxClick(item)"
+ >
+ <input
+ class="myCheckboxInput"
+ type="checkbox"
+ :value="item.code"
+ :name="item.name"
+ :style="{color:item.isSelected2?'#42b983':'#fff'}"
+ @click="myCheckboxInputClick(item)"
+ >{{ item.name }}
+ <!-- 鐖跺瓙鐐瑰嚮浜嬩欢涓嶅奖鍝�-->
+ <!-- onClick="event.cancelBubble = true"-->
+ </div>
+ </div>
+
+ <el-divider />
+ <div>
+ <i class="el-icon-s-operation" style="color:#42b983;" /> 榛樿宸ヨ壓璺嚎
+ </div>
+ <div style="margin-top: 20px">
+ <el-select
+ v-model="defaultroute_code"
+ filterable
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ class="defaultroute_code"
+ >
+ <el-option
+ v-for="item in defaultroute_codeArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </div>
+ <el-divider />
+ <div style="margin-bottom: 10px">
+ <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ュ簭鍒楄〃
+ </div>
+ <div style="overflow-y: scroll">
+ <el-table
+ ref="projectTableData"
+ :data="projectTableData"
+ border
+ height="280"
+ :row-class-name="tableRowClassName"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ >
+ <el-table-column
+ prop="seq"
+ width="100"
+ label="宸ュ簭搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="stepcode"
+ label="宸ュ簭缂栫爜"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="stepname"
+ label="宸ュ簭鍚嶇О"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="enable"
+ label="鍚敤鐘舵��"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.enable==='Y'">
+ <svg-icon icon-class="circleYes" style="margin-right: 2px" />
+ 鏄�
+ </div>
+ <div v-if="row.enable==='N'">
+ <svg-icon icon-class="circleNo" style="margin-right: 2px" />
+ 鍚�
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="routeDialogVisibleCancel">鍙� 娑�</el-button>
+ <el-button v-waves type="primary" @click="routeDialogVisibleConfirm">纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!-- 宸ュ崟sop/宸ュ簭sop-->
+ <el-dialog
+ v-el-drag-dialog
+ class="sop"
+ title="璁惧SOP棰勮"
+ :visible.sync="SopDialogVisible"
+ width="800px"
+ :close-on-click-modal="false"
+ top="15vh"
+ @closed="handleSopClose"
+ @close="handleSopClose"
+ >
+
+ <el-form inline label-width="110px" style="display:flex">
+ <el-form-item label="宸ュ崟SOP">
+ <el-select
+ v-model="dialogSopForm.sop"
+ style="width:200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :popper-append-to-body="false"
+ @change="sopChange"
+ >
+ <el-option
+ v-for="item in sopArr"
+ :key="item.filepath"
+ :label="item.filename"
+ :value="item.filepath"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="Sop鐗堟湰">
+ <el-input v-model="dialogSopForm.v" disabled style="width: 200px" />
+ </el-form-item>
+ </el-form>
+
+ <el-button
+ v-waves
+ type="primary"
+ style="margin-left: 37px"
+ @click="view"
+ >棰� 瑙�/涓� 杞�
+ </el-button>
+
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="handleSopClose">鍙� 娑�</el-button>
+ <!-- <el-button-->
+ <!-- v-waves-->
+ <!-- type="primary"-->
+ <!-- :loading="$store.state.app.buttonIsDisabled"-->
+ <!-- :disabled="$store.state.app.buttonIsDisabled"-->
+ <!-- @click="handleSopConfirm"-->
+ <!-- >纭� 瀹�</el-button>-->
+ </div>
+ </span>
+ </el-dialog>
+
+ </div>
+</template>
+
+<script>
+import Pagination from '@/components/Pagination'
+import { handleDatetime, handleDatetime2, validateCode } from '@/utils/global'
+import { getCookie } from '@/utils/auth'
+import QRCode from 'qrcodejs2'
+import $ from 'jquery'
+import elDragDialog from '@/directive/el-drag-dialog'
+import waves from '@/directive/waves'
+import {
+ AddMesOrderCodeSearch,
+ AddUpdateMesOrder, DeleteMesOrder,
+ MesBadOrderSearch, MesOrderDistribution, MesOrderNewStepContent, MesOrderProcessSopSearch,
+ MesOrderSearch, MesOrderSopSearch,
+ UpdateMesOrderStepSearch
+} from '@/api/WorkOrder'
+import { PartSelect } from '@/api/ProductModel'
+import { PrentOrganization, PrentOrganizationNoCompany, StepData } from '@/api/GeneralBasicData'
+import Sortable from 'sortablejs'
+import ElDragSelect from '@/components/DragSelect'
+import { MesOrderPrintSearch } from '@/api/GridReport' // base on element-ui
+import DateType from '@/components/DateType'
+import { PartSelectRpute, RouteSelectStep } from '@/api/basicSettings'
+import { DeviceSopSearch } from '@/api/DeviceManager'
+
+export default {
+ name: 'WorkOrderList',
+ components: {
+ Pagination, ElDragSelect, DateType
+ },
+ directives: { elDragDialog, waves },
+ data() {
+ return {
+ mouseHoverType: 'mouseout',
+ mouseHoverTypeDialog: 'mouseout',
+ isExpandForm: false,
+ isIpad: false,
+ mainHeight: 0,
+ tableHeight: 0,
+ username: '',
+ form: {
+ wkshopcode: '', // 杞﹂棿缂栫爜
+ mesorderstus: '', // 宸ュ崟鐘舵�佺爜
+ mesordercode: '', // 宸ュ崟缂栧彿
+ partcode: '', // 浜у搧缂栫爜
+ ordertype: '', // ordertype
+ sourceorder: '', // 婧愬崟鍗曞彿
+ saleordercode: '', // 閿�鍞鍗�
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+ creatuser: '', // 鍒涘缓浜哄憳
+ // createdate: '', // 鍒涘缓鏃堕棿
+ datatype: 'ED', // 鏃ユ湡绫诲瀷(璁″垝寮�宸�(PS)銆佽鍒掑畬宸�(PE)銆侀璁′氦浠�(ED)銆佸垱寤烘棩鏈�(CT))
+ timeValue: [], // 鏌ヨ鏃ユ湡
+ prop: 'lm_date', // 鎺掑簭瀛楁
+ order: 'desc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ },
+ erporderstusArr: [
+ { code: 'NEW', name: '鏂板伐鍗�' },
+ // { code: 'CREATING', name: '鎵ц涓�' },
+ // { code: 'CREATED', name: '宸插叧闂�' }
+ { code: 'ALLO', name: '宸叉淳鍙�' },
+ { code: 'START', name: '寮�宸�' },
+ { code: 'CLOSED', name: '瀹屽伐' }
+ // { code: 'NOSCHED', name: '寰呮帓绋�' },
+ // { code: 'SCHED', name: '宸叉帓绋�' }
+ ],
+ wkshopcodeArr: [],
+ total: 10,
+ tableData: [],
+ dialogVisible: false,
+ dialogForm: {
+ mesorderstus: 'NEW', // 宸ュ崟鐘舵�佺爜
+ mesordercode: '', // 宸ュ崟缂栧彿
+ ordertype: 'PO', // 宸ュ崟绫诲瀷
+ sourceorderid: '', // 婧愬崟id
+ sourceorder: '', // 婧愬崟鍗曞彿
+
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+
+ mesqty: '', // 宸ュ崟鏁伴噺
+ wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
+ wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
+
+ deliverydate: '', // 浜や粯鏃堕棿
+ data_sources: '', // 鏁版嵁鏉ユ簮
+
+ routecode: '', // 宸ヨ壓璺嚎
+
+ mesmaxqty: 0, // 宸ュ崟鐨勬渶澶у��
+ mesqtyinit: 0// 宸ュ崟鏁伴噺鍒濆鍊�
+ },
+ ordertypeArr: [// 宸ュ崟绫诲瀷
+ { code: 'PO', name: '鏍囧噯宸ュ崟' },
+ { code: 'FO', name: '鎶ュ簾琛ュ崟' }
+ ],
+ partArr: [], // 浜у搧淇℃伅
+ wkshopArr: [], // 鐢熶骇杞﹂棿鏁扮粍
+ routeArr: [], // 宸ヨ壓璺嚎鏁扮粍
+ orderlevArr: [
+ { code: 1, name: '鐗圭骇' },
+ { code: 2, name: '绱ф��' },
+ { code: 3, name: '姝e父' }
+ ], // 宸ュ崟绛夌骇鏁扮粍
+ operation: '',
+ dialogFormRules: {
+ mesorderstus: [
+ { required: true, message: '璇烽�夋嫨璁㈠崟鐘舵��', trigger: ['blur', 'change'] }
+ ],
+ partcode: [
+ { required: true, message: '璇烽�夋嫨浜у搧淇℃伅', trigger: ['blur', 'change'] }
+ ],
+ mesordercode: [
+ { required: true, validator: validateCode, trigger: ['blur', 'change'] }
+ ],
+ mesqty: [
+ { required: true, message: '璇疯緭鍏ュ伐鍗曟暟閲�', trigger: ['blur', 'change'] }
+ ],
+ wkshopcode: [
+ { required: true, message: '璇烽�夋嫨鐢熶骇杞﹂棿', trigger: ['blur', 'change'] }
+ ],
+ deliverydate: [
+ { required: true, message: '璇烽�夋嫨棰勮浜や粯鏃ユ湡', trigger: ['blur', 'change'] }
+ ],
+ planstartdate: [
+ { required: true, message: '璇烽�夋嫨寮�濮嬫椂闂�', trigger: ['blur', 'change'] }
+ ],
+ planenddate: [
+ { required: true, message: '璇烽�夋嫨缁撴潫鏃堕棿', trigger: ['blur', 'change'] }
+ ],
+ orderlev: [
+ { required: true, message: '璇烽�夋嫨宸ュ崟绛夌骇', trigger: ['blur', 'change'] }
+ ],
+ isAps: [
+ { required: true, message: '璇烽�夋嫨鏄惁鎺掔▼', trigger: ['blur', 'change'] }
+ ],
+ bomId: [
+ { required: true, message: '璇烽�夋嫨鐗╂枡娓呭崟', trigger: ['blur', 'change'] }
+ ]
+
+ },
+ dialogVisibleTask: false,
+ taskTableData: [],
+
+ dialogVisibleSearch: false,
+ searchTableData: [],
+ dialogVisibleApprove: false,
+ tableDataPrint: [], // 鎵撳嵃椤甸潰鍐呭
+ printObj: {
+ id: 'printMe',
+ popTitle: '鎵撳嵃妯℃澘',
+ preview: false,
+ extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
+ closeCallback(vue) { // 鍏抽棴鎵撳嵃鐨勫洖璋冧簨浠讹紙鏃犳硶纭畾鐐瑰嚮鐨勬槸纭杩樻槸鍙栨秷锛�
+ console.log('11212', vue)
+ // vue.dialogVisible = false
+ vue.dialogVisibleApprove = false
+ },
+ beforeOpenCallback(vue) {
+ vue.printLoading = true
+ console.log('鎵撳紑涔嬪墠')
+ console.log()
+ },
+ openCallback(vue) {
+ vue.printLoading = false
+ console.log('鎵ц浜嗘墦鍗�')
+ }
+ },
+
+ formApprove: {
+ m_po: '', // 婧愬崟鍗曞彿
+ mesordercode: '',
+ partcode: '',
+ partname: '',
+ partspec: '',
+ plan_qty: '',
+ routename: '',
+ lm_date: '',
+ priuserdefnvc1: '',
+ priuserdefnvc2: '',
+ priuserdefnvc3: '',
+ priuserdefnvc4: '',
+ priuserdefnvc5: '',
+ priuserdefnvc6: ''
+ },
+ number: '',
+ 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: '',
+ nextstepname: '',
+ operator: '', // 鎿嶄綔浜�
+ operatorTime: ''// 鎿嶄綔鏃堕棿
+ },
+ dialogVisibleSource: false,
+ sourceTableData: [],
+ sourceForm: {
+ wkshopcode: '', // 杞﹂棿缂栫爜
+ mesordercode: '', // 宸ュ崟缂栧彿
+ sourceorder: '', // 璁㈠崟缂栧彿
+ saleordercode: '', // 閿�鍞鍗曞彿
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+ creatuser: '', // 鍒涘缓浜哄憳
+ // paystartdate: '', // 浜や粯鏃堕棿
+ // paystartdate: '', // 棰勮寮�宸ユ椂闂�
+ // payenddate: '', // 棰勮瀹屽伐鏃堕棿
+ createdate: '', // 鍒涘缓鏃堕棿
+
+ prop: 'lm_date', // 鎺掑簭瀛楁
+ order: 'desc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ },
+ sourceFormTotal: 10,
+ radioSelectedId: '',
+ isExpandDialog: false, // 瀵硅瘽妗嗚〃鍗曟槸鍚﹀睍寮�锛岄粯璁や笉灞曞紑
+ dialogVisibleRoute: false,
+ dialogFormRoute: {
+ projectName: '', // 浜у搧鍚嶇О
+ projectCode: '', // 浜у搧浠g爜
+ routeOperationArr: [] // 宸ヨ壓璺嚎闆嗗悎
+ },
+ defaultroute_code: '', // 榛樿宸ヨ壓璺嚎閫変腑鍊�
+ defaultroute_codeArr: '', // 榛樿宸ヨ壓璺嚎鏁扮粍
+ projectTableData: [], // 璁惧鍒楄〃
+ tableDataDetail: [], // 鐐瑰嚮宸ュ崟琛ㄧ殑琛� 鏄剧ず璇︾粏淇℃伅
+ printSize: 0,
+ printSizeSelectArr: [// 瀹�*楂�
+ { code: 0, name: '80*50' },
+ { code: 1, name: '78*60' },
+ { code: 2, name: '60*40' }
+ // { code: 2, name: '50*60' },
+ // { code: 3, name: '50*40' },
+ // { code: 4, name: '50*80' },
+ // { code: 5, name: '40*30' }
+ ],
+ pickerOptions: {
+ disabledDate(time) {
+ return time.getTime() < Date.now() - 8.64e7
+ }
+ },
+
+ isLastPrint: false, // 鏄惁鏄湯閬撴墦鍗�
+ lastPrintArr: [], // 鏈亾鎵撳嵃鐨勬暟缁�(鎵�鏈�)
+ lastPrintArrSelected: [], // 鏈亾鎵撳嵃鐨勬暟缁�(閫変腑)
+
+ switchButton: false,
+
+ routeStepArr: '',
+
+ stepTableData: [],
+ sortable: null,
+ stepSelectArr: [], // 宸ュ簭涓嬫媺鏁版嵁
+ stepSelectedValue: [], // 涓嬫媺閫変腑鍊�
+
+ multipleSelection: [],
+
+ datatypeList: [
+ { code: 'PS', name: '棰勮寮�宸ユ棩鏈�' },
+ { code: 'PE', name: '棰勮瀹屽伐鏃ユ湡' },
+ { code: 'ED', name: '棰勮浜や粯鏃ユ湡' },
+ { code: 'CT', name: '宸ュ崟鍒涘缓鏃ユ湡' }
+ ],
+
+ routecodeArr: [], //
+
+ sourceType: false, // 宸ュ簭鐨勬暟鎹潵婧�
+
+ mesSetting: JSON.parse(localStorage.getItem('mesSetting')),
+
+ SopDialogVisible: false,
+ dialogSopForm: { // 璁惧SOP琛ㄥ崟
+ sop: '',
+ v: ''
+ },
+ sopArr: [],
+ routeCode: '', // 宸ヨ壓璺嚎code
+ partCode: ''
+ }
+ },
+ watch: {
+ 'stepSelectedValue': {
+ // deep: true,
+ handler: function(val) {
+ // do something with the new and old value of stepSelectedValue
+ console.log(val, 1)
+ const arr = JSON.parse(JSON.stringify(this.stepTableData))
+ const arrStepcode = arr.map(i => i.stepcode)
+ this.stepTableData = []
+ val.forEach(i => {
+ this.stepTableData.push(
+ {
+ stepcode: i,
+ stepname: this.stepSelectArr.find(j => j.stepcode === i).stepname,
+ stepprice: arrStepcode.includes(i) ? arr.find(j => j.stepcode === i).stepprice : 0
+ }
+ )
+ })
+ }
+ }
+ },
+ activated() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+ },
+ created() {
+ this.handleRequest()
+ },
+ mounted() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+
+ // this.$nextTick(() => {
+ // this.setSort()
+ // })
+ },
+ methods: {
+ // 寮瑰嚭妗嗗叧闂�
+ handleSopClose() {
+ this.SopDialogVisible = false
+ this.dialogSopForm = { // 璁惧SOP琛ㄥ崟
+ sop: '',
+ v: ''
+ }
+ },
+ // 棰勮
+ view() {
+ window.open(process.env.VUE_APP_BASE_API_FILE + this.dialogSopForm.sop)
+ },
+ sopChange(val) {
+ this.dialogSopForm.v = this.sopArr.find(i => i.filepath === val).version
+ },
+ async pre(row, type) {
+ if (type === 1) {
+ const data = {
+ wocode: row.wo_code,
+ materielcode: row.partcode
+ }
+ const { data: res } = await MesOrderSopSearch(data)
+ this.sopArr = res
+ }
+
+ if (type === 2) {
+ const data = {
+ materielcode: this.partCode,
+ routecode: this.routeCode ? this.routeCode : '',
+ stepcode: row.step_code
+ }
+ const { data: res } = await MesOrderProcessSopSearch(data)
+ this.sopArr = res
+ }
+
+ this.SopDialogVisible = true
+ },
+ // 宸ュ簭鏉ユ簮鍒囨崲
+ sourceTypeChange(val) {
+ this.stepTableData = []
+ if (val) {
+ this.getMesOrderNewStepContent()
+ } else {
+ if (this.mesSetting.route) {
+ this.routecodeChange()
+ } else {
+ this.getBasicProcessData()
+ }
+ }
+ },
+
+ DateTypeChange(value) {
+ this.form.datatype = value
+ },
+ cycleTimeChange(val) {
+ this.form.timeValue = val
+ },
+ setSort() {
+ const el = this.$refs.stepTableDataRef.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
+ this.sortable = Sortable.create(el, {
+ ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
+ setData: function(dataTransfer) {
+ // to avoid Firefox bug
+ // Detail see : https://github.com/RubaXa/Sortable/issues/1012
+ dataTransfer.setData('Text', '')
+ },
+ onEnd: evt => {
+ const targetRow = this.stepTableData.splice(evt.oldIndex, 1)[0]
+ this.stepTableData.splice(evt.newIndex, 0, targetRow)
+
+ this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ // for show the changes, you can delete in you code
+ // const tempIndex = this.newList.splice(evt.oldIndex, 1)[0]
+ // this.newList.splice(evt.newIndex, 0, tempIndex)
+ }
+ })
+ },
+ tableRowClassName({ row, rowIndex }) {
+ return 'custom-row'
+ },
+ handleRequest() {
+ this.getMesOrderSearch().then(res => {
+ if (res.code === '200') {
+ this.getSelect()
+ this.getPrentOrganizationNoCompany()
+ }
+ })
+ },
+ async getPrentOrganizationNoCompany() {
+ const { data: res } = await PrentOrganizationNoCompany()
+ this.wkshopcodeArr = res
+ },
+ async getMesOrderSearch() {
+ // let tempDate = this.form.createdate
+ // if (tempDate.length > 0) {
+ // tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
+ // }
+
+ const data = {
+ wkshopcode: this.form.wkshopcode,
+ mesorderstus: this.form.mesorderstus, // 宸ュ崟鐘舵�佺爜
+ mesordercode: this.form.mesordercode, // 宸ュ崟缂栧彿
+ partcode: this.form.partcode, // 浜у搧缂栫爜
+ partname: this.form.partname, // 浜у搧鍚嶇О
+ partspec: this.form.partspec, // 浜у搧瑙勬牸
+ creatuser: this.form.creatuser, // 鍒涘缓浜哄憳
+ sourceorder: this.form.sourceorder, // 婧愬崟鍗曞彿
+ saleordercode: this.form.saleordercode, // 閿�鍞鍗�
+ ordertype: this.form.ordertype, // 鍗曟嵁绫诲瀷
+ datatype: this.form.datatype,
+ searchdate: this.form.timeValue.join('~'),
+ // createdate: this.form.createdate.toString().length > 0 ? handleDatetime(this.form.createdate) : '', // 鍒涘缓鏃堕棿
+ prop: this.form.prop, // 鎺掑簭瀛楁
+ order: this.form.order, // 鎺掑簭瀛楁
+ page: this.form.page, // 绗嚑椤�
+ rows: this.form.rows // 姣忛〉澶氬皯鏉�
+ }
+ const res = await MesOrderSearch(data)
+ this.tableData = res.data
+ this.total = res.count
+
+ // this.form.createdate = tempDate
+ return { code: res.code }
+ },
+ async getSelect() {
+ // 鑾峰彇浜у搧淇℃伅
+ const { data: res1 } = await PartSelect()
+ this.partArr = res1
+
+ // 鑾峰彇缁勭粐
+ const { data: res2 } = await PrentOrganization()
+ this.wkshopArr = res2
+
+ // 鑾峰彇宸ュ簭
+ const { data: res3 } = await StepData()
+ this.stepSelectArr = res3
+ },
+ // 璁㈠崟鐘舵�佹敼鍙樻椂
+ erporderstusChange(val) {
+ this.form.mesorderstus = val
+ },
+ // 鎺掑簭鏀瑰彉鏃�
+ 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.getMesOrderSearch()
+ },
+ sourceSortChange({ column, prop, order }) {
+ if (order === 'descending') {
+ order = 'desc'
+ } else if (order === 'ascending') {
+ order = 'asc'
+ } else {
+ order = 'desc'
+ }
+ this.sourceForm.order = order
+ this.sourceForm.prop = prop
+ this.getMesBadOrderSearch()
+ },
+ // 鏌ヨ
+ search() {
+ this.getMesOrderSearch()
+ },
+
+ // 閲嶇疆
+ reset(val) {
+ this.form.wkshopcode = ''
+ this.form.mesorderstus = ''
+ this.form.mesordercode = ''
+ this.form.partcode = ''
+ this.form.partname = ''
+ this.form.partspec = ''
+ this.form.paydate = ''
+ this.form.creatuser = ''
+ this.form.sourceorder = ''
+ this.form.ordertype = ''
+ // this.form.createdate = ''
+
+ this.form.timeValue = []
+ this.cycleTime = null
+ this.$refs.DateTypeRef.clearValue()
+
+ this.getMesOrderSearch()
+ },
+ // 鏂板鎸夐挳
+ async add(operation) {
+ const { data: res } = await AddMesOrderCodeSearch()
+ this.dialogForm.mesordercode = res
+ this.operation = operation
+ this.dialogVisible = true
+ this.dialogForm.data_sources = 'MES'
+
+ this.$nextTick(() => {
+ this.setSort()
+ })
+ },
+ // 宸ュ簭浠诲姟
+ 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.dialogForm.mesordercode = res[0].wo_code
+ // this.dialogVisibleTask = true
+ },
+ dialogVisibleBack() {
+ this.dialogVisibleTask = false
+ },
+ handleSelectionChange(val) {
+ this.multipleSelection = val.map(i => i.wo_code)
+ },
+
+ selected(row, index) {
+ return row.status === 'NEW' && row.isstep === 'Y'
+ },
+ // 娲惧彂
+ send() {
+ if (this.multipleSelection.length === 0) {
+ return this.$message.info('璇峰厛鍕鹃�夌浉瀵瑰簲鐨勫伐鍗曪紒')
+ }
+
+ this.$confirm('鏄惁纭娲惧彂?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ MesOrderDistribution(this.multipleSelection).then(res => {
+ if (res.code === '200') {
+ this.$notify.success('娲惧彂鎴愬姛!')
+ this.getMesOrderSearch()
+ }
+ })
+ }).catch(() => {
+ this.$notify.info('宸插彇娑堟淳鍙�')
+ })
+ },
+ // 鍒犻櫎鎸夐挳
+ async del(row) {
+ if (row.status === 'START' || row.status === 'CLOSED' || row.status === 'SCHED') {
+ return this.$message.info('姝ゅ伐鍗曚笉鍙垹闄わ紒')
+ }
+ this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ const data = {
+ souceid: row.sourceid ? row.sourceid : '',
+ wocode: row.wo_code,
+ m_po: row.m_po,
+ orderqty: row.plan_qty
+ }
+ DeleteMesOrder(data).then(res => {
+ if (res.code === '200') {
+ this.$notify.success('鍒犻櫎鎴愬姛!')
+ if (this.form.page > 1 && this.tableData.length === 1) {
+ this.form.page--
+ }
+ this.getMesOrderSearch()
+ }
+ })
+ }).catch(() => {
+ this.$notify.info('宸插彇娑堝垹闄�')
+ })
+ },
+
+ // 淇敼鎸夐挳
+ async edit(operation, row) {
+ this.operation = operation
+
+ this.dialogForm.data_sources = row.data_sources
+ this.dialogForm.mesorderstus = row.status
+ this.dialogForm.mesordercode = row.wo_code
+ this.dialogForm.ordertype = row.wotype
+ this.dialogForm.sourceorderid = row.sourceid
+ this.dialogForm.sourceorder = row.m_po
+ this.dialogForm.partcode = row.partcode
+ this.dialogForm.partname = row.partname
+ this.dialogForm.partspec = row.partspec
+ this.dialogForm.wkshopcode = row.wkshp_code
+ this.dialogForm.routecode = row.route_code
+ this.dialogForm.deliverydate = row.saleOrderDeliveryDate.substring(0, 11)
+ this.dialogForm.mesqty = row.plan_qty
+
+ this.dialogForm.mesqtyinit = row.plan_qty
+
+ const data = {
+ sourceid: this.dialogForm.sourceorderid,
+ sourcewo: this.dialogForm.sourceorder,
+ wocode: this.dialogForm.mesordercode,
+ data_sources: this.dialogForm.data_sources
+ }
+ const { data: res } = await UpdateMesOrderStepSearch(data)
+ this.dialogForm.mesmaxqty = res.canupdate_qty
+
+ if (this.mesSetting.route) { // 鎸夊伐鑹鸿矾绾胯蛋妯″紡
+ if (!this.dialogForm.routecode) {
+ await this.getPartcodeChangeDialog()
+ }
+
+ if (res.stepdata.length > 0) {
+ res.stepdata.forEach(i => {
+ this.stepTableData.push(
+ {
+ stepcode: i.step_code,
+ stepname: i.stepname,
+ stepprice: i.stepprice
+ }
+ )
+ })
+ this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ } else {
+ const data2 = {
+ wkshopcode: this.dialogForm.wkshopcode,
+ partcode: this.dialogForm.partcode
+ }
+ const { data: res2 } = await MesOrderNewStepContent(data2)
+ if (res2.length > 0) {
+ res2.forEach(i => {
+ this.stepTableData.push(
+ {
+ stepcode: i.step_code,
+ // stepname: i.stepname,
+ stepprice: i.stepprice
+ }
+ )
+ })
+ this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ }
+ }
+ } else {
+ if (res.stepdata.length > 0) {
+ res.stepdata.forEach(i => {
+ this.stepTableData.push(
+ {
+ stepcode: i.step_code,
+ stepname: i.stepname,
+ stepprice: i.stepprice
+ }
+ )
+ })
+ this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ } else {
+ await this.getBasicProcessData()
+ }
+ }
+
+ this.dialogVisible = true
+ this.$nextTick(() => {
+ this.setSort()
+ })
+ },
+ // 鎸夊伐搴忔ā寮忚蛋鐨勬椂鍊� 寮曠敤鍩虹璧勬枡 宸ヨ壓
+ async getBasicProcessData() {
+ const { data: res } = await PartSelectRpute({ partcode: this.dialogForm.partcode })
+ res.sort((a, b) => a.step_seq - b.step_seq)
+ this.stepTableData = []
+ res.forEach(i => {
+ this.stepTableData.push(
+ {
+ stepcode: i.step_code,
+ stepname: i.step_name,
+ stepprice: i.unprice
+ }
+ )
+ })
+ this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ },
+ // 宸ュ崟鍏抽棴浜嬩欢
+ orderClose() {
+ console.log('宸ュ崟鍏抽棴浜嬩欢')
+ },
+ // 瀵硅瘽妗嗕骇鍝佷俊鎭�兼敼鍙�
+ partcodeChangeDialog(val) {
+ console.log(val)
+ this.dialogForm.partname = this.partArr.find(item => item.partcode === val).partname
+ this.dialogForm.partcode = this.partArr.find(item => item.partcode === val).partcode
+ this.dialogForm.partspec = this.partArr.find(item => item.partcode === val).partspec
+
+ this.dialogForm.routecode = ''
+
+ if (this.mesSetting.route) {
+ this.getPartcodeChangeDialog()
+ } else {
+ this.getBasicProcessData()
+ }
+ },
+
+ async getPartcodeChangeDialog() {
+ const { data: res } = await PartSelectRpute({ partcode: this.dialogForm.partcode })
+ this.routecodeArr = res
+
+ // if (this.mesSetting.route) { // 鎸夊伐鑹鸿矾绾胯蛋妯″紡
+ this.dialogForm.routecode = this.partArr.find(item => item.partcode === this.dialogForm.partcode).default_route
+ if (this.dialogForm.routecode && !this.sourceType) {
+ await this.routecodeChange()
+ } else {
+ await this.getMesOrderNewStepContent()
+ }
+ // }
+ // else { // 鎸夊伐搴忚蛋妯″紡
+ // await this.getMesOrderNewStepContent()
+ // }
+ },
+ // 宸ヨ壓璺嚎鍊兼敼鍙�
+ async routecodeChange() {
+ const data = {
+ partcode: this.dialogForm.partcode,
+ routecode: this.dialogForm.routecode
+ }
+ const { data: res } = await RouteSelectStep(data)
+
+ this.stepSelectedValue = []
+ this.stepTableData = []
+ if (res.length > 0) {
+ res.sort((a, b) => a.step_seq - b.step_seq)
+ res.forEach(i => {
+ this.stepTableData.push(
+ {
+ stepcode: i.step_code,
+ // stepname: i.stepname,
+ stepprice: i.unprice
+ }
+ )
+ })
+ this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ }
+ },
+
+ async getMesOrderNewStepContent() {
+ // if (!this.mesSetting.route && this.operation === 'edit') {
+ // return
+ // }
+
+ const data = {
+ routecode: this.dialogForm.routecode,
+ wkshopcode: this.dialogForm.wkshopcode,
+ partcode: this.dialogForm.partcode
+ }
+ const { data: res } = await MesOrderNewStepContent(data)
+ // console.log(res)
+ this.stepSelectedValue = []
+ this.stepTableData = []
+ if (res.length > 0) {
+ res.forEach(i => {
+ this.stepTableData.push(
+ {
+ stepcode: i.step_code,
+ // stepname: i.stepname,
+ stepprice: i.stepprice
+ }
+ )
+ })
+ this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ }
+ },
+
+ // 瀵硅瘽妗嗗叧闂簨浠�
+ handleClose() {
+ this.dialogForm = {
+ mesorderstus: 'NEW', // 宸ュ崟鐘舵�佺爜
+ mesordercode: '', // 宸ュ崟缂栧彿
+ ordertype: 'PO', // 宸ュ崟绫诲瀷
+ sourceorderid: '', // 婧愬崟id
+ sourceorder: '', // 婧愬崟鍗曞彿
+
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+
+ mesqty: '', // 宸ュ崟鏁伴噺
+ wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
+ wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
+
+ deliverydate: '', // 浜や粯鏃堕棿
+ data_sources: '' // 鏁版嵁鏉ユ簮
+ }
+
+ this.sourceType = false
+
+ this.stepSelectedValue = []
+ this.stepTableData = []
+ this.$refs.dialogForm.clearValidate()
+ },
+ // 瀵硅瘽妗嗗彇娑�
+ dialogVisibleCancel() {
+ this.dialogVisible = false
+ },
+ // 瀵硅瘽妗嗙‘璁�
+ dialogVisibleConfirm() {
+ this.$refs.dialogForm.validate(valid => {
+ if (valid) {
+ if (this.dialogForm.ordertype === 'FO' && this.dialogForm.sourceorder.toString().trim().length <= 0) {
+ return this.$message.info('婧愬崟鍗曞彿涓嶈兘涓虹┖锛�')
+ }
+
+ if (this.dialogForm.mesqty <= 0) {
+ return this.$message.info('宸ュ崟鏁伴噺涓嶈兘绛変簬闆讹紒')
+ }
+
+ if (this.dialogForm.data_sources === 'ERP' && this.dialogForm.mesmaxqty < this.dialogForm.mesqty) {
+ return this.$message.info('姝ゅ伐鍗曠殑鏈�澶т慨鏀规暟鍊间负锛�' + this.dialogForm.mesmaxqty)
+ }
+
+ const workListSub = []
+ this.stepTableData.forEach((i, j) => {
+ workListSub.push(
+ {
+ stepseq: j + 1,
+ stepcode: i.stepcode,
+ stepprice: i.stepprice,
+ isbott: j === 0 ? 'Y' : 'N',
+ isend: j === this.stepTableData.length - 1 ? 'Y' : 'N'
+ }
+ )
+ })
+
+ if (workListSub.length === 0) {
+ return this.$message.info('宸ュ簭涓嶈兘涓虹┖锛�')
+ }
+
+ const data = {
+ wostatus: this.dialogForm.mesorderstus, // 宸ュ崟鐘舵��
+ wocode: this.dialogForm.mesordercode, // 宸ュ崟鍙�
+ wotype: this.dialogForm.ordertype, // 宸ュ崟绫诲瀷
+ sourceid: this.dialogForm.sourceorderid, // 婧愬崟id
+ sourcewo: this.dialogForm.sourceorder, // 婧愬崟鍗曞彿
+ partcode: this.dialogForm.partcode, // 浜у搧缂栧彿
+ wkshopcode: this.dialogForm.wkshopcode,
+ woqty: this.dialogForm.mesqty, // 宸ュ崟鏁伴噺
+ deliverydate: this.dialogForm.deliverydate, // 浜や粯鏃堕棿
+ data_sources: this.dialogForm.data_sources, // 鏁版嵁鏉ユ簮
+ isstep: workListSub.length > 0 ? 'Y' : 'N', //
+ difference: this.dialogForm.mesqty - this.dialogForm.mesqtyinit, // 鏁版嵁宸��
+ routecode: this.dialogForm.routecode,
+ workListSub
+ }
+
+ this.$store.state.app.buttonIsDisabled = true
+ AddUpdateMesOrder(data, this.operation === 'add' ? 'Add' : 'Update').then(res => {
+ if (res.code === '200') {
+ this.dialogVisible = false
+ // this.handlePrint()
+ this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇濆瓨鎴愬姛锛�')
+ this.getMesOrderSearch()
+ this.$store.state.app.buttonIsDisabled = false
+ } else {
+ this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇濆瓨澶辫触锛�')
+ }
+ })
+ }
+ })
+ },
+ // 娲惧彂鎵撳嵃
+ async sendPrint() {
+ const data = {
+ username: getCookie('admin'),
+ // username: getCookie('username'),
+ mesordercode: this.dialogForm.mesordercode
+ }
+ const res = await MesOrderPrintSearch1(data)
+ // const res = await PrintOrder(data)
+ if (res.code === '200') {
+ // 鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
+ var args = {
+ type: 'print', // preview print
+ showOptionDlg: false, // 濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
+ report: urlAddRandomNo('./static/grf/浜у搧娴佷紶鍗旳4.grf'),
+ data: res.data
+ }
+ webapp_ws_ajax_run(args)
+ }
+ },
+
+ // 鑾峰彇椤甸潰楂樺害
+ getHeight() {
+ this.$nextTick(() => {
+ this.mainHeight = window.innerHeight - 85
+ // this.tableHeight = this.mainHeight - 250
+ this.tableHeight = this.mainHeight - 515
+ if (window.innerHeight < 769) {
+ this.tableHeight = this.tableHeight - 20
+ }
+ this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
+ this.$refs.tableDataRef.doLayout()
+ })
+ },
+ // 宸ヨ壓璺嚎鏀惧ぇ闀滅偣鍑�
+ async searchClick() {
+ if (this.dialogForm.routecode === '') {
+ return this.$message.info('璇峰厛閫夋嫨宸ヨ壓璺嚎锛�')
+ }
+ this.dialogVisibleSearch = true
+ const { data: res } = await SelectRouteStep({ routecode: this.dialogForm.routecode })
+ this.searchTableData = res
+ },
+ dialogVisibleSearchBack() {
+ this.dialogVisibleSearch = false
+ },
+ // 澶勭悊鎵撳嵃
+ handlePrint(wo_code, saleOrderCode, row) {
+ // const number = Math.random() * Math.random()
+ // this.number = number === 0 ? (10 + Math.random()) : number
+ // console.log(number)
+
+ this.formApprove.priuserdefnvc1 = row.priuserdefnvc1 ? row.priuserdefnvc1 : '/'
+ this.formApprove.priuserdefnvc2 = row.priuserdefnvc2 ? row.priuserdefnvc2 : '/'
+ this.formApprove.priuserdefnvc3 = row.priuserdefnvc3 ? row.priuserdefnvc3 : '/'
+ this.formApprove.priuserdefnvc4 = row.priuserdefnvc4 ? row.priuserdefnvc4 : '/'
+ this.formApprove.priuserdefnvc5 = row.priuserdefnvc5 ? row.priuserdefnvc5 : '/'
+ this.formApprove.priuserdefnvc6 = row.priuserdefnvc6 ? row.priuserdefnvc6 : '/'
+
+ this.formApprove.saleOrderCode = this.formApprove.saleOrderCode !== '' ? this.formApprove.saleOrderCode : saleOrderCode
+ const data2 = {
+ mesordercode: wo_code || this.dialogForm.mesordercode
+ }
+ MesOrderPrintSearch(data2).then(res2 => {
+ if (res2.code === '200') {
+ this.dialogVisibleApprove = true
+
+ const res3 = res2.data.recordset
+ // this.tableDataPrint = res3
+ this.tableDataPrint = this.chunkArray(res3, 8)
+
+ this.formApprove.mesordercode = res3[0].wo_code
+ this.formApprove.m_po = res3[0].m_po || '/'
+ this.formApprove.partcode = res3[0].partcode
+ this.formApprove.partname = res3[0].partname
+ this.formApprove.partspec = res3[0].partspec || '/'
+ this.formApprove.plan_qty = res3[0].plan_qty
+ this.formApprove.routename = localStorage.getItem('username') // 鎵撳嵃浜哄憳
+ this.formApprove.lm_date = res3[0].lm_date
+
+ this.$nextTick(() => {
+ this.tableDataPrint.forEach((item, index) => {
+ item.forEach(i => {
+ this.bindQRCode(i.seq, i.stepqrcode, 'small')
+ })
+ this.bindQRCode(index, this.formApprove.mesordercode, 'big')
+ const div = document.getElementById('qrCode' + index)
+ div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
+ })
+
+ // const div = document.getElementById('qrCode')
+ // 杩欎箞澶氫唬鐮佸彧闇�瑕佽繖涓�鍙ュ疄鐜版垜浠墍闇�瑕佺殑鍔熻兘锛屽畾浣峝iv婊氬姩鏉′綅缃湪搴曢儴锛宻crollHeight璁$畻鍑篸iv鐨勯珮搴︼紝鍐峴crollTop 璁剧疆婊氬姩鏉$殑楂樺害涓哄灏�
+ // div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
+ // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
+ })
+ }
+ })
+ },
+ dialogVisibleTaskClose() {
+ this.dialogForm.mesordercode = ''
+ },
+ /*
+ * 鎵嬪姩鐐瑰嚮鎵撳嵃
+ * */
+ // 杩斿洖鎸夐挳
+ dialogVisibleBackPreview() {
+ this.dialogVisibleApprove = false
+ },
+ chunkArray(array, size) {
+ const chunked = []
+ let i = 0
+ while (i < array.length) {
+ chunked.push(array.slice(i, i + size))
+ i += size
+ }
+ return chunked
+ },
+ // dialogVisibleConfirmPreview(param) {
+ // this.$refs.dialogForm.validate(valid => {
+ // if (valid) {
+ // const data = {
+ // username: getCookie('admin'),
+ // mesordercode: this.dialogForm.mesordercode
+ // }
+ // MesOrderPrintSearch1(data).then(res => {
+ // if (res.code === '200') {
+ // this.dialogVisibleApprove = true
+ // console.log(res, 11)
+ // }
+ // })
+ // }
+ // })
+ // },
+ // 鐢熸垚浜岀淮鐮� 宸ュ崟鎶ヨ〃浜岀淮鐮�
+ bindQRCode(seq, text, size) {
+ if (size === 'big') {
+ new QRCode(this.$refs['qrCodeDiv0' + seq], {
+ text: text,
+ width: size === 'big' ? 90 : 60,
+ height: size === 'big' ? 90 : 60,
+ // colorDark: '#333333', // 浜岀淮鐮侀鑹�
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ } else {
+ new QRCode(this.$refs['qrCodeDiv' + seq], {
+ text: text,
+ width: size === 'big' ? 90 : 60,
+ height: size === 'big' ? 90 : 60,
+ // colorDark: '#333333', // 浜岀淮鐮侀鑹�
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ }
+ },
+
+ dialogVisibleConfirmClose() {
+ this.formApprove.saleOrderCode = ''
+ // this.dialogForm.mesordercode = ''
+ this.formApprove.mesordercode = ''
+ this.formApprove.m_po = ''
+ this.formApprove.partcode = ''
+ this.formApprove.partname = ''
+ this.formApprove.partspec = ''
+ this.formApprove.plan_qty = ''
+ this.formApprove.routename = ''
+ this.formApprove.lm_date = ''
+
+ this.formApprove.priuserdefnvc1 = ''
+ this.formApprove.priuserdefnvc2 = ''
+ this.formApprove.priuserdefnvc3 = ''
+ this.formApprove.priuserdefnvc4 = ''
+ this.formApprove.priuserdefnvc5 = ''
+ this.formApprove.priuserdefnvc6 = ''
+ // this.$refs.qrCodeDiv0.title = ''
+
+ this.tableDataPrint = []
+ },
+ // 琛ユ墦鎸夐挳
+ supplementClick() {
+ this.dialogVisibleTask = false
+ this.handlePrint()
+ },
+ // 琛ユ墦灏忔爣绛�
+ supplementSmallClick(row) {
+ // let obj = {}
+ console.log(row, 21)
+ // this.taskTableData.forEach((item, index) => {
+ this.tableDataDetail.forEach((item, index) => {
+ if (item.seq === row.seq) {
+ console.log(item)
+ this.qrForm = {
+ // qrvalue: item.seq === this.taskTableData.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.taskTableData[item.seq].stepcode,
+ qrvalue: item.seq === this.tableDataDetail.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.tableDataDetail[item.seq].stepcode,
+ // startqty: item.seq === this.taskTableData.length ? item.plan_qty : this.taskTableData[item.seq].plan_qty,
+ startqty: item.seq === this.tableDataDetail.length ? item.plan_qty : this.tableDataDetail[item.seq].plan_qty,
+ wo_code: item.wo_code,
+ partcode: item.partcode,
+ partname: item.partname,
+ // nextstepname: item.seq === this.taskTableData.length ? item.stepname : this.taskTableData[item.seq].stepname,
+ nextstepname: item.seq === this.tableDataDetail.length ? item.stepname : this.tableDataDetail[item.seq].stepname,
+ operator: getCookie('username'),
+ operatorTime: handleDatetime2(new Date())
+ }
+ this.$nextTick(() => {
+ console.log(this.qrForm.qrvalue, 3333)
+ this.bindQRCode2(this.qrForm.qrvalue)
+
+ const div = document.getElementById('qrCode2')
+ // 杩欎箞澶氫唬鐮佸彧闇�瑕佽繖涓�鍙ュ疄鐜版垜浠墍闇�瑕佺殑鍔熻兘锛屽畾浣峝iv婊氬姩鏉′綅缃湪搴曢儴锛宻crollHeight璁$畻鍑篸iv鐨勯珮搴︼紝鍐峴crollTop 璁剧疆婊氬姩鏉$殑楂樺害涓哄灏�
+ div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
+ // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
+ })
+ }
+ })
+
+ // this.dialogVisibleTask = false
+ this.dialogVisible2 = true
+ console.log(this.qrForm, 1111)
+ },
+ // 琛ユ墦鐢熶骇鍏ュ簱鏉$爜
+ async getProductInHouseLabCode(ordercode) {
+ const res = await ProductInHouseLabCode({ ordercode })
+ console.log(res)
+ this.isLastPrint = true
+
+ this.lastPrintArr = res.data
+
+ this.dialogVisible2 = true
+
+ // 鐢熶骇浜岀淮鐮�
+ this.$nextTick(() => {
+ this.lastPrintArr.forEach((i, index) => {
+ i.checked = false
+ new QRCode(this.$refs.qrCodeDiv2[index], {
+ text: i.inbarcode,
+ width: this.printSize !== 2 ? 60 : 55,
+ height: this.printSize !== 2 ? 60 : 55,
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ })
+ })
+ },
+ dialogVisible2Close() {
+ this.qrForm.qrvalue = ''
+ this.qrForm.startqty = ''
+ this.qrForm.wo_code = ''
+ this.qrForm.partcode = ''
+ this.qrForm.partname = ''
+ this.qrForm.nextstepname = ''
+ this.qrForm.operator = ''
+ this.qrForm.operatorTime = ''
+ // this.$refs.qrCodeDiv2 = ''
+ this.isLastPrint = false
+ this.lastPrintArr = []
+ this.lastPrintArrSelected = []
+ },
+ // 鐢熸垚浜岀淮鐮� 宸ュ簭鏍囩浜岀淮鐮�
+ bindQRCode2(text) {
+ new QRCode(this.$refs.qrCodeDiv2, {
+ text: text,
+ width: this.printSize !== 2 ? 60 : 55,
+ height: this.printSize !== 2 ? 60 : 55,
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ },
+ // 鎶ュ簾琛ュ崟鎯呭喌涓嬪彲鐐瑰嚮閫夋嫨
+ mesordertsourcesearchclick() {
+ if (this.dialogForm.ordertype === 'PO') {
+ return this.$message.info('宸ュ崟绫诲瀷涓烘姤搴熻ˉ鍗曟儏鍐典笅鍙�夋嫨锛�')
+ }
+
+ this.getMesBadOrderSearch()
+
+ this.dialogVisibleSource = true
+ },
+ async getMesBadOrderSearch() {
+ // let tempDate2 = this.sourceForm.paystartdate
+ // if (tempDate2.length > 0) {
+ // tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
+ // }
+
+ let tempDate = this.sourceForm.createdate
+ if (tempDate.length > 0) {
+ tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
+ }
+
+ const data = {
+ wkshopcode: this.form.wkshopcode, // 杞﹂棿缂栫爜
+ mesordercode: this.sourceForm.mesordercode, // 宸ュ崟缂栧彿
+ sourceorder: '', // 婧愬崟鍗曞彿
+ saleordercode: '', // 閿�鍞崟鍙�
+ partcode: this.sourceForm.partcode, // 浜у搧缂栫爜
+ partname: this.sourceForm.partname, // 浜у搧鍚嶇О
+ partspec: this.sourceForm.partspec, // 浜у搧瑙勬牸
+ // paystartdate: tempDate2, // 浜や粯鏃堕棿
+ // payenddate: tempDate, // 浜や粯鏃堕棿
+ creatuser: this.sourceForm.creatuser, // 鍒涘缓浜哄憳
+ createdate: tempDate, // 鍒涘缓鏃堕棿
+
+ prop: this.sourceForm.prop, // 鎺掑簭瀛楁
+ order: this.sourceForm.order, // 鎺掑簭瀛楁
+ page: this.sourceForm.page, // 绗嚑椤�
+ rows: this.sourceForm.rows // 姣忛〉澶氬皯鏉�
+
+ }
+
+ const res = await MesBadOrderSearch(data)
+ this.sourceTableData = res.data
+ this.sourceFormTotal = res.count
+ },
+ // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
+ // getCurrentRowSource2(id) {
+ // this.radioSelectedId = id
+ // },
+ // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
+ getCurrentRowSource(row, event, column) {
+ this.radioSelectedId = row.id
+ this.dialogForm.mesqty = row.bad_qty
+ },
+ sourceSearch() {
+ this.getMesBadOrderSearch()
+ },
+ sourceReset() {
+ this.sourceForm.wkshopcode = ''
+ this.sourceForm.mesordercode = ''
+ this.sourceForm.sourceorder = ''
+ this.sourceForm.partcode = ''
+ this.sourceForm.partname = ''
+ this.sourceForm.partspec = ''
+ // this.sourceForm.paystartdate = ''
+ // this.sourceForm.payenddate = ''
+ this.sourceForm.creatuser = ''
+ this.sourceForm.createdate = ''
+ this.getMesBadOrderSearch()
+ },
+ dialogVisibleSourceClose() {
+ this.radioSelectedId = ''
+
+ this.sourceForm.wkshopcode = ''
+ this.sourceForm.mesordercode = ''
+ this.sourceForm.sourceorder = ''
+ this.sourceForm.partcode = ''
+ this.sourceForm.partname = ''
+ this.sourceForm.partspec = ''
+ this.sourceForm.paystartdate = ''
+ this.sourceForm.payenddate = ''
+ this.sourceForm.creatuser = ''
+ this.sourceForm.createdate = ''
+
+ this.isExpandDialog = false
+ this.sourceTableData = []
+ },
+ dialogVisibleSourceBack() {
+ this.dialogVisibleSource = false
+ },
+ dialogVisibleSourceConfirm() {
+ console.log(this.radioSelectedId)
+ this.sourceTableData.forEach(item => {
+ if (item.id === this.radioSelectedId) {
+ this.dialogForm.sourceorder = item.wo_code
+ this.dialogForm.partcode = item.partcode
+ this.dialogForm.partspec = item.partspec
+ }
+ })
+ this.dialogVisibleSource = false
+ },
+ mesordertypeChange(val) {
+ if (val === 'PO') {
+ this.dialogForm.sourceorder = ''
+ this.dialogForm.partcode = ''
+ this.dialogForm.partspec = ''
+ }
+ },
+ /* 鍏宠仈宸ヨ壓璺嚎妯″潡*/
+ // 鍏宠仈宸ヨ壓璺嚎
+ async routeClick(row) {
+ console.log(row)
+ // this.defaultroute_code = row.default_route
+ this.dialogFormRoute.projectCode = row.partcode
+ this.dialogFormRoute.projectName = row.partname
+ this.dialogVisibleRoute = true
+ const { data: res } = await InventoryFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode })
+ this.dialogFormRoute.routeOperationArr = res
+
+ this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
+ item.isSelected1 = false
+ item.isSelected2 = false
+ if (index === 0) {
+ item.isSelected1 = true
+ this.projectTableData = item.Data
+ }
+ if (item.flag === 'Y') {
+ item.isSelected2 = true
+ this.$nextTick(() => {
+ $('input:checkbox').eq(index).prop('checked', true)
+ })
+ }
+ })
+
+ this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y')
+ },
+ // 瀵硅瘽妗嗗叧闂�
+ handleCloseRoute() {
+ this.dialogFormRoute.routeOperationArr = []
+ this.defaultroute_codeArr = []
+ this.defaultroute_code = ''
+ this.projectTableData = []
+ },
+ // 鍙栨秷
+ routeDialogVisibleCancel() {
+ this.dialogVisibleRoute = false
+ },
+ // 纭畾
+ async routeDialogVisibleConfirm() {
+ const temp = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
+ if (this.defaultroute_code === '' && temp.length > 0) {
+ return this.$message.info('榛樿宸ヨ壓璺嚎涓嶈兘涓虹┖锛�')
+ }
+
+ // 鎻愪氦鏍煎紡
+ const data = []
+ this.dialogFormRoute.routeOperationArr.forEach(item => {
+ if (item.isSelected2) {
+ data.push({ code: item.code, name: item.name })
+ }
+ })
+
+ const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, this.defaultroute_code, data)
+ if (res.code === '200') {
+ this.$message.success('淇濆瓨鎴愬姛锛�')
+ await this.getMesOrderSearch()
+ this.dialogVisibleRoute = false
+ }
+ },
+ // 澶х洅瀛愮偣鍑讳簨浠�
+ myCheckboxClick(val) {
+ console.log(val, 1)
+ this.dialogFormRoute.routeOperationArr.forEach(item => {
+ item.isSelected1 = val.code === item.code
+ })
+
+ this.projectTableData = val.Data
+ },
+ // 灏忕洅瀛愮偣鍑讳簨浠�
+ myCheckboxInputClick(val) {
+ console.log(val, 2)
+ val.isSelected2 = !val.isSelected2
+
+ this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
+ if (val.code === item.code) {
+ item.flag = !item.flag
+ }
+ })
+ if (val.code === this.defaultroute_code) {
+ this.defaultroute_code = ''
+ }
+ this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
+ },
+ // 琛岀偣鍑讳簨浠�
+ async rowClick(row, event, column) {
+ this.formApprove.saleOrderCode = row.saleOrderCode
+ this.routeCode = row.route_code ? row.route_code : ''
+ this.partCode = row.partcode ? row.partcode : ''
+ const data = {
+ sourceid: row.sourceid,
+ sourcewo: row.m_po,
+ wocode: row.wo_code,
+ data_sources: row.data_sources
+ }
+ const { data: res } = await UpdateMesOrderStepSearch(data)
+ this.tableDataDetail = res.stepdata
+ },
+ // 宸ュ簭鍒犻櫎
+ stepDel(row) {
+ console.log(row)
+ const index = this.stepSelectedValue.findIndex(i => i === row.stepcode)
+ this.stepSelectedValue.splice(index, 1)
+ },
+ // 鎵撳嵃宸ュ崟
+ printOrder() {
+
+ },
+ // 閫夋嫨鎵撳嵃灏哄鐨勫ぇ灏忓�兼敼鍙�
+ printSizeChange(val) {
+ this.$nextTick(() => {
+ this.bindQRCode2(this.qrForm.qrvalue)
+ })
+ },
+ printMe2StylePadding(val) {
+ if (val === 0) {
+ return { paddingLeft: '10px', paddingTop: '5px' }
+ }
+ if (val === 5) {
+ return { paddingLeft: '15px', paddingTop: '7px' }
+ }
+ },
+
+ inbarcodeChange(val, item) {
+ // 褰� lastPrintArrSelected涓湭鏈夊綋鍓嶅嬀閫夌殑鍊兼槸 璧皃ush item 鍚﹀垯璧拌繃婊ゆ帀item
+ if (val) {
+ this.lastPrintArrSelected.push(item)
+ } else {
+ this.lastPrintArrSelected = this.lastPrintArrSelected.filter(i => i.inbarcode !== item.inbarcode)
+ }
+
+ // 鐢熶骇浜岀淮鐮�
+ this.$nextTick(() => {
+ this.lastPrintArrSelected.forEach((i, index) => {
+ console.log(i.inbarcode, 'i.inbarcode')
+ new QRCode(this.$refs.qrCodeDiv3[index], {
+ text: i.inbarcode,
+ width: 60,
+ height: 60,
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ })
+
+ // const div = document.getElementById('qrCode3')
+ // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶搴曢儴
+
+ this.$forceUpdate()
+ }, 500)
+ },
+ stepSelectedValueChange(val) {
+ // console.log(val, 123)
+ },
+ getSummaries(param) {
+ const { columns, data } = param
+ const sums = []
+ const i = 9
+ columns.forEach((column, index) => {
+ if (index === i) {
+ sums[index] = '鎬绘暟'
+ return
+ }
+ const values = data.map(item => Number(item[column.property]))
+ if (column.property === 'plan_qty') {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr)
+ if (!isNaN(value)) {
+ return prev + curr
+ // return Math.round(prev * 100) / 100 + Math.round(curr * 100) / 100
+ }
+ }, 0)
+
+ sums[index] += ' 鍗�'
+ }
+ })
+
+ this.$nextTick(() => {
+ this.$refs.tableDataRef.doLayout()
+ })
+ return sums
+ }
+ }
+}
+</script>
+<style>
+.sortable-ghost {
+ opacity: .8;
+ color: #fff !important;
+ background: #42b983 !important;
+}
+</style>
+<style lang="scss" scoped>
+$main_color: #42b983;
+
+.stepSelectedValueClass{
+ ::v-deep input{
+ //min-height: 34px !important;
+ height: 68px !important;
+ }
+}
+
+.dialogVisibleRoute {
+ .myCheckboxGroup {
+ display: flex;
+ flex-wrap: wrap;
+
+ .myCheckbox {
+ //border: 1px solid $main_color;
+ border: 1px solid #eee;
+ display: flex;
+ min-width: 100px;
+ padding: 10px;
+ margin: 10px 30px 0 0;
+ border-radius: 5px;
+ cursor: default;
+
+ .myCheckboxInput {
+ margin: 1px 5px 0 0;
+ cursor: pointer;
+ }
+
+ }
+
+ //.myCheckbox{
+ // border: 1px solid $main_color;
+ //}
+
+ input[type=checkbox] {
+ cursor: pointer;
+ position: relative;
+ width: 14px;
+ height: 14px;
+ font-size: 14px;
+ }
+
+ input[type=checkbox]::after {
+ position: absolute;
+ top: 0;
+ //color: rgb(130, 35, 35);
+ color: $main_color;
+ width: 14px;
+ height: 14px;
+ display: inline-block;
+ visibility: visible;
+ padding-left: 0px;
+ text-align: center;
+ content: ' ';
+ border-radius: 3px
+ }
+
+ input[type=checkbox]:checked::after {
+ //content: "鉁�";
+ content: "鈭�";
+ color: #fff;
+ font-size: 12px;
+ font-weight: bold;
+ background-color: $main_color;
+ }
+ }
+}
+
+.dialogVisibleRoute {
+ ::v-deep .el-dialog__body {
+ padding: 20px 20px !important;
+ }
+}
+
+.defaultroute_code ::v-deep .el-input__suffix-inner {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-top: -3px;
+}
+
+.el-date-editor {
+ font-size: 14px;
+}
+
+::v-deep .el-dialog__body {
+ padding: 20px 100px !important;
+}
+
+.sop {
+ ::v-deep .el-dialog__body {
+ padding: 50px 80px !important;
+ }
+}
+
+.dialogVisibleSearch ::v-deep .el-dialog__body {
+ padding: 20px 20px !important;
+}
+
+.dialogVisibleConfirmClass ::v-deep .el-dialog__body {
+ padding: 20px 20px !important;
+}
+
+::v-deep .el-table .caret-wrapper {
+ transform: scale(0.8);
+}
+
+::v-deep .el-button--text {
+ color: $main_color;
+ font-size: 14px;
+ cursor: pointer;
+}
+
+::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
+ margin: 10px 30px 0px 0;
+}
+
+.body ::v-deep .el-form-item {
+ margin-bottom: 0;
+}
+
+.elForm ::v-deep .el-form-item {
+ margin-bottom: 0;
+}
+
+.elTableDiv {
+ ::v-deep .el-radio__label {
+ display: none;
+ }
+
+}
+
+.el-table::before {
+ height: 0;
+}
+
+//.dialogVisibleConfirmClass >>>.el-table--border, .el-table--fit {
+// border-bottom: 2px solid #000 ;
+// //outline: #000 solid 2px !important;
+//}
+
+.tableDataPrint ::v-deep div.cell {
+ display: flex !important;
+ align-items: center !important;
+ justify-content: center !important;
+}
+
+.formContent {
+ width: 240px;
+}
+
+</style>
+
+<style media="print">
+/*@media print {*/
+@page {
+ size: auto;
+ margin: 3mm;
+}
+
+</style>
+<style>
+.formContent .el-form-item__label {
+ color: #000 !important;
+}
+</style>
+<!--鍏叡椤甸潰鏍峰紡-->
+<style lang="scss" scoped>
+$main_color: #42b983;
+
+::v-deep .el-range-input {
+ font-size: 14px !important;
+}
+
+::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-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 .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;
+}
+
+.userDialogVisible ::v-deep .el-form-item {
+ margin-bottom: 0;
+}
+
+.dateMini {
+ ::v-deep .el-input__inner {
+ line-height: 34px;
+ height: 34px;
+ width: 200px;
+ display: flex;
+ font-size: 14px !important;
+ align-items: center !important;
+ }
+
+ ::v-deep .el-input__prefix {
+ margin-top: -3px;
+ }
+
+ //::v-deep .el-range__icon{
+ // line-height: 28px;
+ //}
+}
+
+::v-deep .el-select__caret {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.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>
+<style>
+.sortable-ghost {
+ opacity: .8;
+ color: #fff !important;
+ background: #42b983 !important;
+}
diff --git a/src/views/workOrder/workOrderSend.vue b/src/views/workOrder/workOrderSend.vue
index 1ef759f..6a84a35 100644
--- a/src/views/workOrder/workOrderSend.vue
+++ b/src/views/workOrder/workOrderSend.vue
@@ -1,3449 +1,3513 @@
-<template>
- <div>
- <div class="body" :style="{height:mainHeight+'px'}">
-
- <!-- <div class="bodyTopButtonGroup" style="justify-content: space-between">-->
- <!-- <div style="display: flex">-->
- <!-- <!– <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>–>-->
- <!-- <!– <el-button v-waves type="success" icon="el-icon-connection" @click="send">娲惧彂</el-button>–>-->
- <!-- </div>-->
-
- <!-- <!– <el-button v-waves icon="el-icon-switch-button" @click="orderClose">鍏抽棴宸ュ崟</el-button>–>-->
- <!-- </div>-->
-
- <div class="bodyTopFormGroup" style="margin-top: 10px;">
- <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.wkshopcode"
- filterable
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in wkshopcodeArr"
- :key="item.torg_code"
- :label="item.torg_name"
- :value="item.torg_code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">
- <el-select
- v-model="form.mesorderstus"
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- disabled
- filterable
- @change="erporderstusChange"
- >
- <el-option
- v-for="item in erporderstusArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
- <el-input v-model="form.mesordercode" placeholder="璇疯緭鍏�" style="width: 200px" />
- </el-form-item>
- <el-form-item label="婧愬崟鍗曞彿" style="display: flex;">
- <el-input v-model="form.sourceorder" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="閿�鍞鍗�" style="display: flex;">
- <el-input v-model="form.saleordercode" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="鍗曟嵁绫诲瀷" style=" display: flex;">
- <el-select
- v-model="form.ordertype"
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <!-- @change="mesordertypeChange"-->
- <el-option
- v-for="item in ordertypeArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="浜у搧缂栫爜" style=" display: flex;">
- <el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
- <el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="浜у搧瑙勬牸" style=" display: flex;">
- <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="鍒涘缓浜哄憳" style=" display: flex;">
- <el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandForm" label="鍒涘缓鏃堕棿" style=" display: flex;">
- <!-- <el-date-picker-->
- <!-- v-model="form.createdate"-->
- <!-- type="daterange"-->
- <!-- :clearable="false"-->
- <!-- range-separator="~"-->
- <!-- start-placeholder="寮�濮嬫棩鏈�"-->
- <!-- end-placeholder="缁撴潫鏃ユ湡"-->
- <!-- size="mini"-->
- <!-- />-->
- <el-date-picker
- v-model="form.createdate"
- type="date"
- size="mini"
- :clearable="false"
- class="dateMini"
- format="yyyy-MM-dd"
- 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+80)+'px'"
- border
- :summary-method="getSummaries"
- show-summary
- :row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px'}"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- @sort-change="sortChange"
- @selection-change="handleSelectionChange"
- >
- <!-- @row-click="rowClick"-->
- <!-- <el-table-column-->
- <!-- type="selection"-->
- <!-- width="50"-->
- <!-- :selectable="selected"-->
- <!-- />-->
- <el-table-column
- prop="rowNum"
- width="50"
- label="搴忓彿"
- fixed
- />
- <el-table-column
- prop="status"
- label="宸ュ崟鐘舵��"
- sortable="custom"
- width="110"
- show-tooltip-when-overflow
- >
- <template slot-scope="{row}">
- <div v-if="row.status==='NEW'">鏂板伐鍗�</div>
- <!-- <div v-if="row.status==='CREATING'">鎵ц涓�</div>-->
- <!-- <div v-if="row.status==='CREATED'">宸插叧闂�</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="宸ュ崟缂栧彿"
- show-tooltip-when-overflow
- sortable="custom"
- min-width="160"
- />
- <el-table-column
- prop="m_po"
- label="婧愬崟鍗曞彿"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="160"
- >
- <template slot-scope="{row}">
- <div v-if="row.m_po">{{ row.m_po }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="saleOrderCode"
- label="閿�鍞鍗�"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="160"
- >
- <template slot-scope="{row}">
- <div v-if="row.saleOrderCode">{{ row.saleOrderCode }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="wotype"
- label="鍗曟嵁绫诲瀷"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="120"
- >
- <template slot-scope="{row}">
- <div v-if="row.wotype==='PO'">鏍囧噯宸ュ崟</div>
- <div v-else-if="row.wotype==='FO'">鎶ュ簾琛ュ崟</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="partcode"
- label="浜у搧缂栫爜"
- show-tooltip-when-overflow
- sortable="custom"
- min-width="120"
- />
- <el-table-column
- prop="partname"
- min-width="150"
- label="浜у搧鍚嶇О"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <el-table-column
- prop="partspec"
- label="浜у搧瑙勬牸"
- sortable="custom"
- width="110"
- show-tooltip-when-overflow
- >
- <template slot-scope="{row}">
- <div v-if="row.partspec">{{ row.partspec }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="plan_qty"
- label="宸ュ崟鏁�"
- sortable="custom"
- show-tooltip-when-overflow
- width="100"
- />
- <el-table-column
- prop="wkshp_name"
- label="鐢熶骇杞﹂棿"
- show-tooltip-when-overflow
- sortable="custom"
- width="120"
- >
- <template slot-scope="{row}">
- <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="saleOrderDeliveryDate"
- label="棰勮浜や粯鏃ユ湡"
- sortable="custom"
- width="130"
- >
- <template slot-scope="{row}">
- <div v-if="row.saleOrderDeliveryDate">{{ row.saleOrderDeliveryDate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- prop="data_sources"-->
- <!-- show-tooltip-when-overflow-->
- <!-- label="鏁版嵁鏉ユ簮"-->
- <!-- sortable="custom"-->
- <!-- width="120"-->
- <!-- />-->
-
- <el-table-column
- prop="lm_user"
- show-tooltip-when-overflow
- label="鍒涘缓浜哄憳"
- sortable="custom"
- width="120"
- />
- <el-table-column
- prop="lm_date"
- label="鍒涘缓鏃堕棿"
- show-tooltip-when-overflow
- width="160"
- sortable="custom"
- />
- <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"-->
- <!-- :style="{color:$store.state.settings.theme}"-->
- <!-- @click.stop="edit('edit',row)"-->
- <!-- />-->
- <!-- </el-tooltip>-->
-
- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
- <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click.stop="del(row)" />
- </el-tooltip>
-
- <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
- :style="{color:$store.state.settings.theme}"
- class="el-icon-printer"
- style="cursor: pointer;margin-right: 15px"
- @click.stop="handlePrint(row.wo_code)"
- />
- </el-tooltip>
-
- <el-tooltip class="item" effect="dark" content="璇︽儏" placement="top">
- <i
- class="el-icon-view"
- style="cursor: pointer;"
- :style="{color:$store.state.settings.theme}"
- @click.stop="edit('view',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,jumper"
- popper-class="select_bottom"
- @pagination="getMesOrderSearch"
- />
-
- <!-- <div class="elTableDiv">-->
- <!-- <el-table-->
- <!-- :data="tableDataDetail"-->
- <!-- border-->
- <!-- height="210px"-->
- <!-- :row-class-name="tableRowClassName"-->
- <!-- highlight-current-row-->
- <!-- :header-cell-style="this.$headerCellStyle"-->
- <!-- :cell-style="this.$cellStyle"-->
- <!-- >-->
- <!-- <!– <el-table-column–>-->
- <!-- <!– width="50"–>-->
- <!-- <!– type="index"–>-->
- <!-- <!– prop="搴忓彿"–>-->
- <!-- <!– fixed–>-->
- <!-- <!– /> –>-->
- <!-- <el-table-column-->
- <!-- width="50"-->
- <!-- prop="seq"-->
- <!-- label="搴忓彿"-->
- <!-- fixed-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- prop="wo_code"-->
- <!-- show-tooltip-when-overflow-->
- <!-- label="宸ュ崟缂栧彿"-->
- <!-- width="160"-->
- <!-- />-->
-
- <!-- <!– <el-table-column–>-->
- <!-- <!– prop="partcode"–>-->
- <!-- <!– label="浜у搧缂栫爜"–>-->
- <!-- <!– width="150"–>-->
- <!-- <!– show-tooltip-when-overflow–>-->
- <!-- <!– />–>-->
- <!-- <!– <el-table-column–>-->
- <!-- <!– prop="partname"–>-->
- <!-- <!– label="浜у搧鍚嶇О"–>-->
- <!-- <!– width="200"–>-->
- <!-- <!– show-tooltip-when-overflow–>-->
- <!-- <!– />–>-->
-
- <!-- <el-table-column-->
- <!-- label="宸ュ簭缂栫爜"-->
- <!-- prop="step_code"-->
- <!-- show-tooltip-when-overflow-->
- <!-- width="150"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="宸ュ簭鍚嶇О"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="stepname"-->
- <!-- width="150"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="宸茬敓浜ф暟閲�"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="produceq_qty"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="鍚堟牸鏁伴噺"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="good_qty"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="涓嶈壇鏁伴噺"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="ng_qty"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="宸ュ簾鏁伴噺"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="laborbad_qty"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="鏂欏簾鏁伴噺"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="materielbad_qty"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- label="寰呬骇鏁伴噺"-->
- <!-- show-tooltip-when-overflow-->
- <!-- prop="delive_qty"-->
- <!-- />-->
- <!-- <!– <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–>-->
- <!-- <!– v-if="tableDataDetail.length!==row.seq"–>-->
- <!-- <!– class="el-icon-printer"–>-->
- <!-- <!– :style="{color:$store.state.settings.theme}"–>-->
- <!-- <!– style="cursor: pointer;margin-right: 15px"–>-->
- <!-- <!– @click="supplementSmallClick(row)"–>-->
- <!-- <!– />–>-->
- <!-- <!– </el-tooltip>–>-->
- <!-- <!– <el-tooltip class="item" effect="dark" content="琛ユ墦鐢熶骇鍏ュ簱鏉$爜" placement="top">–>-->
- <!-- <!– <i–>-->
- <!-- <!– v-if="tableDataDetail.length===row.seq"–>-->
- <!-- <!– class=" el-icon-camera"–>-->
- <!-- <!– :style="{color:$store.state.settings.theme}"–>-->
- <!-- <!– style="cursor: pointer;margin-right: 15px"–>-->
- <!-- <!– @click="getProductInHouseLabCode(row.wo_code)"–>-->
- <!-- <!– />–>-->
- <!-- <!– </el-tooltip>–>-->
- <!-- <!– </div>–>-->
- <!-- <!– </template>–>-->
- <!-- <!– </el-table-column>–>-->
- <!-- </el-table>-->
- <!-- </div>-->
- </div>
- <!--鏂板娲惧彂瀵硅瘽妗�-->
- <el-dialog
- v-el-drag-dialog
- :title="operation==='add'?'鏂板':'娲惧彂'"
- :visible.sync="dialogVisible"
- width="1200px"
- top="8vh"
- :close-on-click-modal="false"
- @closed="handleClose"
- @close="handleClose"
- >
- <el-form
- ref="dialogForm"
- inline
- :rules="dialogFormRules"
- :model="dialogForm"
- label-width="110px"
- >
-
- <el-divider content-position="left">鍩烘湰淇℃伅</el-divider>
-
- <el-form-item
- label="宸ュ崟鐘舵��"
- prop="mesorderstus"
- >
- <el-select
- v-model="dialogForm.mesorderstus"
- disabled
- filterable
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in erporderstusArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
-
- <el-form-item label="宸ュ崟缂栧彿" prop="mesordercode">
- <!-- <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px" />-->
- <el-input v-model="dialogForm.mesordercode" disabled style="width: 200px" />
- </el-form-item>
- <!-- <div style="display: flex">-->
- <el-form-item label="宸ュ崟绫诲瀷" prop="mesorderstus">
- <el-select
- v-model="dialogForm.ordertype"
- :popper-append-to-body="false"
- style="width: 200px"
- :disabled="operation!=='add'"
- placeholder="璇烽�夋嫨"
- @change="mesordertypeChange"
- >
- <el-option
- v-for="item in ordertypeArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <!-- <div style="display: flex;flex-wrap: nowrap">-->
- <el-form-item label="婧愬崟鍗曞彿">
- <el-input
- v-model="dialogForm.sourceorder"
- :disabled="dialogForm.ordertype==='PO'"
- style="width: 200px"
- >
- <el-button
- slot="append"
- icon="el-icon-search"
- :disabled="operation!=='add'||dialogForm.ordertype==='PO'"
- @click="mesordertsourcesearchclick"
- />
- </el-input>
- </el-form-item>
- <!-- <el-button-->
- <!-- v-waves-->
- <!-- type="primary"-->
- <!-- style="padding: 0 10px;margin-left: -8px;margin-top: 3px"-->
- <!-- class="el-icon-search"-->
- <!-- :disabled="operation!=='add'||dialogForm.ordertype==='PO'"-->
- <!-- @click="mesordertsourcesearchclick"-->
- <!-- />-->
- <!-- </div>-->
- <!-- </div>-->
- <el-form-item label="宸ュ崟鏁伴噺" prop="mesqty">
- <el-input
- v-model="dialogForm.mesqty"
- oninput="value=value.replace(/[^\d]/g,'')"
- style="width: 200px"
- />
- <!-- oninput="value=value.replace(/[^0-9*.{1}0-9*]/g,'')"-->
- </el-form-item>
- <el-form-item
- label="浜у搧鍚嶇О/缂栫爜"
- prop="partcode"
- >
- <el-select
- v-model="dialogForm.partcode"
- filterable
- :disabled="operation!=='add'"
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- @change="partcodeChangeDialog"
- >
- <el-option
- v-for="item in partArr"
- :key="item.partcode"
- :label="item.partname+'/'+item.partcode"
- :value="item.partcode"
- />
- </el-select>
- </el-form-item>
- <!-- <el-form-item v-if="operation!=='add'" label="浜у搧鍚嶇О" prop="partname">-->
- <!-- <el-input v-model="dialogForm.partname" disabled style="width: 200px" />-->
- <!-- </el-form-item>-->
- <!-- <el-form-item v-if="operation!=='add'" label="浜у搧缂栫爜">-->
- <!-- <el-input v-model="dialogForm.partcode" disabled style="width: 200px" />-->
- <!-- </el-form-item>-->
- <el-form-item label="浜у搧瑙勬牸" prop="partspec">
- <el-input v-model="dialogForm.partspec" disabled style="width: 200px" />
- </el-form-item>
- <!-- :disabled="dialogForm.partcode===''"-->
- <el-form-item label="鎵�灞炶溅闂�" prop="wkshopcode">
- <el-select
- v-model="dialogForm.wkshopcode"
- filterable
- :popper-append-to-body="false"
- style="width: 200px;"
- placeholder="璇烽�夋嫨杞﹂棿"
- >
- <el-option
- v-for="item in wkshopArr"
- :key="item.torg_code"
- :label="item.torg_name"
- :value="item.torg_code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="棰勮浜や粯鏃ユ湡" prop="deliverydate">
- <el-date-picker
- v-model="dialogForm.deliverydate"
- type="date"
- size="mini"
- :clearable="false"
- class="dateMini"
- :picker-options="pickerOptions"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- />
- <!-- :disabled="dialogForm.deliverydate"-->
- </el-form-item>
-
- <el-divider content-position="left">宸ュ簭淇℃伅</el-divider>
-
- <div style="display: flex;align-items: center">
- <!-- <div style="font-weight: bolder">宸ュ簭閫夋嫨锛�</div>-->
- <!-- <el-drag-select-->
- <!-- v-model="stepSelectedValue"-->
- <!-- style="width:930px;"-->
- <!-- multiple-->
- <!-- placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"-->
- <!-- @change="stepSelectedValueChange"-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="item in stepSelectArr"-->
- <!-- :key="item.stepcode"-->
- <!-- :label="item.stepname"-->
- <!-- :value="item.stepcode"-->
- <!-- />-->
- <!-- </el-drag-select>-->
- </div>
-
- <el-table
- ref="stepTableDataRef"
- :data="stepTableData"
- border
- :row-class-name="tableRowClassName"
- height="300"
- style="width: 100%;margin-top: 15px;"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- row-key="stepcode"
- >
- <el-table-column
- type="index"
- label="搴忓彿"
- width="50"
- />
- <!-- <el-table-column-->
- <!-- prop="stepcode"-->
- <!-- show-tooltip-when-overflow-->
- <!-- label="宸ュ簭缂栫爜"-->
- <!-- />-->
- <el-table-column
- prop="stepname"
- label="宸ュ簭鍚嶇О"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="stepprice"
- label="鐢熶骇鍗曚环"
- show-tooltip-when-overflow
- >
- <!-- <template slot-scope="{row}">-->
- <!-- <el-input-->
- <!-- v-model="row.stepprice"-->
- <!-- placeholder="璇疯緭鍏ュ伐搴忓崟浠�"-->
- <!-- oninput="value=value.replace(/[^0-9.]/g,'')"-->
- <!-- style="width: 100%"-->
- <!-- @click.stop=""-->
- <!-- />-->
- <!-- </template>-->
- </el-table-column>
- <el-table-column
- prop="produceq_qty"
- label="宸茬敓鎴愭暟閲�"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="good_qty"
- label="鍚堟牸鏁伴噺"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="ng_qty"
- label="涓嶈壇鏁伴噺"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="laborbad_qty"
- label="宸ュ簾鏁伴噺"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="materielbad_qty"
- label="鏂欏簾鏁伴噺"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="delive_qty"
- label="寰呬骇鏁伴噺"
- show-tooltip-when-overflow
- />
- <!-- <el-table-column-->
- <!-- label="鎿嶄綔"-->
- <!-- width="120"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div class="operationClass">-->
- <!-- <!– <el-tooltip class="item" effect="dark" content="绉诲姩" placement="top">–>-->
- <!-- <i-->
- <!-- class="el-icon-rank"-->
- <!-- :style="{color:$store.state.settings.theme}"-->
- <!-- style="cursor: move"-->
- <!-- />-->
- <!-- <!– </el-tooltip>–>-->
- <!-- <!– @click="edit('edit',row)"–>-->
-
- <!-- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">-->
- <!-- <i-->
- <!-- class="el-icon-delete"-->
- <!-- :style="{color:$store.state.settings.theme}"-->
- <!-- style="margin-left: 15px;"-->
- <!-- @click="stepDel(row)"-->
- <!-- />-->
- <!-- </el-tooltip>-->
- <!-- </div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- </el-table>
-
- </el-form>
-
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">棰勮</el-button>-->
- <el-button
- v-if="operation!=='view'"
- v-waves
- type="primary"
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- @click="dialogVisibleConfirm"
- >纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!-- 宸ュ簭浠诲姟瀵硅瘽妗�-->
- <el-dialog
- v-el-drag-dialog
- title="宸ュ簭浠诲姟"
- :visible.sync="dialogVisibleTask"
- width="840px"
- top="15vh"
- class="dialogVisibleSearch"
- :close-on-click-modal="false"
- @close="dialogVisibleTaskClose"
- >
- <el-button
- v-waves
- style="margin-bottom: 15px"
- type="primary"
- @click="supplementClick"
- >琛ユ墦
- </el-button>
- <el-table
- :data="taskTableData"
- border
- :row-class-name="tableRowClassName"
- height="300"
- style="width: 100%;"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- >
- <el-table-column
- prop="seq"
- width="50"
- label="搴忓彿"
- fixed
- />
- <el-table-column
- prop="wo_code"
- show-tooltip-when-overflow
- label="宸ュ崟缂栧彿"
- width="200"
- />
- <el-table-column
- prop="stepcode"
- label="宸ュ簭缂栫爜"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="stepname"
- show-tooltip-when-overflow
- label="宸ュ簭鍚嶇О"
- />
- <!-- <el-table-column-->
- <!-- prop="flwtype"-->
- <!-- label="宸ュ簭绫诲瀷"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.flwtype==='W'">澶栧崗</div>-->
- <!-- <div v-if="row.flwtype==='Z'">鑷埗</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- prop="descr"-->
- <!-- label="宸ュ簭鎻忚堪"-->
- <!-- />-->
- <el-table-column
- prop="plan_qty"
- show-tooltip-when-overflow
- label="浠诲姟鏁伴噺"
- />
- <el-table-column
- prop="good_qty"
- show-tooltip-when-overflow
- label="鍚堟牸鏁伴噺"
- />
- <el-table-column
- prop="ng_qty"
- show-tooltip-when-overflow
- label="涓嶈壇鏁伴噺"
- />
- <el-table-column
- label="鎿嶄綔"
- fixed="right"
- >
- <template slot-scope="{row}">
- <el-button v-waves type="text" style="padding: 0;" @click="supplementSmallClick(row)">琛ユ墦</el-button>
- </template>
- </el-table-column>
- </el-table>
-
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleBack">杩� 鍥�</el-button>
- <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
- </div>
- </span>
- </el-dialog>
-
- <!-- 婧愬崟鍗曞彿瀵硅瘽妗�-->
- <el-dialog
- v-el-drag-dialog
- title="婧愬崟鍗曞彿"
- :visible.sync="dialogVisibleSource"
- width="1200px"
- top="10vh"
- class="dialogVisibleSearch"
- :close-on-click-modal="false"
- @close="dialogVisibleSourceClose"
- >
- <div class="bodyTopFormGroup">
- <el-form
- ref="sourceForm"
- :model="sourceForm"
- label-width="100px"
- inline
- style="display: flex;justify-content: space-between"
- >
- <div class="elForm" style="justify-content: flex-start">
- <!-- <el-form-item-->
- <!-- label="棰勮寮�宸ユ椂闂�"-->
- <!-- label-width="100px"-->
- <!-- style=" display: flex;font-size: 14px;margin-top: 3px"-->
- <!-- >-->
- <!-- <el-date-picker-->
- <!-- v-model="sourceForm.paystartdate"-->
- <!-- type="daterange"-->
- <!-- range-separator="~"-->
- <!-- class="timeMini"-->
- <!-- size="mini"-->
- <!-- style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"-->
- <!-- :clearable="false"-->
- <!-- start-placeholder="寮�濮嬫棩鏈�"-->
- <!-- end-placeholder="缁撴潫鏃ユ湡"-->
- <!-- />-->
- <!-- <!– :picker-options="expireTimeOption"–>-->
-
- <!-- </el-form-item>-->
- <!-- <el-form-item-->
- <!-- label="棰勮瀹屽伐鏃堕棿"-->
- <!-- label-width="100px"-->
- <!-- style=" display: flex;font-size: 14px;margin-top: 3px"-->
- <!-- >-->
- <!-- <el-date-picker-->
- <!-- v-model="sourceForm.payenddate"-->
- <!-- type="daterange"-->
- <!-- :clearable="false"-->
- <!-- class="timeMini"-->
- <!-- range-separator="~"-->
- <!-- start-placeholder="寮�濮嬫棩鏈�"-->
- <!-- style="width: 200px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;"-->
- <!-- end-placeholder="缁撴潫鏃ユ湡"-->
- <!-- size="mini"-->
- <!-- />-->
- <!-- </el-form-item>-->
- <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">
- <el-select
- v-model="sourceForm.mesordercode"
- filterable
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in erporderstusArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
- <el-input v-model="sourceForm.sourceorder" placeholder="璇疯緭鍏�" style="width: 200px" />
- </el-form-item>
- <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
- <el-input v-model="sourceForm.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
-
- <el-form-item v-show="isExpandDialog" label="浜у搧鍚嶇О" style=" display: flex;">
- <el-input v-model="sourceForm.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandDialog" label="浜у搧瑙勬牸" style=" display: flex;">
- <el-input v-model="sourceForm.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
- <el-form-item v-show="isExpandDialog" label="鍒涘缓浜哄憳" style=" display: flex;">
- <el-input v-model="sourceForm.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
-
- <el-form-item
- v-show="isExpandDialog"
- label="鍒涘缓鏃堕棿"
- label-width="100px"
- style=" display: flex;font-size: 14px;margin-top: 3px"
- >
- <el-date-picker
- v-model="sourceForm.createdate"
- type="daterange"
- range-separator="~"
- class="timeMini"
- size="mini"
- style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"
- :clearable="false"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡"
- />
- <!-- :picker-options="expireTimeOption"-->
-
- </el-form-item>
-
- </div>
-
- <div style="display: flex;align-items: start;margin-top: 3px;z-index: 2;justify-content: end">
- <el-button v-waves type="primary" icon="el-icon-search" @click="sourceSearch">鏌ヨ</el-button>
- <el-button v-waves type="info" icon="el-icon-refresh" @click="sourceReset">閲嶇疆</el-button>
- </div>
-
- </el-form>
- <div
- class="bodyTopFormExpand"
- >
- <svg-icon
- v-show="mouseHoverTypeDialog==='mouseout'"
- style="cursor: pointer"
- :icon-class="!isExpandDialog?'doubleDown3':'doubleUp3'"
- @mouseenter="mouseHoverTypeDialog=$event.type"
- />
- <svg-icon
- v-show="mouseHoverTypeDialog==='mouseenter'"
- style="cursor: pointer"
- :icon-class="!isExpandDialog?'doubleDown':'doubleUp'"
- @click="isExpandDialog=!isExpandDialog"
- @mouseout="mouseHoverTypeDialog=$event.type"
- />
- </div>
- </div>
-
- <div class="elTableDiv">
- <el-table
- :data="sourceTableData"
- :height="isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px'"
- border
- :row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px',}"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- @sort-change="sourceSortChange"
- @row-click="getCurrentRowSource"
- >
- <!-- <el-table-column-->
- <!-- type="selection"-->
- <!-- width="50"-->
- <!-- />-->
- <el-table-column
- width="50"
- fixed
- >
- <template slot-scope="{row}">
- <el-radio
- v-model="radioSelectedId"
- :label="row.id"
- style="color: transparent;padding-left: 10px;"
- />
- <!-- @change.native="getCurrentRowSource(row.id)"-->
- </template>
- </el-table-column>
- <el-table-column
- prop="RowNum"
- width="50"
- fixed
- label="搴忓彿"
- />
- <!-- <el-table-column-->
- <!-- prop="status"-->
- <!-- label="宸ュ崟鐘舵��"-->
- <!-- show-tooltip-when-overflow-->
- <!-- sortable="custom"-->
- <!-- width="110"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.status==='NEW'">鏂拌鍗�</div>-->
- <!-- <div v-if="row.status==='CREATING'">閮ㄥ垎涓嬭揪</div>-->
- <!-- <div v-if="row.status==='CREATED'">鍏ㄩ儴涓嬭揪</div>-->
- <!-- <div v-if="row.status==='CLOSED'">宸插叧闂�</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- label="宸ュ崟缂栧彿"
- prop="wo_code"
- show-tooltip-when-overflow
- min-width="150"
- sortable="custom"
- >
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.m_po">{{ row.m_po }}</div>-->
- <!-- <div v-else>{{ row.wo_code }}</div>-->
- <!-- </template>-->
- </el-table-column>
- <el-table-column
- prop="partcode"
- label="浜у搧缂栫爜"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="150"
- />
- <el-table-column
- prop="partname"
- label="浜у搧鍚嶇О"
- sortable="custom"
- show-tooltip-when-overflow
- min-width="150"
- />
- <el-table-column
- prop="partspec"
- label="浜у搧瑙勬牸"
- show-tooltip-when-overflow
- sortable="custom"
- min-width="110"
- >
- <template slot-scope="{row}">
- <div v-if="row.partspec">{{ row.partspec }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="plan_qty"
- label="浠诲姟鏁伴噺"
- width="150"
- show-tooltip-when-overflow
- sortable="custom"
- />
-
- <el-table-column
- prop="bad_qty"
- label="鎶ュ簾鏁伴噺"
- width="150"
- show-tooltip-when-overflow
- sortable="custom"
- />
-
- <!-- <el-table-column-->
- <!-- prop="relse_qty"-->
- <!-- show-tooltip-when-overflow-->
- <!-- label="宸蹭笅鍗曟暟閲�"-->
- <!-- width="150"-->
- <!-- sortable="custom"-->
- <!-- />-->
- <el-table-column
- prop="wkshp_name"
- label="鐢熶骇杞﹂棿"
- show-tooltip-when-overflow
- sortable="custom"
- width="150"
- >
- <template slot-scope="{row}">
- <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="plan_startdate"
- label="棰勮寮�宸ユ椂闂�"
- show-tooltip-when-overflow
- sortable="custom"
- width="130"
- >
- <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
- sortable="custom"
- width="130"
- >
- <template slot-scope="{row}">
- <div v-if="row.plan_enddate">{{ row.plan_enddate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="lm_user"
- label="鍒涘缓浜哄憳"
- show-tooltip-when-overflow
- sortable="custom"
- width="150"
- >
- <template slot-scope="{row}">
- <div v-if="row.lm_user">{{ row.lm_user }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="lm_date"
- label="鍒涘缓鏃堕棿"
- show-tooltip-when-overflow
- width="130"
- 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-->
- <!-- label="鎿嶄綔"-->
- <!-- fixed="right"-->
- <!-- width="80"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div class="operationClass">-->
- <!-- <el-tooltip class="item" effect="dark" content="涓嬭揪" placement="top">-->
- <!-- <!– <el-button v-waves type="text" @click="edit('edit',row)">涓嬭揪</el-button>–>-->
- <!-- <i-->
- <!-- class="el-icon-bottom"-->
- <!-- style="color:#42b983;cursor: pointer;margin-left: 5px"-->
- <!-- @click="edit('edit',row)"-->
- <!-- />-->
- <!-- </el-tooltip>-->
- <!-- </div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- </el-table>
- </div>
- <!--鍒嗛〉-->
- <pagination
- :total="sourceFormTotal"
- :page.sync="sourceForm.page"
- :limit.sync="sourceForm.rows"
- align="right"
- layout="total,prev, pager, next,sizes"
- popper-class="select_bottom"
- @pagination="getMesBadOrderSearch"
- />
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleSourceBack">杩� 鍥�</el-button>
- <el-button v-waves type="primary" @click="dialogVisibleSourceConfirm">纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!--鎵撳嵃棰勮瀵硅瘽妗� 澶ф爣绛�-->
- <el-dialog
- v-el-drag-dialog
- title=""
- :visible.sync="dialogVisibleApprove"
- width="812px"
- class="dialogVisibleConfirmClass"
- append-to-body
- :close-on-click-modal="false"
- @close="dialogVisibleConfirmClose"
- >
- <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
- <div id="printMe" style="padding: 30px">
- <div style="font-size: 26px; text-align: center">娴佺▼鍗�</div>
-
- <div style="display: flex;justify-content: space-around;margin-top: 20px; position: relative;">
- <div style="width: 78%">
- <el-form
- ref="formApprove"
- :model="formApprove"
- label-width="80px"
- inline
- style="display: flex;justify-content: space-between"
- >
- <div class="elForm">
- <el-form-item label="宸ュ崟缂栧彿:" class="formContent">
- {{ formApprove.mesordercode }}
- </el-form-item>
- <el-form-item label="婧愬崟鍗曞彿:" class="formContent">
- {{ formApprove.m_po }}
- </el-form-item>
- <el-form-item label="浜у搧缂栫爜:" class="formContent">
- {{ formApprove.partcode }}
- </el-form-item>
- <el-form-item label="浜у搧鍚嶇О:" class="formContent">
- {{ formApprove.partname }}
- </el-form-item>
- <el-form-item label="浜у搧瑙勬牸:" class="formContent">
- {{ formApprove.partspec }}
- </el-form-item>
- <el-form-item label="宸ュ崟鏁伴噺:" class="formContent">
- {{ formApprove.plan_qty }}
- </el-form-item>
- <!-- <el-form-item label="宸ヨ壓璺嚎:" class="formContent">-->
- <!-- {{ formApprove.routename }}-->
- <!-- </el-form-item>-->
- <el-form-item label="鎵撳嵃浜哄憳:" class="formContent">
- <!-- {{ localStorage.getItem('username') }}-->
- {{ formApprove.routename }}
- </el-form-item>
- <el-form-item label="鎵撳嵃鏃堕棿:" class="formContent">
- {{ formApprove.lm_date }}
- </el-form-item>
- </div>
- </el-form>
- </div>
- <div
- id="qrCode"
- style="width: 22%;height:90px;
- margin-top: 20px;
- overflow-y: scroll;display: flex;
- justify-content: center;
- position: relative;"
- >
- <div id="qrCode0" ref="qrCodeDiv0" />
- </div>
- <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />
- <div
- style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"
- />
- </div>
-
- <!-- <div style="width:100%;height: 30px;border-bottom: 1px solid #eee;margin-bottom: 20px" />-->
- <el-table
- id="table"
- :data="tableDataPrint"
- border
- class="tableDataPrint"
- :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000'}"
- :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000'}"
- style="width: 100%;margin-top: 20px;text-align: center;border-color: #000"
- >
- <el-table-column
- id="column0"
- prop="seq"
- label="宸ュ簭鍙�"
- width="70"
- align="center"
- />
- <el-table-column
- id="column1"
- prop="stepqrcode"
- label="宸ュ簭浜岀淮鐮�"
- width="100"
- align="center"
- >
- <template slot-scope="{row}">
- <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" class="tableColumn" />
- </template>
- </el-table-column>
- <el-table-column
- id="column2"
- prop="stepname"
- label="宸ュ簭"
- width="120"
- align="center"
- />
- <el-table-column
- id="column3"
- prop="plan_qty"
- label="鍔犲伐鏁伴噺"
- width="100"
- align="center"
- />
- <el-table-column
- id="column4"
- prop="good_qty"
- width="100"
- align="center"
- label="鍚堟牸鏁伴噺"
- />
- <el-table-column
- id="column5"
- width="100"
- prop="ng_qty"
- align="center"
- label="涓嶈壇鏁伴噺"
- />
- <el-table-column
- id="column6"
- prop="desc"
- align="center"
- width="120"
- label="澶囨敞"
- />
- </el-table>
- </div>
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleBackPreview">杩� 鍥�</el-button>
- <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
- <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�/鎵� 鍗�</el-button>-->
- <el-button v-waves v-print="printObj" type="primary">鎵� 鍗�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!--鎵撳嵃棰勮椤甸潰 灏忔爣绛�-->
- <el-dialog
- v-el-drag-dialog
- title="棰勮"
- :visible.sync="dialogVisible2"
- width="1000"
- top="10vh"
- :close-on-click-modal="false"
- @close="dialogVisible2Close"
- >
- <div style="height: 650px;overflow:auto;">
- <!-- 涓嬫媺妗嗛�夋嫨鎵撳嵃灏哄-->
- <div v-if="!isLastPrint" style="display: flex;align-items: center;margin: 0 0 20px 0">
- <div>閫夋嫨鎵撳嵃灏哄锛�</div>
- <el-select
- v-model="printSize"
- :popper-append-to-body="false"
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- @change="printSizeChange"
- >
-
- <el-option
- v-for="item in printSizeSelectArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </div>
- <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
- <!-- <div id="printMe2" :style="{paddingLeft:'10px',paddingTop: '5px'}">-->
- <div v-if="!isLastPrint" :style="printMe2StylePadding(printSize)">
- <!-- 80 * 50-->
- <div
- v-if="printSize===0"
- style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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;">涓嬮亾宸ュ簭:</div>
- <div>{{ qrForm.nextstepname }}</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>
- <!-- 78 * 60 -->
- <div
- v-if="printSize===1"
- style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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;">涓嬮亾宸ュ簭:</div>
- <div>{{ qrForm.nextstepname }}</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>
- <!-- 60 * 40 -->
- <div
- v-if="printSize===2"
- style="display: flex;width: 220px;height: 130px;border: 1px solid #000;text-align: center;font-size: 12px"
- >
-
- <div style="width: 70px;display: flex;flex-direction: column;border-right: 1px solid #000">
- <div
- style="display: flex;height: 60%;border-bottom:1px solid #000;
- justify-content: center;align-items: center;position: relative"
- >
- <div
- id="qrCode2"
- ref="qrCodeDiv2"
- style="overflow-y: hidden;height:71%;position: absolute;left: 7px;"
- />
- </div>
- <div
- style="display: flex;height: 20%;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
- >
- <div style="margin-left: 3px; ">鏁伴噺:{{ qrForm.startqty }}</div>
- </div>
- <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;">
- <div style="margin-left: 3px; ">鎿嶄綔:{{ qrForm.operator }}</div>
-
- </div>
- </div>
-
- <div style="width:150px;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="margin-left: 3px;">缂栧彿:{{ 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="margin-left: 3px;">浜у搧缂栫爜:{{ 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="margin-left: 3px;">浜у搧鍚嶇О:{{ 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="margin-left: 3px;">涓嬮亾宸ュ簭:{{ qrForm.nextstepname }}</div>
-
- </div>
- <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
- <div style=" margin-left: 3px;">鏃堕棿: {{ qrForm.operatorTime }}</div>
- <!-- <div>{{ qrForm.operatorTime?qrForm.operatorTime.substring(5):'' }}</div>-->
- <!-- <div>{{ qrForm.operatorTime }}</div>-->
- </div>
-
- </div>
-
- </div>
- <div
- v-if="printSize===5"
- style="display: flex;width: 140px;height: 80px;border: 1px solid #000;text-align: center;font-size: 10px;"
- >
-
- <div v-if="false" style="width: 45px;display: flex;flex-direction: column;border-right: 1px solid #000">
- <div
- style="display: flex;height: 60px;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: 20px;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: 20px;justify-content: flex-start;align-items: center">
- <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
- {{ qrForm.operator }}
- </div>
- </div>
-
- <div style="width:100%;display: flex;flex-direction: column;">
- <div
- style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: center;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: center;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: center;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: center;align-items: center;text-align: left"
- >
- <!-- <div style="width:60px;margin-left: 5px;">涓嬮亾宸ュ簭:</div>-->
- <div>{{ qrForm.nextstepname }}</div>
- </div>
- <div style="display: flex;height: 20%;justify-content: center;align-items: center;text-align: left">
- <!-- <div style="width: 60px;margin-left: 5px;">澶勭悊鏃堕棿:</div>-->
- <div>{{ qrForm.operatorTime }}</div>
- </div>
-
- </div>
-
- </div>
- </div>
-
- <div v-if="isLastPrint" style="display: flex;flex-direction: column">
-
- <div style="display: flex;font-weight: bold;font-size: 16px;margin-bottom: 20px;">
- <div style="width: 48%;">
- 璇烽�夋嫨鍏ュ簱鏉$爜
- </div>
- <div style="width: 48%;margin-left: 4%;">
- 宸查�変腑鐨勫叆搴撴潯鐮�
- </div>
- </div>
-
- <div style="display: flex;">
- <!-- 璇烽�夋嫨鍏ュ簱鏉$爜-->
- <div style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;">
- <div
- v-for="(item,index) in lastPrintArr"
- :key="item.inbarcode"
- :style="{marginTop:index===0?'':'15px'}"
- style="display: flex;align-items: center;"
- >
-
- <!-- v-if="printSize===0"-->
- <div style="margin-right:40px">
- <el-checkbox
- :key="item.inbarcode"
- v-model="item.checked"
- @change="val=>inbarcodeChange(val,item)"
- />
- </div>
- <div
- style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
- >
- <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
- {{ item.good_qty }}
- </div>
- <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
- <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
- {{ item.username }}
- </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>{{ item.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>{{ item.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>{{ item.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;">浜у搧瑙勬牸:</div>
- <div>{{ item.partspec ? item.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>{{ item.lm_date }}</div>
- </div>
-
- </div>
-
- </div>
-
- </div>
- </div>
-
- <!-- 宸查�変腑鐨勫叆搴撴潯鐮�-->
- <div
- style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;margin-left: 50px;"
- >
- <div id="printMe2">
- <div
- v-for="(item,index) in lastPrintArrSelected"
- v-if="item.checked"
- :key="item.inbarcode"
- :style="{marginTop:index===0?'':'15px'}"
- style="display: flex;align-items: center;"
- >
- <div
- style="display: flex;width: 280px;height: 160px;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: 96px;border-bottom:1px solid #000;
- justify-content: center;align-items: center;position: relative"
- >
- <div
- id="qrCode3"
- ref="qrCodeDiv3"
- style="overflow-y: hidden;height:60px;position: absolute;left: 14px;"
- />
- </div>
- <div
- style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
- >
- <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
- {{ item.good_qty }}
- </div>
- <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
- <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
- {{ item.username }}
- </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>{{ item.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>{{ item.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>{{ item.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;">浜у搧瑙勬牸:</div>
- <div>{{ item.partspec ? item.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>{{ item.lm_date }}</div>
- </div>
-
- </div>
-
- </div>
-
- </div>
- </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
- :close-on-click-modal="false"
- title="鍏宠仈宸ヨ壓璺嚎"
- :visible.sync="dialogVisibleRoute"
- width="800px"
- top="10vh"
- :fullscreen="isIpad"
- class="dialogVisibleRoute"
- @closed="handleCloseRoute"
- @close="handleCloseRoute"
- >
- <div>
- <i class="el-icon-s-comment" style="color:#42b983;" /> 浜у搧鍚嶇О锛歿{ dialogFormRoute.projectName }}
- </div>
- <el-divider />
- <div style="margin-bottom: 10px">
- <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ヨ壓璺嚎闆嗗悎
- </div>
-
- <div class="myCheckboxGroup">
- <div
- v-for="item in dialogFormRoute.routeOperationArr"
- :key="item.code"
- :style="{border:item.isSelected1?'1px solid #42b983':'1px solid #eee'}"
- class="myCheckbox"
- @click="myCheckboxClick(item)"
- >
- <input
- class="myCheckboxInput"
- type="checkbox"
- :value="item.code"
- :name="item.name"
- :style="{color:item.isSelected2?'#42b983':'#fff'}"
- @click="myCheckboxInputClick(item)"
- >{{ item.name }}
- <!-- 鐖跺瓙鐐瑰嚮浜嬩欢涓嶅奖鍝�-->
- <!-- onClick="event.cancelBubble = true"-->
- </div>
- </div>
-
- <el-divider />
- <div>
- <i class="el-icon-s-operation" style="color:#42b983;" /> 榛樿宸ヨ壓璺嚎
- </div>
- <div style="margin-top: 20px">
- <el-select
- v-model="defaultroute_code"
- filterable
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- class="defaultroute_code"
- >
- <el-option
- v-for="item in defaultroute_codeArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </div>
- <el-divider />
- <div style="margin-bottom: 10px">
- <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ュ簭鍒楄〃
- </div>
- <div style="overflow-y: scroll">
- <el-table
- ref="projectTableData"
- :data="projectTableData"
- border
- height="280"
- :row-class-name="tableRowClassName"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- >
- <el-table-column
- prop="seq"
- width="100"
- label="宸ュ簭搴忓彿"
- fixed
- />
- <el-table-column
- prop="stepcode"
- label="宸ュ簭缂栫爜"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="stepname"
- label="宸ュ簭鍚嶇О"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="enable"
- label="鍚敤鐘舵��"
- fixed="right"
- >
- <template slot-scope="{row}">
- <div v-if="row.enable==='Y'">
- <svg-icon icon-class="circleYes" style="margin-right: 2px" />
- 鏄�
- </div>
- <div v-if="row.enable==='N'">
- <svg-icon icon-class="circleNo" style="margin-right: 2px" />
- 鍚�
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="routeDialogVisibleCancel">鍙� 娑�</el-button>
- <el-button v-waves type="primary" @click="routeDialogVisibleConfirm">纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- </div>
-</template>
-
-<script>
-import Pagination from '@/components/Pagination'
-import { handleDatetime, handleDatetime2, validateCode } from '@/utils/global'
-import { getCookie } from '@/utils/auth'
-import QRCode from 'qrcodejs2'
-import $ from 'jquery'
-import elDragDialog from '@/directive/el-drag-dialog'
-import waves from '@/directive/waves'
-import {
- AddMesOrderCodeSearch,
- AddUpdateMesOrder, DeleteMesOrder,
- MesBadOrderSearch, MesOrderDistribution,
- MesOrderSearch,
- UpdateMesOrderStepSearch
-} from '@/api/WorkOrder'
-import { PartSelect } from '@/api/ProductModel'
-import { PrentOrganization, PrentOrganizationNoCompany, StepData } from '@/api/GeneralBasicData'
-import Sortable from 'sortablejs'
-import ElDragSelect from '@/components/DragSelect'
-import { MesOrderPrintSearch } from '@/api/GridReport' // base on element-ui
-
-export default {
- name: 'WorkOrderSend',
- components: {
- Pagination, ElDragSelect
- },
- directives: { elDragDialog, waves },
- data() {
- return {
- mouseHoverType: 'mouseout',
- mouseHoverTypeDialog: 'mouseout',
- isExpandForm: false,
- isIpad: false,
- mainHeight: 0,
- tableHeight: 0,
- username: '',
- form: {
- wkshopcode: '',
- mesorderstus: 'ALLO', // 宸ュ崟鐘舵�佺爜
- mesordercode: '', // 宸ュ崟缂栧彿
- partcode: '', // 浜у搧缂栫爜
- ordertype: '', // ordertype
- sourceorder: '', // 婧愬崟鍗曞彿
- saleordercode: '', // 閿�鍞鍗�
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
- creatuser: '', // 鍒涘缓浜哄憳
- createdate: '', // 鍒涘缓鏃堕棿
- prop: 'lm_date', // 鎺掑簭瀛楁
- order: 'desc', // 鎺掑簭瀛楁
- page: 1, // 绗嚑椤�
- rows: 20 // 姣忛〉澶氬皯鏉�
- },
- erporderstusArr: [
- // { code: 'NEW', name: '鏂板伐鍗�' }
- // { code: 'CREATING', name: '鎵ц涓�' },
- // { code: 'CREATED', name: '宸插叧闂�' }
- { code: 'ALLO', name: '宸叉淳鍙�' }
- // { code: 'START', name: '寮�宸�' },
- // { code: 'CLOSED', name: '瀹屽伐' }
- // { code: 'NOSCHED', name: '寰呮帓绋�' },
- // { code: 'SCHED', name: '宸叉帓绋�' }
- ],
- wkshopcodeArr: [],
- total: 10,
- tableData: [],
- dialogVisible: false,
- dialogForm: {
- mesorderstus: 'NEW', // 宸ュ崟鐘舵�佺爜
- mesordercode: '', // 宸ュ崟缂栧彿
- ordertype: 'PO', // 宸ュ崟绫诲瀷
- sourceorderid: '', // 婧愬崟id
- sourceorder: '', // 婧愬崟鍗曞彿
-
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
-
- mesqty: '', // 宸ュ崟鏁伴噺
- wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
- wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
-
- deliverydate: '', // 浜や粯鏃堕棿
- data_sources: '', // 鏁版嵁鏉ユ簮
-
- mesmaxqty: 0// 宸ュ崟鐨勬渶澶у��
- },
- ordertypeArr: [// 宸ュ崟绫诲瀷
- { code: 'PO', name: '鏍囧噯宸ュ崟' },
- { code: 'FO', name: '鎶ュ簾琛ュ崟' }
- ],
- partArr: [], // 浜у搧淇℃伅
- wkshopArr: [], // 鐢熶骇杞﹂棿鏁扮粍
- routeArr: [], // 宸ヨ壓璺嚎鏁扮粍
- orderlevArr: [
- { code: 1, name: '鐗圭骇' },
- { code: 2, name: '绱ф��' },
- { code: 3, name: '姝e父' }
- ], // 宸ュ崟绛夌骇鏁扮粍
- operation: '',
- dialogFormRules: {
- mesorderstus: [
- { required: true, message: '璇烽�夋嫨璁㈠崟鐘舵��', trigger: ['blur', 'change'] }
- ],
- partcode: [
- { required: true, message: '璇烽�夋嫨浜у搧淇℃伅', trigger: ['blur', 'change'] }
- ],
- mesordercode: [
- { required: true, validator: validateCode, trigger: ['blur', 'change'] }
- ],
- mesqty: [
- { required: true, message: '璇疯緭鍏ュ伐鍗曟暟閲�', trigger: ['blur', 'change'] }
- ],
- wkshopcode: [
- { required: true, message: '璇烽�夋嫨鐢熶骇杞﹂棿', trigger: ['blur', 'change'] }
- ],
- deliverydate: [
- { required: true, message: '璇烽�夋嫨棰勮浜や粯鏃ユ湡', trigger: ['blur', 'change'] }
- ],
- planstartdate: [
- { required: true, message: '璇烽�夋嫨寮�濮嬫椂闂�', trigger: ['blur', 'change'] }
- ],
- planenddate: [
- { required: true, message: '璇烽�夋嫨缁撴潫鏃堕棿', trigger: ['blur', 'change'] }
- ],
- orderlev: [
- { required: true, message: '璇烽�夋嫨宸ュ崟绛夌骇', trigger: ['blur', 'change'] }
- ],
- isAps: [
- { required: true, message: '璇烽�夋嫨鏄惁鎺掔▼', trigger: ['blur', 'change'] }
- ],
- bomId: [
- { required: true, message: '璇烽�夋嫨鐗╂枡娓呭崟', trigger: ['blur', 'change'] }
- ]
-
- },
- dialogVisibleTask: false,
- taskTableData: [],
-
- dialogVisibleSearch: false,
- searchTableData: [],
- dialogVisibleApprove: false,
- tableDataPrint: [], // 鎵撳嵃椤甸潰鍐呭
- printObj: {
- id: 'printMe',
- popTitle: '鎵撳嵃妯℃澘',
- preview: false,
- extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
- closeCallback(vue) { // 鍏抽棴鎵撳嵃鐨勫洖璋冧簨浠讹紙鏃犳硶纭畾鐐瑰嚮鐨勬槸纭杩樻槸鍙栨秷锛�
- console.log('11212', vue)
- // vue.dialogVisible = false
- vue.dialogVisibleApprove = false
- },
- beforeOpenCallback(vue) {
- vue.printLoading = true
- console.log('鎵撳紑涔嬪墠')
- console.log()
- },
- openCallback(vue) {
- vue.printLoading = false
- console.log('鎵ц浜嗘墦鍗�')
- }
- },
-
- formApprove: {
- m_po: '', // 婧愬崟鍗曞彿
- mesordercode: '',
- partcode: '',
- partname: '',
- partspec: '',
- plan_qty: '',
- routename: '',
- lm_date: ''
- },
- number: '',
- 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: '',
- nextstepname: '',
- operator: '', // 鎿嶄綔浜�
- operatorTime: ''// 鎿嶄綔鏃堕棿
- },
- dialogVisibleSource: false,
- sourceTableData: [],
- sourceForm: {
- mesordercode: '', // 宸ュ崟缂栧彿
- sourceorder: '', // 璁㈠崟缂栧彿
- saleordercode: '', // 閿�鍞鍗曞彿
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
- creatuser: '', // 鍒涘缓浜哄憳
- // paystartdate: '', // 浜や粯鏃堕棿
- // paystartdate: '', // 棰勮寮�宸ユ椂闂�
- // payenddate: '', // 棰勮瀹屽伐鏃堕棿
- createdate: '', // 鍒涘缓鏃堕棿
-
- prop: 'lm_date', // 鎺掑簭瀛楁
- order: 'desc', // 鎺掑簭瀛楁
- page: 1, // 绗嚑椤�
- rows: 20 // 姣忛〉澶氬皯鏉�
- },
- sourceFormTotal: 10,
- radioSelectedId: '',
- isExpandDialog: false, // 瀵硅瘽妗嗚〃鍗曟槸鍚﹀睍寮�锛岄粯璁や笉灞曞紑
- dialogVisibleRoute: false,
- dialogFormRoute: {
- projectName: '', // 浜у搧鍚嶇О
- projectCode: '', // 浜у搧浠g爜
- routeOperationArr: [] // 宸ヨ壓璺嚎闆嗗悎
- },
- defaultroute_code: '', // 榛樿宸ヨ壓璺嚎閫変腑鍊�
- defaultroute_codeArr: '', // 榛樿宸ヨ壓璺嚎鏁扮粍
- projectTableData: [], // 璁惧鍒楄〃
- tableDataDetail: [], // 鐐瑰嚮宸ュ崟琛ㄧ殑琛� 鏄剧ず璇︾粏淇℃伅
- printSize: 0,
- printSizeSelectArr: [// 瀹�*楂�
- { code: 0, name: '80*50' },
- { code: 1, name: '78*60' },
- { code: 2, name: '60*40' }
- // { code: 2, name: '50*60' },
- // { code: 3, name: '50*40' },
- // { code: 4, name: '50*80' },
- // { code: 5, name: '40*30' }
- ],
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() < Date.now() - 8.64e7
- }
- },
-
- isLastPrint: false, // 鏄惁鏄湯閬撴墦鍗�
- lastPrintArr: [], // 鏈亾鎵撳嵃鐨勬暟缁�(鎵�鏈�)
- lastPrintArrSelected: [], // 鏈亾鎵撳嵃鐨勬暟缁�(閫変腑)
-
- switchButton: false,
-
- routeStepArr: '',
-
- stepTableData: [],
- sortable: null,
- stepSelectArr: [], // 宸ュ簭涓嬫媺鏁版嵁
- stepSelectedValue: [], // 涓嬫媺閫変腑鍊�
-
- multipleSelection: []
- }
- },
- watch: {
- 'stepSelectedValue': {
- // deep: true,
- handler: function(val) {
- // do something with the new and old value of stepSelectedValue
- console.log(val, 1)
- const arr = JSON.parse(JSON.stringify(this.stepTableData))
- const arrStepcode = arr.map(i => i.stepcode)
- this.stepTableData = []
- val.forEach(i => {
- this.stepTableData.push(
- {
- stepcode: i,
- stepname: this.stepSelectArr.find(j => j.stepcode === i).stepname,
- stepprice: arrStepcode.includes(i) ? arr.find(j => j.stepcode === i).stepprice : 0
- }
- )
- })
- }
- }
- },
- activated() {
window.addEventListener('resize', this.getHeight)
this.getHeight()
},
created() {
- this.handleRequest()
- },
- mounted() {
- window.addEventListener('resize', this.getHeight)
- this.getHeight()
-
- // this.$nextTick(() => {
- // this.setSort()
- // })
- },
- methods: {
- setSort() {
- const el = this.$refs.stepTableDataRef.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
- this.sortable = Sortable.create(el, {
- ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
- setData: function(dataTransfer) {
- // to avoid Firefox bug
- // Detail see : https://github.com/RubaXa/Sortable/issues/1012
- dataTransfer.setData('Text', '')
- },
- onEnd: evt => {
- const targetRow = this.stepTableData.splice(evt.oldIndex, 1)[0]
- this.stepTableData.splice(evt.newIndex, 0, targetRow)
-
- this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
- // for show the changes, you can delete in you code
- // const tempIndex = this.newList.splice(evt.oldIndex, 1)[0]
- // this.newList.splice(evt.newIndex, 0, tempIndex)
- }
- })
- },
- tableRowClassName({ row, rowIndex }) {
- return 'custom-row'
- },
- handleRequest() {
- this.getMesOrderSearch().then(res => {
- if (res.code === '200') {
- this.getSelect()
- this.getPrentOrganizationNoCompany()
- }
- })
- },
- async getPrentOrganizationNoCompany() {
- const { data: res } = await PrentOrganizationNoCompany()
- this.wkshopcodeArr = res
- },
- async getMesOrderSearch() {
- // let tempDate = this.form.createdate
- // if (tempDate.length > 0) {
- // tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
- // }
-
- const data = {
- wkshopcode: this.form.wkshopcode, //
- mesorderstus: this.form.mesorderstus, // 宸ュ崟鐘舵�佺爜
- mesordercode: this.form.mesordercode, // 宸ュ崟缂栧彿
- partcode: this.form.partcode, // 浜у搧缂栫爜
- partname: this.form.partname, // 浜у搧鍚嶇О
- partspec: this.form.partspec, // 浜у搧瑙勬牸
- creatuser: this.form.creatuser, // 鍒涘缓浜哄憳
- sourceorder: this.form.sourceorder, // 婧愬崟鍗曞彿
- saleordercode: this.form.saleordercode, // 閿�鍞鍗�
- ordertype: this.form.ordertype, // 鍗曟嵁绫诲瀷
- createdate: this.form.createdate.toString().length > 0 ? handleDatetime(this.form.createdate) : '', // 鍒涘缓鏃堕棿
- prop: this.form.prop, // 鎺掑簭瀛楁
- order: this.form.order, // 鎺掑簭瀛楁
- page: this.form.page, // 绗嚑椤�
- rows: this.form.rows // 姣忛〉澶氬皯鏉�
- }
- const res = await MesOrderSearch(data)
- this.tableData = res.data
- this.total = res.count
-
- // this.form.createdate = tempDate
- return { code: res.code }
- },
- async getSelect() {
- // 鑾峰彇浜у搧淇℃伅
- const { data: res1 } = await PartSelect()
- this.partArr = res1
-
- // 鑾峰彇缁勭粐
- const { data: res2 } = await PrentOrganization()
- this.wkshopArr = res2
-
- // 鑾峰彇宸ュ簭
- const { data: res3 } = await StepData()
- this.stepSelectArr = res3
- },
- // 璁㈠崟鐘舵�佹敼鍙樻椂
- erporderstusChange(val) {
- this.form.mesorderstus = val
- },
- // 鎺掑簭鏀瑰彉鏃�
- 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.getMesOrderSearch()
- },
- sourceSortChange({ column, prop, order }) {
- if (order === 'descending') {
- order = 'desc'
- } else if (order === 'ascending') {
- order = 'asc'
- } else {
- order = 'desc'
- }
- this.sourceForm.order = order
- this.sourceForm.prop = prop
- this.getMesBadOrderSearch()
- },
- // 鏌ヨ
- search() {
- this.getMesOrderSearch()
- },
-
- // 閲嶇疆
- reset(val) {
- this.form.wkshopcode = ''
- this.form.mesorderstus = 'ALLO'
- this.form.mesordercode = ''
- this.form.partcode = ''
- this.form.partname = ''
- this.form.partspec = ''
- this.form.paydate = ''
- this.form.creatuser = ''
- this.form.sourceorder = ''
- this.form.ordertype = ''
- this.form.createdate = ''
- this.getMesOrderSearch()
- },
- // 鏂板鎸夐挳
- async add(operation) {
- const { data: res } = await AddMesOrderCodeSearch()
- this.dialogForm.mesordercode = res
- this.operation = operation
- this.dialogVisible = true
- this.dialogForm.data_sources = 'MES'
-
- this.$nextTick(() => {
- this.setSort()
- })
- },
- // 宸ュ簭浠诲姟
- 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.dialogForm.mesordercode = res[0].wo_code
- // this.dialogVisibleTask = true
- },
- dialogVisibleBack() {
- this.dialogVisibleTask = false
- },
- handleSelectionChange(val) {
- this.multipleSelection = val.map(i => i.wo_code)
- },
-
- selected(row, index) {
- return row.status === 'NEW' && row.isstep === 'Y'
- },
- // 娲惧彂
- send() {
- this.$confirm('鏄惁纭娲惧彂?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- MesOrderDistribution(this.multipleSelection).then(res => {
- if (res.code === '200') {
- this.$notify.success('娲惧彂鎴愬姛!')
- if (this.form.page > 1 && this.tableData.length === 1) {
- this.form.page--
- }
- this.getMesOrderSearch()
- }
- })
- }).catch(() => {
- this.$notify.info('宸插彇娑堟淳鍙�')
- })
- },
- // 鍒犻櫎鎸夐挳
- async del(row) {
- if (row.status === 'START' || row.status === 'CLOSED' || row.status === 'SCHED') {
- return this.$message.info('姝ゅ伐鍗曚笉鍙垹闄わ紒')
- }
- this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- const data = {
- souceid: row.sourceid ? row.sourceid : '',
- wocode: row.wo_code,
- m_po: row.m_po,
- orderqty: row.plan_qty
- }
- DeleteMesOrder(data).then(res => {
- if (res.code === '200') {
- this.$notify.success('鍒犻櫎鎴愬姛!')
- if (this.form.page > 1 && this.tableData.length === 1) {
- this.form.page--
- }
- this.getMesOrderSearch()
- }
- })
- }).catch(() => {
- this.$notify.info('宸插彇娑堝垹闄�')
- })
- },
-
- // 淇敼鎸夐挳
- async edit(operation, row) {
- this.operation = operation
-
- this.dialogForm.data_sources = row.data_sources
- this.dialogForm.mesorderstus = row.status
- this.dialogForm.mesordercode = row.wo_code
- this.dialogForm.ordertype = row.wotype
- this.dialogForm.sourceorderid = row.sourceid
- this.dialogForm.sourceorder = row.m_po
- this.dialogForm.partcode = row.partcode
- this.dialogForm.partname = row.partname
- this.dialogForm.partspec = row.partspec
- this.dialogForm.wkshopcode = row.wkshp_code
- this.dialogForm.deliverydate = row.saleOrderDeliveryDate.substring(0, 11)
- this.dialogForm.mesqty = row.plan_qty
-
- const data = {
- sourceid: this.dialogForm.sourceorderid,
- sourcewo: this.dialogForm.sourceorder,
- wocode: this.dialogForm.mesordercode,
- data_sources: this.dialogForm.data_sources
- }
- const { data: res } = await UpdateMesOrderStepSearch(data)
- this.dialogForm.mesmaxqty = res.canupdate_qty
- this.stepTableData = res.stepdata
- // res.stepdata.forEach(i => {
- // this.stepTableData.push(
- // {
- // stepcode: i.step_code,
- // stepname: i.stepname,
- // stepprice: i.stepprice
- // }
- // )
- // })
- // this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
-
- this.dialogVisible = true
- },
- // 宸ュ崟鍏抽棴浜嬩欢
- orderClose() {
- console.log('宸ュ崟鍏抽棴浜嬩欢')
- },
- // 瀵硅瘽妗嗕骇鍝佷俊鎭�兼敼鍙�
- partcodeChangeDialog(val) {
- console.log(val)
- this.dialogForm.partname = this.partArr.find(item => item.partcode === val).partname
- this.dialogForm.partcode = this.partArr.find(item => item.partcode === val).partcode
- this.dialogForm.partspec = this.partArr.find(item => item.partcode === val).partspec
- },
- // 瀵硅瘽妗嗗叧闂簨浠�
- handleClose() {
- this.dialogForm = {
- mesorderstus: 'NEW', // 宸ュ崟鐘舵�佺爜
- mesordercode: '', // 宸ュ崟缂栧彿
- ordertype: 'PO', // 宸ュ崟绫诲瀷
- sourceorderid: '', // 婧愬崟id
- sourceorder: '', // 婧愬崟鍗曞彿
-
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
-
- mesqty: '', // 宸ュ崟鏁伴噺
- wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
- wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
-
- deliverydate: '', // 浜や粯鏃堕棿
- data_sources: '' // 鏁版嵁鏉ユ簮
- }
- this.stepSelectedValue = []
- this.stepTableData = []
- this.$refs.dialogForm.clearValidate()
- },
- // 瀵硅瘽妗嗗彇娑�
- dialogVisibleCancel() {
- this.dialogVisible = false
- },
- // 瀵硅瘽妗嗙‘璁�
- dialogVisibleConfirm() {
- this.$refs.dialogForm.validate(valid => {
- if (valid) {
- if (this.dialogForm.ordertype === 'FO' && this.dialogForm.sourceorder.toString().trim().length <= 0) {
- return this.$message.info('婧愬崟鍗曞彿涓嶈兘涓虹┖锛�')
- }
-
- if (this.dialogForm.data_sources === 'ERP' && this.dialogForm.mesmaxqty < this.dialogForm.mesqty) {
- return this.$message.info('姝ゅ伐鍗曠殑鏈�澶т慨鏀规暟鍊间负锛�' + this.dialogForm.mesmaxqty)
- }
-
- const workListSub = []
- this.stepTableData.forEach((i, j) => {
- workListSub.push(
- {
- stepseq: j + 1,
- stepcode: i.stepcode,
- stepprice: i.stepprice,
- isbott: j === 0 ? 'Y' : 'N',
- isend: j === this.stepTableData.length - 1 ? 'Y' : 'N'
- }
- )
- })
-
- const data = {
- wostatus: this.dialogForm.mesorderstus, // 宸ュ崟鐘舵��
- wocode: this.dialogForm.mesordercode, // 宸ュ崟鍙�
- wotype: this.dialogForm.ordertype, // 宸ュ崟绫诲瀷
- sourceid: this.dialogForm.sourceorderid, // 婧愬崟id
- sourcewo: this.dialogForm.sourceorder, // 婧愬崟鍗曞彿
- partcode: this.dialogForm.partcode, // 浜у搧缂栧彿
- wkshopcode: this.dialogForm.wkshopcode,
- woqty: this.dialogForm.mesqty, // 宸ュ崟鏁伴噺
- deliverydate: this.dialogForm.deliverydate, // 浜や粯鏃堕棿
- data_sources: this.dialogForm.data_sources, // 鏁版嵁鏉ユ簮
- isstep: workListSub.length > 0 ? 'Y' : 'N', //
- workListSub
- }
-
- this.$store.state.app.buttonIsDisabled = true
- AddUpdateMesOrder(data, this.operation === 'add' ? 'Add' : 'Update').then(res => {
- if (res.code === '200') {
- this.dialogVisible = false
- // this.handlePrint()
- this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '娲惧彂鎴愬姛锛�')
- this.getMesOrderSearch()
- this.$store.state.app.buttonIsDisabled = false
- } else {
- this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '娲惧彂澶辫触锛�')
- }
- })
- }
- })
- },
- // 娲惧彂鎵撳嵃
- async sendPrint() {
- const data = {
- username: getCookie('admin'),
- // username: getCookie('username'),
- mesordercode: this.dialogForm.mesordercode
- }
- const res = await MesOrderPrintSearch1(data)
- // const res = await PrintOrder(data)
- if (res.code === '200') {
- // 鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
- var args = {
- type: 'print', // preview print
- showOptionDlg: false, // 濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
- report: urlAddRandomNo('./static/grf/浜у搧娴佷紶鍗旳4.grf'),
- data: res.data
- }
- webapp_ws_ajax_run(args)
- }
- },
-
- // 鑾峰彇椤甸潰楂樺害
- getHeight() {
- this.$nextTick(() => {
- this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 245
- if (window.innerHeight < 769) {
- this.tableHeight = this.tableHeight - 20
- }
- this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
- this.$refs.tableDataRef.doLayout()
- })
- },
- // 宸ヨ壓璺嚎鏀惧ぇ闀滅偣鍑�
- async searchClick() {
- if (this.dialogForm.routecode === '') {
- return this.$message.info('璇峰厛閫夋嫨宸ヨ壓璺嚎锛�')
- }
- this.dialogVisibleSearch = true
- const { data: res } = await SelectRouteStep({ routecode: this.dialogForm.routecode })
- this.searchTableData = res
- },
- dialogVisibleSearchBack() {
- this.dialogVisibleSearch = false
- },
- // 澶勭悊鎵撳嵃
- handlePrint(wo_code) {
- // const number = Math.random() * Math.random()
- // this.number = number === 0 ? (10 + Math.random()) : number
- // console.log(number)
-
- const data2 = {
- mesordercode: wo_code || this.dialogForm.mesordercode
- }
- MesOrderPrintSearch(data2).then(res2 => {
- if (res2.code === '200') {
- const res3 = res2.data.recordset
-
- this.tableDataPrint = res3
- this.formApprove.mesordercode = res3[0].wo_code
- this.formApprove.m_po = res3[0].m_po || '/'
- this.formApprove.partcode = res3[0].partcode
- this.formApprove.partname = res3[0].partname
- this.formApprove.partspec = res3[0].partspec || '/'
- this.formApprove.plan_qty = res3[0].plan_qty
- this.formApprove.routename = localStorage.getItem('username') // 鎵撳嵃浜哄憳
- this.formApprove.lm_date = res3[0].lm_date
-
- this.$nextTick(() => {
- res3.forEach(i => {
- this.bindQRCode(i.seq, i.stepqrcode, 'small')
- })
- this.bindQRCode('0', this.formApprove.mesordercode, 'big')
-
- const div = document.getElementById('qrCode')
- // 杩欎箞澶氫唬鐮佸彧闇�瑕佽繖涓�鍙ュ疄鐜版垜浠墍闇�瑕佺殑鍔熻兘锛屽畾浣峝iv婊氬姩鏉′綅缃湪搴曢儴锛宻crollHeight璁$畻鍑篸iv鐨勯珮搴︼紝鍐峴crollTop 璁剧疆婊氬姩鏉$殑楂樺害涓哄灏�
- div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
- // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
- })
- this.dialogVisibleApprove = true
- }
- })
- },
- dialogVisibleTaskClose() {
- this.dialogForm.mesordercode = ''
- },
- /*
- * 鎵嬪姩鐐瑰嚮鎵撳嵃
- * */
- // 杩斿洖鎸夐挳
- dialogVisibleBackPreview() {
- this.dialogVisibleApprove = false
- },
- // dialogVisibleConfirmPreview(param) {
- // this.$refs.dialogForm.validate(valid => {
- // if (valid) {
- // const data = {
- // username: getCookie('admin'),
- // mesordercode: this.dialogForm.mesordercode
- // }
- // MesOrderPrintSearch1(data).then(res => {
- // if (res.code === '200') {
- // this.dialogVisibleApprove = true
- // console.log(res, 11)
- // }
- // })
- // }
- // })
- // },
- // 鐢熸垚浜岀淮鐮� 宸ュ崟鎶ヨ〃浜岀淮鐮�
- bindQRCode(seq, text, size) {
- if (size === 'big') {
- console.log(text, 1)
- new QRCode(this.$refs.qrCodeDiv0, {
- text: text,
- width: size === 'big' ? 90 : 60,
- height: size === 'big' ? 90 : 60,
- // colorDark: '#333333', // 浜岀淮鐮侀鑹�
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- } else {
- new QRCode(this.$refs['qrCodeDiv' + seq], {
- text: text,
- width: size === 'big' ? 90 : 60,
- height: size === 'big' ? 90 : 60,
- // colorDark: '#333333', // 浜岀淮鐮侀鑹�
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- }
- },
-
- dialogVisibleConfirmClose() {
- // this.dialogForm.mesordercode = ''
- this.formApprove.mesordercode = ''
- this.formApprove.m_po = ''
- this.formApprove.partcode = ''
- this.formApprove.partname = ''
- this.formApprove.partspec = ''
- this.formApprove.plan_qty = ''
- this.formApprove.routename = ''
- this.formApprove.lm_date = ''
-
- // this.$refs.qrCodeDiv0.title = ''
-
- this.tableDataPrint = []
- },
- // 琛ユ墦鎸夐挳
- supplementClick() {
- this.dialogVisibleTask = false
- this.handlePrint()
- },
- // 琛ユ墦灏忔爣绛�
- supplementSmallClick(row) {
- // let obj = {}
- console.log(row, 21)
- // this.taskTableData.forEach((item, index) => {
- this.tableDataDetail.forEach((item, index) => {
- if (item.seq === row.seq) {
- console.log(item)
- this.qrForm = {
- // qrvalue: item.seq === this.taskTableData.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.taskTableData[item.seq].stepcode,
- qrvalue: item.seq === this.tableDataDetail.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.tableDataDetail[item.seq].stepcode,
- // startqty: item.seq === this.taskTableData.length ? item.plan_qty : this.taskTableData[item.seq].plan_qty,
- startqty: item.seq === this.tableDataDetail.length ? item.plan_qty : this.tableDataDetail[item.seq].plan_qty,
- wo_code: item.wo_code,
- partcode: item.partcode,
- partname: item.partname,
- // nextstepname: item.seq === this.taskTableData.length ? item.stepname : this.taskTableData[item.seq].stepname,
- nextstepname: item.seq === this.tableDataDetail.length ? item.stepname : this.tableDataDetail[item.seq].stepname,
- operator: getCookie('username'),
- operatorTime: handleDatetime2(new Date())
- }
- this.$nextTick(() => {
- console.log(this.qrForm.qrvalue, 3333)
- this.bindQRCode2(this.qrForm.qrvalue)
-
- const div = document.getElementById('qrCode2')
- // 杩欎箞澶氫唬鐮佸彧闇�瑕佽繖涓�鍙ュ疄鐜版垜浠墍闇�瑕佺殑鍔熻兘锛屽畾浣峝iv婊氬姩鏉′綅缃湪搴曢儴锛宻crollHeight璁$畻鍑篸iv鐨勯珮搴︼紝鍐峴crollTop 璁剧疆婊氬姩鏉$殑楂樺害涓哄灏�
- div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
- // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
- })
- }
- })
-
- // this.dialogVisibleTask = false
- this.dialogVisible2 = true
- console.log(this.qrForm, 1111)
- },
- // 琛ユ墦鐢熶骇鍏ュ簱鏉$爜
- async getProductInHouseLabCode(ordercode) {
- const res = await ProductInHouseLabCode({ ordercode })
- console.log(res)
- this.isLastPrint = true
-
- this.lastPrintArr = res.data
-
- this.dialogVisible2 = true
-
- // 鐢熶骇浜岀淮鐮�
- this.$nextTick(() => {
- this.lastPrintArr.forEach((i, index) => {
- i.checked = false
- new QRCode(this.$refs.qrCodeDiv2[index], {
- text: i.inbarcode,
- width: this.printSize !== 2 ? 60 : 55,
- height: this.printSize !== 2 ? 60 : 55,
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- })
- })
- },
- dialogVisible2Close() {
- this.qrForm.qrvalue = ''
- this.qrForm.startqty = ''
- this.qrForm.wo_code = ''
- this.qrForm.partcode = ''
- this.qrForm.partname = ''
- this.qrForm.nextstepname = ''
- this.qrForm.operator = ''
- this.qrForm.operatorTime = ''
- // this.$refs.qrCodeDiv2 = ''
- this.isLastPrint = false
- this.lastPrintArr = []
- this.lastPrintArrSelected = []
- },
- // 鐢熸垚浜岀淮鐮� 宸ュ簭鏍囩浜岀淮鐮�
- bindQRCode2(text) {
- new QRCode(this.$refs.qrCodeDiv2, {
- text: text,
- width: this.printSize !== 2 ? 60 : 55,
- height: this.printSize !== 2 ? 60 : 55,
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- },
- // 鎶ュ簾琛ュ崟鎯呭喌涓嬪彲鐐瑰嚮閫夋嫨
- mesordertsourcesearchclick() {
- if (this.dialogForm.ordertype === 'PO') {
- return this.$message.info('宸ュ崟绫诲瀷涓烘姤搴熻ˉ鍗曟儏鍐典笅鍙�夋嫨锛�')
- }
-
- this.getMesBadOrderSearch()
-
- this.dialogVisibleSource = true
- },
- async getMesBadOrderSearch() {
- // let tempDate2 = this.sourceForm.paystartdate
- // if (tempDate2.length > 0) {
- // tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
- // }
-
- let tempDate = this.sourceForm.createdate
- if (tempDate.length > 0) {
- tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
- }
-
- const data = {
- mesordercode: this.sourceForm.mesordercode, // 宸ュ崟缂栧彿
- sourceorder: this.sourceForm.sourceorder, // 璁㈠崟璁㈠崟鍙�
- saleordercode: this.sourceForm.sourceorder, // 璁㈠崟璁㈠崟鍙�
- partcode: this.sourceForm.partcode, // 浜у搧缂栫爜
- partname: this.sourceForm.partname, // 浜у搧鍚嶇О
- partspec: this.sourceForm.partspec, // 浜у搧瑙勬牸
- // paystartdate: tempDate2, // 浜や粯鏃堕棿
- // payenddate: tempDate, // 浜や粯鏃堕棿
- creatuser: this.sourceForm.creatuser, // 鍒涘缓浜哄憳
- createdate: tempDate, // 鍒涘缓鏃堕棿
-
- prop: this.sourceForm.prop, // 鎺掑簭瀛楁
- order: this.sourceForm.order, // 鎺掑簭瀛楁
- page: this.sourceForm.page, // 绗嚑椤�
- rows: this.sourceForm.rows // 姣忛〉澶氬皯鏉�
-
- }
-
- const res = await MesBadOrderSearch(data)
- this.sourceTableData = res.data
- this.sourceFormTotal = res.count
- },
- // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
- // getCurrentRowSource2(id) {
- // this.radioSelectedId = id
- // },
- // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
- getCurrentRowSource(row, event, column) {
- this.radioSelectedId = row.id
- this.dialogForm.mesqty = row.bad_qty
- },
- sourceSearch() {
- this.getMesBadOrderSearch()
- },
- sourceReset() {
- this.sourceForm.mesordercode = ''
- this.sourceForm.sourceorder = ''
- this.sourceForm.partcode = ''
- this.sourceForm.partname = ''
- this.sourceForm.partspec = ''
- // this.sourceForm.paystartdate = ''
- // this.sourceForm.payenddate = ''
- this.sourceForm.creatuser = ''
- this.sourceForm.createdate = ''
- this.getMesBadOrderSearch()
- },
- dialogVisibleSourceClose() {
- this.radioSelectedId = ''
-
- this.sourceForm.mesordercode = ''
- this.sourceForm.sourceorder = ''
- this.sourceForm.partcode = ''
- this.sourceForm.partname = ''
- this.sourceForm.partspec = ''
- this.sourceForm.paystartdate = ''
- this.sourceForm.payenddate = ''
- this.sourceForm.creatuser = ''
- this.sourceForm.createdate = ''
-
- this.isExpandDialog = false
- this.sourceTableData = []
- },
- dialogVisibleSourceBack() {
- this.dialogVisibleSource = false
- },
- dialogVisibleSourceConfirm() {
- console.log(this.radioSelectedId)
- this.sourceTableData.forEach(item => {
- if (item.id === this.radioSelectedId) {
- this.dialogForm.sourceorder = item.wo_code
- this.dialogForm.partcode = item.partcode
- this.dialogForm.partspec = item.partspec
- }
- })
- this.dialogVisibleSource = false
- },
- mesordertypeChange(val) {
- if (val === 'PO') {
- this.dialogForm.sourceorder = ''
- this.dialogForm.partcode = ''
- this.dialogForm.partspec = ''
- }
- },
- /* 鍏宠仈宸ヨ壓璺嚎妯″潡*/
- // 鍏宠仈宸ヨ壓璺嚎
- async routeClick(row) {
- console.log(row)
- // this.defaultroute_code = row.default_route
- this.dialogFormRoute.projectCode = row.partcode
- this.dialogFormRoute.projectName = row.partname
- this.dialogVisibleRoute = true
- const { data: res } = await InventoryFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode })
- this.dialogFormRoute.routeOperationArr = res
-
- this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
- item.isSelected1 = false
- item.isSelected2 = false
- if (index === 0) {
- item.isSelected1 = true
- this.projectTableData = item.Data
- }
- if (item.flag === 'Y') {
- item.isSelected2 = true
- this.$nextTick(() => {
- $('input:checkbox').eq(index).prop('checked', true)
- })
- }
- })
-
- this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y')
- },
- // 瀵硅瘽妗嗗叧闂�
- handleCloseRoute() {
- this.dialogFormRoute.routeOperationArr = []
- this.defaultroute_codeArr = []
- this.defaultroute_code = ''
- this.projectTableData = []
- },
- // 鍙栨秷
- routeDialogVisibleCancel() {
- this.dialogVisibleRoute = false
- },
- // 纭畾
- async routeDialogVisibleConfirm() {
- const temp = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
- if (this.defaultroute_code === '' && temp.length > 0) {
- return this.$message.info('榛樿宸ヨ壓璺嚎涓嶈兘涓虹┖锛�')
- }
-
- // 鎻愪氦鏍煎紡
- const data = []
- this.dialogFormRoute.routeOperationArr.forEach(item => {
- if (item.isSelected2) {
- data.push({ code: item.code, name: item.name })
- }
- })
-
- const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, this.defaultroute_code, data)
- if (res.code === '200') {
- this.$message.success('淇濆瓨鎴愬姛锛�')
- await this.getMesOrderSearch()
- this.dialogVisibleRoute = false
- }
- },
- // 澶х洅瀛愮偣鍑讳簨浠�
- myCheckboxClick(val) {
- console.log(val, 1)
- this.dialogFormRoute.routeOperationArr.forEach(item => {
- item.isSelected1 = val.code === item.code
- })
-
- this.projectTableData = val.Data
- },
- // 灏忕洅瀛愮偣鍑讳簨浠�
- myCheckboxInputClick(val) {
- console.log(val, 2)
- val.isSelected2 = !val.isSelected2
-
- this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
- if (val.code === item.code) {
- item.flag = !item.flag
- }
- })
- if (val.code === this.defaultroute_code) {
- this.defaultroute_code = ''
- }
- this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
- },
- // 琛岀偣鍑讳簨浠�
- async rowClick(row, event, column) {
- const data = {
- sourceid: row.sourceid,
- sourcewo: row.m_po,
- wocode: row.wo_code,
- data_sources: row.data_sources
- }
- const { data: res } = await UpdateMesOrderStepSearch(data)
- this.tableDataDetail = res.stepdata
- },
- // 宸ュ簭鍒犻櫎
- stepDel(row) {
- console.log(row)
- const index = this.stepSelectedValue.findIndex(i => i === row.stepcode)
- this.stepSelectedValue.splice(index, 1)
- },
- // 鎵撳嵃宸ュ崟
- printOrder() {
-
- },
- // 閫夋嫨鎵撳嵃灏哄鐨勫ぇ灏忓�兼敼鍙�
- printSizeChange(val) {
- this.$nextTick(() => {
- this.bindQRCode2(this.qrForm.qrvalue)
- })
- },
- printMe2StylePadding(val) {
- if (val === 0) {
- return { paddingLeft: '10px', paddingTop: '5px' }
- }
- if (val === 5) {
- return { paddingLeft: '15px', paddingTop: '7px' }
- }
- },
-
- inbarcodeChange(val, item) {
- // 褰� lastPrintArrSelected涓湭鏈夊綋鍓嶅嬀閫夌殑鍊兼槸 璧皃ush item 鍚﹀垯璧拌繃婊ゆ帀item
- if (val) {
- this.lastPrintArrSelected.push(item)
- } else {
- this.lastPrintArrSelected = this.lastPrintArrSelected.filter(i => i.inbarcode !== item.inbarcode)
- }
-
- // 鐢熶骇浜岀淮鐮�
- this.$nextTick(() => {
- this.lastPrintArrSelected.forEach((i, index) => {
- console.log(i.inbarcode, 'i.inbarcode')
- new QRCode(this.$refs.qrCodeDiv3[index], {
- text: i.inbarcode,
- width: 60,
- height: 60,
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- })
-
- // const div = document.getElementById('qrCode3')
- // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶搴曢儴
-
- this.$forceUpdate()
- }, 500)
- },
- stepSelectedValueChange(val) {
- // console.log(val, 123)
- },
- getSummaries(param) {
- const { columns, data } = param
- const sums = []
- const i = 8
- columns.forEach((column, index) => {
- if (index === i) {
- sums[index] = '鎬绘暟'
- return
- }
- const values = data.map(item => Number(item[column.property]))
- if (column.property === 'plan_qty') {
- sums[index] = values.reduce((prev, curr) => {
- const value = Number(curr)
- if (!isNaN(value)) {
- return prev + curr
- // return Math.round(prev * 100) / 100 + Math.round(curr * 100) / 100
- }
- }, 0)
-
- sums[index] += ' 鍗�'
- }
- })
-
- this.$nextTick(() => {
- this.$refs.tableDataRef.doLayout()
- })
- return sums
- }
- }
-}
-</script>
-<style>
-.sortable-ghost {
- opacity: .8;
- color: #fff !important;
- background: #42b983 !important;
-}
-</style>
-<style lang="scss" scoped>
-$main_color: #42b983;
-
-.dialogVisibleRoute {
- .myCheckboxGroup {
- display: flex;
- flex-wrap: wrap;
-
- .myCheckbox {
- //border: 1px solid $main_color;
- border: 1px solid #eee;
- display: flex;
- min-width: 100px;
- padding: 10px;
- margin: 10px 30px 0 0;
- border-radius: 5px;
- cursor: default;
-
- .myCheckboxInput {
- margin: 1px 5px 0 0;
- cursor: pointer;
- }
-
- }
-
- //.myCheckbox{
- // border: 1px solid $main_color;
- //}
-
- input[type=checkbox] {
- cursor: pointer;
- position: relative;
- width: 14px;
- height: 14px;
- font-size: 14px;
- }
-
- input[type=checkbox]::after {
- position: absolute;
- top: 0;
- //color: rgb(130, 35, 35);
- color: $main_color;
- width: 14px;
- height: 14px;
- display: inline-block;
- visibility: visible;
- padding-left: 0px;
- text-align: center;
- content: ' ';
- border-radius: 3px
- }
-
- input[type=checkbox]:checked::after {
- //content: "鉁�";
- content: "鈭�";
- color: #fff;
- font-size: 12px;
- font-weight: bold;
- background-color: $main_color;
- }
- }
-}
-
-.dialogVisibleRoute {
- ::v-deep .el-dialog__body {
- padding: 20px 20px !important;
- }
-}
-
-.defaultroute_code ::v-deep .el-input__suffix-inner {
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: -3px;
-}
-
-.el-date-editor {
- font-size: 14px;
-}
-
-::v-deep .el-dialog__body {
- padding: 20px 100px !important;
-}
-
-.dialogVisibleSearch ::v-deep .el-dialog__body {
- padding: 20px 20px !important;
-}
-
-.dialogVisibleConfirmClass ::v-deep .el-dialog__body {
- padding: 20px 20px !important;
-}
-
-::v-deep .el-table .caret-wrapper {
- transform: scale(0.8);
-}
-
-::v-deep .el-button--text {
- color: $main_color;
- font-size: 14px;
- cursor: pointer;
-}
-
-::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
- margin: 10px 30px 0px 0;
-}
-
-.body ::v-deep .el-form-item {
- margin-bottom: 0;
-}
-
-.elForm ::v-deep .el-form-item {
- margin-bottom: 0;
-}
-
-.elTableDiv {
- ::v-deep .el-radio__label {
- display: none;
- }
-
-}
-
-.el-table::before {
- height: 0;
-}
-
-//.dialogVisibleConfirmClass >>>.el-table--border, .el-table--fit {
-// border-bottom: 2px solid #000 ;
-// //outline: #000 solid 2px !important;
-//}
-
-.tableDataPrint ::v-deep div.cell {
- display: flex !important;
- align-items: center !important;
- justify-content: center !important;
-}
-
-.formContent {
- width: 240px;
-}
-
-</style>
-
-<style media="print">
-/*@media print {*/
-@page {
- size: auto;
- margin: 3mm;
-}
-
-</style>
-<style>
-.formContent .el-form-item__label {
- color: #000 !important;
-}
-</style>
-<!--鍏叡椤甸潰鏍峰紡-->
-<style lang="scss" scoped>
-$main_color: #42b983;
-
-::v-deep .el-range-input {
- font-size: 14px !important;
-}
-
-::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-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 .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;
-}
-
-.userDialogVisible ::v-deep .el-form-item {
- margin-bottom: 0;
-}
-
-.dateMini {
- ::v-deep .el-input__inner {
- line-height: 34px;
- height: 34px;
- width: 200px;
- display: flex;
- font-size: 14px !important;
- align-items: center !important;
- }
-
- ::v-deep .el-input__prefix {
- margin-top: -3px;
- }
-
- //::v-deep .el-range__icon{
- // line-height: 28px;
- //}
-}
-
-::v-deep .el-select__caret {
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.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>
+<template>
+ <div>
+ <div class="body" :style="{height:mainHeight+'px'}">
+
+ <!-- <div class="bodyTopButtonGroup" style="justify-content: space-between">-->
+ <!-- <div style="display: flex">-->
+ <!-- <!– <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>–>-->
+ <!-- <!– <el-button v-waves type="success" icon="el-icon-connection" @click="send">娲惧彂</el-button>–>-->
+ <!-- </div>-->
+
+ <!-- <!– <el-button v-waves icon="el-icon-switch-button" @click="orderClose">鍏抽棴宸ュ崟</el-button>–>-->
+ <!-- </div>-->
+
+ <div class="bodyTopFormGroup" style="margin-top: 10px;">
+ <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.wkshopcode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in wkshopcodeArr"
+ :key="item.torg_code"
+ :label="item.torg_name"
+ :value="item.torg_code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">
+ <el-select
+ v-model="form.mesorderstus"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ disabled
+ filterable
+ @change="erporderstusChange"
+ >
+ <el-option
+ v-for="item in erporderstusArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
+ <el-input v-model="form.mesordercode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="婧愬崟鍗曞彿" style="display: flex;">
+ <el-input v-model="form.sourceorder" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="閿�鍞鍗�" style="display: flex;">
+ <el-input v-model="form.saleordercode" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="鍗曟嵁绫诲瀷" style=" display: flex;">
+ <el-select
+ v-model="form.ordertype"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <!-- @change="mesordertypeChange"-->
+ <el-option
+ v-for="item in ordertypeArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="浜у搧缂栫爜" style=" display: flex;">
+ <el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="浜у搧瑙勬牸" style=" display: flex;">
+ <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="鍒涘缓浜哄憳" style=" display: flex;">
+ <el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="鍒涘缓鏃堕棿" style=" display: flex;">
+ <!-- <el-date-picker-->
+ <!-- v-model="form.createdate"-->
+ <!-- type="daterange"-->
+ <!-- :clearable="false"-->
+ <!-- range-separator="~"-->
+ <!-- start-placeholder="寮�濮嬫棩鏈�"-->
+ <!-- end-placeholder="缁撴潫鏃ユ湡"-->
+ <!-- size="mini"-->
+ <!-- />-->
+ <el-date-picker
+ v-model="form.createdate"
+ type="date"
+ size="mini"
+ :clearable="false"
+ class="dateMini"
+ format="yyyy-MM-dd"
+ 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+80)+'px'"
+ border
+ :summary-method="getSummaries"
+ show-summary
+ :row-class-name="tableRowClassName"
+ :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px'}"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ @sort-change="sortChange"
+ @selection-change="handleSelectionChange"
+ >
+ <!-- @row-click="rowClick"-->
+ <!-- <el-table-column-->
+ <!-- type="selection"-->
+ <!-- width="50"-->
+ <!-- :selectable="selected"-->
+ <!-- />-->
+ <el-table-column
+ prop="rowNum"
+ width="50"
+ label="搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="status"
+ label="宸ュ崟鐘舵��"
+ sortable="custom"
+ width="110"
+ show-tooltip-when-overflow
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.status==='NEW'">鏂板伐鍗�</div>
+ <!-- <div v-if="row.status==='CREATING'">鎵ц涓�</div>-->
+ <!-- <div v-if="row.status==='CREATED'">宸插叧闂�</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="宸ュ崟缂栧彿"
+ show-tooltip-when-overflow
+ sortable="custom"
+ min-width="160"
+ />
+ <el-table-column
+ prop="m_po"
+ label="婧愬崟鍗曞彿"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="160"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.m_po">{{ row.m_po }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="saleOrderCode"
+ label="閿�鍞鍗�"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="160"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.saleOrderCode">{{ row.saleOrderCode }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wotype"
+ label="鍗曟嵁绫诲瀷"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="120"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.wotype==='PO'">鏍囧噯宸ュ崟</div>
+ <div v-else-if="row.wotype==='FO'">鎶ュ簾琛ュ崟</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="partcode"
+ label="浜у搧缂栫爜"
+ show-tooltip-when-overflow
+ sortable="custom"
+ min-width="120"
+ />
+ <el-table-column
+ prop="partname"
+ min-width="150"
+ label="浜у搧鍚嶇О"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partspec"
+ label="浜у搧瑙勬牸"
+ sortable="custom"
+ width="110"
+ show-tooltip-when-overflow
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.partspec">{{ row.partspec }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="plan_qty"
+ label="宸ュ崟鏁�"
+ sortable="custom"
+ show-tooltip-when-overflow
+ width="100"
+ />
+ <el-table-column
+ prop="priuserdefnvc1"
+ label="瀹㈡埛鍚嶇О"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc1 ? row.priuserdefnvc1 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc6"
+ label="瀹㈡埛缂栫爜"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc6 ? row.priuserdefnvc6 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc2"
+ label="瀵瑰唴鍚嶇О"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc2 ? row.priuserdefnvc2 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc3"
+ label="CTP鏃ユ湡"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc3 ? row.priuserdefnvc3 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc4"
+ label="閽㈠垁缂栧彿"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc4 ? row.priuserdefnvc4 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="priuserdefnvc5"
+ label="鐩掑瀷"
+ width="110"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.priuserdefnvc5 ? row.priuserdefnvc5 : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wkshp_name"
+ label="鐢熶骇杞﹂棿"
+ show-tooltip-when-overflow
+ sortable="custom"
+ width="120"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="saleOrderDeliveryDate"
+ label="棰勮浜や粯鏃ユ湡"
+ sortable="custom"
+ width="130"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.saleOrderDeliveryDate">{{ row.saleOrderDeliveryDate.substring(0, 11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column-->
+ <!-- prop="data_sources"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- label="鏁版嵁鏉ユ簮"-->
+ <!-- sortable="custom"-->
+ <!-- width="120"-->
+ <!-- />-->
+
+ <el-table-column
+ prop="lm_user"
+ show-tooltip-when-overflow
+ label="鍒涘缓浜哄憳"
+ sortable="custom"
+ width="120"
+ />
+ <el-table-column
+ prop="lm_date"
+ label="鍒涘缓鏃堕棿"
+ show-tooltip-when-overflow
+ width="160"
+ sortable="custom"
+ />
+ <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"-->
+ <!-- :style="{color:$store.state.settings.theme}"-->
+ <!-- @click.stop="edit('edit',row)"-->
+ <!-- />-->
+ <!-- </el-tooltip>-->
+
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
+ <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click.stop="del(row)" />
+ </el-tooltip>
+
+ <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
+ :style="{color:$store.state.settings.theme}"
+ class="el-icon-printer"
+ style="cursor: pointer;margin-right: 15px"
+ @click.stop="handlePrint(row.wo_code)"
+ />
+ </el-tooltip>
+
+ <el-tooltip class="item" effect="dark" content="璇︽儏" placement="top">
+ <i
+ class="el-icon-view"
+ style="cursor: pointer;"
+ :style="{color:$store.state.settings.theme}"
+ @click.stop="edit('view',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,jumper"
+ popper-class="select_bottom"
+ @pagination="getMesOrderSearch"
+ />
+
+ <!-- <div class="elTableDiv">-->
+ <!-- <el-table-->
+ <!-- :data="tableDataDetail"-->
+ <!-- border-->
+ <!-- height="210px"-->
+ <!-- :row-class-name="tableRowClassName"-->
+ <!-- highlight-current-row-->
+ <!-- :header-cell-style="this.$headerCellStyle"-->
+ <!-- :cell-style="this.$cellStyle"-->
+ <!-- >-->
+ <!-- <!– <el-table-column–>-->
+ <!-- <!– width="50"–>-->
+ <!-- <!– type="index"–>-->
+ <!-- <!– prop="搴忓彿"–>-->
+ <!-- <!– fixed–>-->
+ <!-- <!– /> –>-->
+ <!-- <el-table-column-->
+ <!-- width="50"-->
+ <!-- prop="seq"-->
+ <!-- label="搴忓彿"-->
+ <!-- fixed-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- prop="wo_code"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- label="宸ュ崟缂栧彿"-->
+ <!-- width="160"-->
+ <!-- />-->
+
+ <!-- <!– <el-table-column–>-->
+ <!-- <!– prop="partcode"–>-->
+ <!-- <!– label="浜у搧缂栫爜"–>-->
+ <!-- <!– width="150"–>-->
+ <!-- <!– show-tooltip-when-overflow–>-->
+ <!-- <!– />–>-->
+ <!-- <!– <el-table-column–>-->
+ <!-- <!– prop="partname"–>-->
+ <!-- <!– label="浜у搧鍚嶇О"–>-->
+ <!-- <!– width="200"–>-->
+ <!-- <!– show-tooltip-when-overflow–>-->
+ <!-- <!– />–>-->
+
+ <!-- <el-table-column-->
+ <!-- label="宸ュ簭缂栫爜"-->
+ <!-- prop="step_code"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- width="150"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="宸ュ簭鍚嶇О"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="stepname"-->
+ <!-- width="150"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="宸茬敓浜ф暟閲�"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="produceq_qty"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="鍚堟牸鏁伴噺"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="good_qty"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="涓嶈壇鏁伴噺"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="ng_qty"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="宸ュ簾鏁伴噺"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="laborbad_qty"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="鏂欏簾鏁伴噺"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="materielbad_qty"-->
+ <!-- />-->
+ <!-- <el-table-column-->
+ <!-- label="寰呬骇鏁伴噺"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- prop="delive_qty"-->
+ <!-- />-->
+ <!-- <!– <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–>-->
+ <!-- <!– v-if="tableDataDetail.length!==row.seq"–>-->
+ <!-- <!– class="el-icon-printer"–>-->
+ <!-- <!– :style="{color:$store.state.settings.theme}"–>-->
+ <!-- <!– style="cursor: pointer;margin-right: 15px"–>-->
+ <!-- <!– @click="supplementSmallClick(row)"–>-->
+ <!-- <!– />–>-->
+ <!-- <!– </el-tooltip>–>-->
+ <!-- <!– <el-tooltip class="item" effect="dark" content="琛ユ墦鐢熶骇鍏ュ簱鏉$爜" placement="top">–>-->
+ <!-- <!– <i–>-->
+ <!-- <!– v-if="tableDataDetail.length===row.seq"–>-->
+ <!-- <!– class=" el-icon-camera"–>-->
+ <!-- <!– :style="{color:$store.state.settings.theme}"–>-->
+ <!-- <!– style="cursor: pointer;margin-right: 15px"–>-->
+ <!-- <!– @click="getProductInHouseLabCode(row.wo_code)"–>-->
+ <!-- <!– />–>-->
+ <!-- <!– </el-tooltip>–>-->
+ <!-- <!– </div>–>-->
+ <!-- <!– </template>–>-->
+ <!-- <!– </el-table-column>–>-->
+ <!-- </el-table>-->
+ <!-- </div>-->
+ </div>
+ <!--鏂板娲惧彂瀵硅瘽妗�-->
+ <el-dialog
+ v-el-drag-dialog
+ :title="operation==='add'?'鏂板':'娲惧彂'"
+ :visible.sync="dialogVisible"
+ width="1200px"
+ top="8vh"
+ :close-on-click-modal="false"
+ @closed="handleClose"
+ @close="handleClose"
+ >
+ <el-form
+ ref="dialogForm"
+ inline
+ :rules="dialogFormRules"
+ :model="dialogForm"
+ label-width="110px"
+ >
+
+ <el-divider content-position="left">鍩烘湰淇℃伅</el-divider>
+
+ <el-form-item
+ label="宸ュ崟鐘舵��"
+ prop="mesorderstus"
+ >
+ <el-select
+ v-model="dialogForm.mesorderstus"
+ disabled
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in erporderstusArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="宸ュ崟缂栧彿" prop="mesordercode">
+ <!-- <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px" />-->
+ <el-input v-model="dialogForm.mesordercode" disabled style="width: 200px" />
+ </el-form-item>
+ <!-- <div style="display: flex">-->
+ <el-form-item label="宸ュ崟绫诲瀷" prop="mesorderstus">
+ <el-select
+ v-model="dialogForm.ordertype"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ :disabled="operation!=='add'"
+ placeholder="璇烽�夋嫨"
+ @change="mesordertypeChange"
+ >
+ <el-option
+ v-for="item in ordertypeArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <!-- <div style="display: flex;flex-wrap: nowrap">-->
+ <el-form-item label="婧愬崟鍗曞彿">
+ <el-input
+ v-model="dialogForm.sourceorder"
+ :disabled="dialogForm.ordertype==='PO'"
+ style="width: 200px"
+ >
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ :disabled="operation!=='add'||dialogForm.ordertype==='PO'"
+ @click="mesordertsourcesearchclick"
+ />
+ </el-input>
+ </el-form-item>
+ <!-- <el-button-->
+ <!-- v-waves-->
+ <!-- type="primary"-->
+ <!-- style="padding: 0 10px;margin-left: -8px;margin-top: 3px"-->
+ <!-- class="el-icon-search"-->
+ <!-- :disabled="operation!=='add'||dialogForm.ordertype==='PO'"-->
+ <!-- @click="mesordertsourcesearchclick"-->
+ <!-- />-->
+ <!-- </div>-->
+ <!-- </div>-->
+ <el-form-item label="宸ュ崟鏁伴噺" prop="mesqty">
+ <el-input
+ v-model="dialogForm.mesqty"
+ oninput="value=value.replace(/[^\d]/g,'')"
+ style="width: 200px"
+ />
+ <!-- oninput="value=value.replace(/[^0-9*.{1}0-9*]/g,'')"-->
+ </el-form-item>
+ <el-form-item
+ label="浜у搧鍚嶇О/缂栫爜"
+ prop="partcode"
+ >
+ <el-select
+ v-model="dialogForm.partcode"
+ filterable
+ :disabled="operation!=='add'"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ @change="partcodeChangeDialog"
+ >
+ <el-option
+ v-for="item in partArr"
+ :key="item.partcode"
+ :label="item.partname+'/'+item.partcode"
+ :value="item.partcode"
+ />
+ </el-select>
+ </el-form-item>
+ <!-- <el-form-item v-if="operation!=='add'" label="浜у搧鍚嶇О" prop="partname">-->
+ <!-- <el-input v-model="dialogForm.partname" disabled style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item v-if="operation!=='add'" label="浜у搧缂栫爜">-->
+ <!-- <el-input v-model="dialogForm.partcode" disabled style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <el-form-item label="浜у搧瑙勬牸" prop="partspec">
+ <el-input v-model="dialogForm.partspec" disabled style="width: 200px" />
+ </el-form-item>
+ <!-- :disabled="dialogForm.partcode===''"-->
+ <el-form-item label="鎵�灞炶溅闂�" prop="wkshopcode">
+ <el-select
+ v-model="dialogForm.wkshopcode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨杞﹂棿"
+ >
+ <el-option
+ v-for="item in wkshopArr"
+ :key="item.torg_code"
+ :label="item.torg_name"
+ :value="item.torg_code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="棰勮浜や粯鏃ユ湡" prop="deliverydate">
+ <el-date-picker
+ v-model="dialogForm.deliverydate"
+ type="date"
+ size="mini"
+ :clearable="false"
+ class="dateMini"
+ :picker-options="pickerOptions"
+ format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ />
+ <!-- :disabled="dialogForm.deliverydate"-->
+ </el-form-item>
+
+ <el-divider content-position="left">宸ュ簭淇℃伅</el-divider>
+
+ <div style="display: flex;align-items: center">
+ <!-- <div style="font-weight: bolder">宸ュ簭閫夋嫨锛�</div>-->
+ <!-- <el-drag-select-->
+ <!-- v-model="stepSelectedValue"-->
+ <!-- style="width:930px;"-->
+ <!-- multiple-->
+ <!-- placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"-->
+ <!-- @change="stepSelectedValueChange"-->
+ <!-- >-->
+ <!-- <el-option-->
+ <!-- v-for="item in stepSelectArr"-->
+ <!-- :key="item.stepcode"-->
+ <!-- :label="item.stepname"-->
+ <!-- :value="item.stepcode"-->
+ <!-- />-->
+ <!-- </el-drag-select>-->
+ </div>
+
+ <el-table
+ ref="stepTableDataRef"
+ :data="stepTableData"
+ border
+ :row-class-name="tableRowClassName"
+ height="300"
+ style="width: 100%;margin-top: 15px;"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ row-key="stepcode"
+ >
+ <el-table-column
+ type="index"
+ label="搴忓彿"
+ width="50"
+ />
+ <!-- <el-table-column-->
+ <!-- prop="stepcode"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- label="宸ュ簭缂栫爜"-->
+ <!-- />-->
+ <el-table-column
+ prop="stepname"
+ label="宸ュ簭鍚嶇О"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="stepprice"
+ label="鐢熶骇鍗曚环"
+ show-tooltip-when-overflow
+ >
+ <!-- <template slot-scope="{row}">-->
+ <!-- <el-input-->
+ <!-- v-model="row.stepprice"-->
+ <!-- placeholder="璇疯緭鍏ュ伐搴忓崟浠�"-->
+ <!-- oninput="value=value.replace(/[^0-9.]/g,'')"-->
+ <!-- style="width: 100%"-->
+ <!-- @click.stop=""-->
+ <!-- />-->
+ <!-- </template>-->
+ </el-table-column>
+ <el-table-column
+ prop="produceq_qty"
+ label="宸茬敓鎴愭暟閲�"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="good_qty"
+ label="鍚堟牸鏁伴噺"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="ng_qty"
+ label="涓嶈壇鏁伴噺"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="laborbad_qty"
+ label="宸ュ簾鏁伴噺"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="materielbad_qty"
+ label="鏂欏簾鏁伴噺"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="delive_qty"
+ label="寰呬骇鏁伴噺"
+ show-tooltip-when-overflow
+ />
+ <!-- <el-table-column-->
+ <!-- label="鎿嶄綔"-->
+ <!-- width="120"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div class="operationClass">-->
+ <!-- <!– <el-tooltip class="item" effect="dark" content="绉诲姩" placement="top">–>-->
+ <!-- <i-->
+ <!-- class="el-icon-rank"-->
+ <!-- :style="{color:$store.state.settings.theme}"-->
+ <!-- style="cursor: move"-->
+ <!-- />-->
+ <!-- <!– </el-tooltip>–>-->
+ <!-- <!– @click="edit('edit',row)"–>-->
+
+ <!-- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">-->
+ <!-- <i-->
+ <!-- class="el-icon-delete"-->
+ <!-- :style="{color:$store.state.settings.theme}"-->
+ <!-- style="margin-left: 15px;"-->
+ <!-- @click="stepDel(row)"-->
+ <!-- />-->
+ <!-- </el-tooltip>-->
+ <!-- </div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ </el-table>
+
+ </el-form>
+
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
+ <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">棰勮</el-button>-->
+ <el-button
+ v-if="operation!=='view'"
+ v-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="dialogVisibleConfirm"
+ >纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!-- 宸ュ簭浠诲姟瀵硅瘽妗�-->
+ <el-dialog
+ v-el-drag-dialog
+ title="宸ュ簭浠诲姟"
+ :visible.sync="dialogVisibleTask"
+ width="840px"
+ top="15vh"
+ class="dialogVisibleSearch"
+ :close-on-click-modal="false"
+ @close="dialogVisibleTaskClose"
+ >
+ <el-button
+ v-waves
+ style="margin-bottom: 15px"
+ type="primary"
+ @click="supplementClick"
+ >琛ユ墦
+ </el-button>
+ <el-table
+ :data="taskTableData"
+ border
+ :row-class-name="tableRowClassName"
+ height="300"
+ style="width: 100%;"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ >
+ <el-table-column
+ prop="seq"
+ width="50"
+ label="搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="wo_code"
+ show-tooltip-when-overflow
+ label="宸ュ崟缂栧彿"
+ width="200"
+ />
+ <el-table-column
+ prop="stepcode"
+ label="宸ュ簭缂栫爜"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="stepname"
+ show-tooltip-when-overflow
+ label="宸ュ簭鍚嶇О"
+ />
+ <!-- <el-table-column-->
+ <!-- prop="flwtype"-->
+ <!-- label="宸ュ簭绫诲瀷"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.flwtype==='W'">澶栧崗</div>-->
+ <!-- <div v-if="row.flwtype==='Z'">鑷埗</div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <!-- <el-table-column-->
+ <!-- prop="descr"-->
+ <!-- label="宸ュ簭鎻忚堪"-->
+ <!-- />-->
+ <el-table-column
+ prop="plan_qty"
+ show-tooltip-when-overflow
+ label="浠诲姟鏁伴噺"
+ />
+ <el-table-column
+ prop="good_qty"
+ show-tooltip-when-overflow
+ label="鍚堟牸鏁伴噺"
+ />
+ <el-table-column
+ prop="ng_qty"
+ show-tooltip-when-overflow
+ label="涓嶈壇鏁伴噺"
+ />
+ <el-table-column
+ label="鎿嶄綔"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <el-button v-waves type="text" style="padding: 0;" @click="supplementSmallClick(row)">琛ユ墦</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleBack">杩� 鍥�</el-button>
+ <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
+ </div>
+ </span>
+ </el-dialog>
+
+ <!-- 婧愬崟鍗曞彿瀵硅瘽妗�-->
+ <el-dialog
+ v-el-drag-dialog
+ title="婧愬崟鍗曞彿"
+ :visible.sync="dialogVisibleSource"
+ width="1200px"
+ top="10vh"
+ class="dialogVisibleSearch"
+ :close-on-click-modal="false"
+ @close="dialogVisibleSourceClose"
+ >
+ <div class="bodyTopFormGroup">
+ <el-form
+ ref="sourceForm"
+ :model="sourceForm"
+ label-width="100px"
+ inline
+ style="display: flex;justify-content: space-between"
+ >
+ <div class="elForm" style="justify-content: flex-start">
+ <!-- <el-form-item-->
+ <!-- label="棰勮寮�宸ユ椂闂�"-->
+ <!-- label-width="100px"-->
+ <!-- style=" display: flex;font-size: 14px;margin-top: 3px"-->
+ <!-- >-->
+ <!-- <el-date-picker-->
+ <!-- v-model="sourceForm.paystartdate"-->
+ <!-- type="daterange"-->
+ <!-- range-separator="~"-->
+ <!-- class="timeMini"-->
+ <!-- size="mini"-->
+ <!-- style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"-->
+ <!-- :clearable="false"-->
+ <!-- start-placeholder="寮�濮嬫棩鏈�"-->
+ <!-- end-placeholder="缁撴潫鏃ユ湡"-->
+ <!-- />-->
+ <!-- <!– :picker-options="expireTimeOption"–>-->
+
+ <!-- </el-form-item>-->
+ <!-- <el-form-item-->
+ <!-- label="棰勮瀹屽伐鏃堕棿"-->
+ <!-- label-width="100px"-->
+ <!-- style=" display: flex;font-size: 14px;margin-top: 3px"-->
+ <!-- >-->
+ <!-- <el-date-picker-->
+ <!-- v-model="sourceForm.payenddate"-->
+ <!-- type="daterange"-->
+ <!-- :clearable="false"-->
+ <!-- class="timeMini"-->
+ <!-- range-separator="~"-->
+ <!-- start-placeholder="寮�濮嬫棩鏈�"-->
+ <!-- style="width: 200px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;"-->
+ <!-- end-placeholder="缁撴潫鏃ユ湡"-->
+ <!-- size="mini"-->
+ <!-- />-->
+ <!-- </el-form-item>-->
+ <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">
+ <el-select
+ v-model="sourceForm.mesordercode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in erporderstusArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
+ <el-input v-model="sourceForm.sourceorder" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
+ <el-input v-model="sourceForm.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+
+ <el-form-item v-show="isExpandDialog" label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-input v-model="sourceForm.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandDialog" label="浜у搧瑙勬牸" style=" display: flex;">
+ <el-input v-model="sourceForm.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item v-show="isExpandDialog" label="鍒涘缓浜哄憳" style=" display: flex;">
+ <el-input v-model="sourceForm.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+
+ <el-form-item
+ v-show="isExpandDialog"
+ label="鍒涘缓鏃堕棿"
+ label-width="100px"
+ style=" display: flex;font-size: 14px;margin-top: 3px"
+ >
+ <el-date-picker
+ v-model="sourceForm.createdate"
+ type="daterange"
+ range-separator="~"
+ class="timeMini"
+ size="mini"
+ style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"
+ :clearable="false"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ />
+ <!-- :picker-options="expireTimeOption"-->
+
+ </el-form-item>
+
+ </div>
+
+ <div style="display: flex;align-items: start;margin-top: 3px;z-index: 2;justify-content: end">
+ <el-button v-waves type="primary" icon="el-icon-search" @click="sourceSearch">鏌ヨ</el-button>
+ <el-button v-waves type="info" icon="el-icon-refresh" @click="sourceReset">閲嶇疆</el-button>
+ </div>
+
+ </el-form>
+ <div
+ class="bodyTopFormExpand"
+ >
+ <svg-icon
+ v-show="mouseHoverTypeDialog==='mouseout'"
+ style="cursor: pointer"
+ :icon-class="!isExpandDialog?'doubleDown3':'doubleUp3'"
+ @mouseenter="mouseHoverTypeDialog=$event.type"
+ />
+ <svg-icon
+ v-show="mouseHoverTypeDialog==='mouseenter'"
+ style="cursor: pointer"
+ :icon-class="!isExpandDialog?'doubleDown':'doubleUp'"
+ @click="isExpandDialog=!isExpandDialog"
+ @mouseout="mouseHoverTypeDialog=$event.type"
+ />
+ </div>
+ </div>
+
+ <div class="elTableDiv">
+ <el-table
+ :data="sourceTableData"
+ :height="isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px'"
+ border
+ :row-class-name="tableRowClassName"
+ :style="{width: 100+'%',height:isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px',}"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ @sort-change="sourceSortChange"
+ @row-click="getCurrentRowSource"
+ >
+ <!-- <el-table-column-->
+ <!-- type="selection"-->
+ <!-- width="50"-->
+ <!-- />-->
+ <el-table-column
+ width="50"
+ fixed
+ >
+ <template slot-scope="{row}">
+ <el-radio
+ v-model="radioSelectedId"
+ :label="row.id"
+ style="color: transparent;padding-left: 10px;"
+ />
+ <!-- @change.native="getCurrentRowSource(row.id)"-->
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="RowNum"
+ width="50"
+ fixed
+ label="搴忓彿"
+ />
+ <!-- <el-table-column-->
+ <!-- prop="status"-->
+ <!-- label="宸ュ崟鐘舵��"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- sortable="custom"-->
+ <!-- width="110"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.status==='NEW'">鏂拌鍗�</div>-->
+ <!-- <div v-if="row.status==='CREATING'">閮ㄥ垎涓嬭揪</div>-->
+ <!-- <div v-if="row.status==='CREATED'">鍏ㄩ儴涓嬭揪</div>-->
+ <!-- <div v-if="row.status==='CLOSED'">宸插叧闂�</div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <el-table-column
+ label="宸ュ崟缂栧彿"
+ prop="wo_code"
+ show-tooltip-when-overflow
+ min-width="150"
+ sortable="custom"
+ >
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.m_po">{{ row.m_po }}</div>-->
+ <!-- <div v-else>{{ row.wo_code }}</div>-->
+ <!-- </template>-->
+ </el-table-column>
+ <el-table-column
+ prop="partcode"
+ label="浜у搧缂栫爜"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="150"
+ />
+ <el-table-column
+ prop="partname"
+ label="浜у搧鍚嶇О"
+ sortable="custom"
+ show-tooltip-when-overflow
+ min-width="150"
+ />
+ <el-table-column
+ prop="partspec"
+ label="浜у搧瑙勬牸"
+ show-tooltip-when-overflow
+ sortable="custom"
+ min-width="110"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.partspec">{{ row.partspec }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="plan_qty"
+ label="浠诲姟鏁伴噺"
+ width="150"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+
+ <el-table-column
+ prop="bad_qty"
+ label="鎶ュ簾鏁伴噺"
+ width="150"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+
+ <!-- <el-table-column-->
+ <!-- prop="relse_qty"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- label="宸蹭笅鍗曟暟閲�"-->
+ <!-- width="150"-->
+ <!-- sortable="custom"-->
+ <!-- />-->
+ <el-table-column
+ prop="wkshp_name"
+ label="鐢熶骇杞﹂棿"
+ show-tooltip-when-overflow
+ sortable="custom"
+ width="150"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="plan_startdate"
+ label="棰勮寮�宸ユ椂闂�"
+ show-tooltip-when-overflow
+ sortable="custom"
+ width="130"
+ >
+ <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
+ sortable="custom"
+ width="130"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.plan_enddate">{{ row.plan_enddate.substring(0, 11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="lm_user"
+ label="鍒涘缓浜哄憳"
+ show-tooltip-when-overflow
+ sortable="custom"
+ width="150"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.lm_user">{{ row.lm_user }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="lm_date"
+ label="鍒涘缓鏃堕棿"
+ show-tooltip-when-overflow
+ width="130"
+ 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-->
+ <!-- label="鎿嶄綔"-->
+ <!-- fixed="right"-->
+ <!-- width="80"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div class="operationClass">-->
+ <!-- <el-tooltip class="item" effect="dark" content="涓嬭揪" placement="top">-->
+ <!-- <!– <el-button v-waves type="text" @click="edit('edit',row)">涓嬭揪</el-button>–>-->
+ <!-- <i-->
+ <!-- class="el-icon-bottom"-->
+ <!-- style="color:#42b983;cursor: pointer;margin-left: 5px"-->
+ <!-- @click="edit('edit',row)"-->
+ <!-- />-->
+ <!-- </el-tooltip>-->
+ <!-- </div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ </el-table>
+ </div>
+ <!--鍒嗛〉-->
+ <pagination
+ :total="sourceFormTotal"
+ :page.sync="sourceForm.page"
+ :limit.sync="sourceForm.rows"
+ align="right"
+ layout="total,prev, pager, next,sizes"
+ popper-class="select_bottom"
+ @pagination="getMesBadOrderSearch"
+ />
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleSourceBack">杩� 鍥�</el-button>
+ <el-button v-waves type="primary" @click="dialogVisibleSourceConfirm">纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!--鎵撳嵃棰勮瀵硅瘽妗� 澶ф爣绛�-->
+ <el-dialog
+ v-el-drag-dialog
+ title=""
+ :visible.sync="dialogVisibleApprove"
+ width="812px"
+ class="dialogVisibleConfirmClass"
+ append-to-body
+ :close-on-click-modal="false"
+ @close="dialogVisibleConfirmClose"
+ >
+ <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
+ <div id="printMe" style="padding: 30px">
+ <div style="font-size: 26px; text-align: center">娴佺▼鍗�</div>
+
+ <div style="display: flex;justify-content: space-around;margin-top: 20px; position: relative;">
+ <div style="width: 78%">
+ <el-form
+ ref="formApprove"
+ :model="formApprove"
+ label-width="80px"
+ inline
+ style="display: flex;justify-content: space-between"
+ >
+ <div class="elForm">
+ <el-form-item label="宸ュ崟缂栧彿:" class="formContent">
+ {{ formApprove.mesordercode }}
+ </el-form-item>
+ <el-form-item label="婧愬崟鍗曞彿:" class="formContent">
+ {{ formApprove.m_po }}
+ </el-form-item>
+ <el-form-item label="浜у搧缂栫爜:" class="formContent">
+ {{ formApprove.partcode }}
+ </el-form-item>
+ <el-form-item label="浜у搧鍚嶇О:" class="formContent">
+ {{ formApprove.partname }}
+ </el-form-item>
+ <el-form-item label="浜у搧瑙勬牸:" class="formContent">
+ {{ formApprove.partspec }}
+ </el-form-item>
+ <el-form-item label="宸ュ崟鏁伴噺:" class="formContent">
+ {{ formApprove.plan_qty }}
+ </el-form-item>
+ <!-- <el-form-item label="宸ヨ壓璺嚎:" class="formContent">-->
+ <!-- {{ formApprove.routename }}-->
+ <!-- </el-form-item>-->
+ <el-form-item label="鎵撳嵃浜哄憳:" class="formContent">
+ <!-- {{ localStorage.getItem('username') }}-->
+ {{ formApprove.routename }}
+ </el-form-item>
+ <el-form-item label="鎵撳嵃鏃堕棿:" class="formContent">
+ {{ formApprove.lm_date }}
+ </el-form-item>
+ </div>
+ </el-form>
+ </div>
+ <div
+ id="qrCode"
+ style="width: 22%;height:90px;
+ margin-top: 20px;
+ overflow-y: scroll;display: flex;
+ justify-content: center;
+ position: relative;"
+ >
+ <div id="qrCode0" ref="qrCodeDiv0" />
+ </div>
+ <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />
+ <div
+ style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"
+ />
+ </div>
+
+ <!-- <div style="width:100%;height: 30px;border-bottom: 1px solid #eee;margin-bottom: 20px" />-->
+ <el-table
+ id="table"
+ :data="tableDataPrint"
+ border
+ class="tableDataPrint"
+ :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000'}"
+ :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000'}"
+ style="width: 100%;margin-top: 20px;text-align: center;border-color: #000"
+ >
+ <el-table-column
+ id="column0"
+ prop="seq"
+ label="宸ュ簭鍙�"
+ width="70"
+ align="center"
+ />
+ <el-table-column
+ id="column1"
+ prop="stepqrcode"
+ label="宸ュ簭浜岀淮鐮�"
+ width="100"
+ align="center"
+ >
+ <template slot-scope="{row}">
+ <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" class="tableColumn" />
+ </template>
+ </el-table-column>
+ <el-table-column
+ id="column2"
+ prop="stepname"
+ label="宸ュ簭"
+ width="120"
+ align="center"
+ />
+ <el-table-column
+ id="column3"
+ prop="plan_qty"
+ label="鍔犲伐鏁伴噺"
+ width="100"
+ align="center"
+ />
+ <el-table-column
+ id="column4"
+ prop="good_qty"
+ width="100"
+ align="center"
+ label="鍚堟牸鏁伴噺"
+ />
+ <el-table-column
+ id="column5"
+ width="100"
+ prop="ng_qty"
+ align="center"
+ label="涓嶈壇鏁伴噺"
+ />
+ <el-table-column
+ id="column6"
+ prop="desc"
+ align="center"
+ width="120"
+ label="澶囨敞"
+ />
+ </el-table>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleBackPreview">杩� 鍥�</el-button>
+ <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
+ <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�/鎵� 鍗�</el-button>-->
+ <el-button v-waves v-print="printObj" type="primary">鎵� 鍗�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!--鎵撳嵃棰勮椤甸潰 灏忔爣绛�-->
+ <el-dialog
+ v-el-drag-dialog
+ title="棰勮"
+ :visible.sync="dialogVisible2"
+ width="1000"
+ top="10vh"
+ :close-on-click-modal="false"
+ @close="dialogVisible2Close"
+ >
+ <div style="height: 650px;overflow:auto;">
+ <!-- 涓嬫媺妗嗛�夋嫨鎵撳嵃灏哄-->
+ <div v-if="!isLastPrint" style="display: flex;align-items: center;margin: 0 0 20px 0">
+ <div>閫夋嫨鎵撳嵃灏哄锛�</div>
+ <el-select
+ v-model="printSize"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ @change="printSizeChange"
+ >
+
+ <el-option
+ v-for="item in printSizeSelectArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </div>
+ <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
+ <!-- <div id="printMe2" :style="{paddingLeft:'10px',paddingTop: '5px'}">-->
+ <div v-if="!isLastPrint" :style="printMe2StylePadding(printSize)">
+ <!-- 80 * 50-->
+ <div
+ v-if="printSize===0"
+ style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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;">涓嬮亾宸ュ簭:</div>
+ <div>{{ qrForm.nextstepname }}</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>
+ <!-- 78 * 60 -->
+ <div
+ v-if="printSize===1"
+ style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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;">涓嬮亾宸ュ簭:</div>
+ <div>{{ qrForm.nextstepname }}</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>
+ <!-- 60 * 40 -->
+ <div
+ v-if="printSize===2"
+ style="display: flex;width: 220px;height: 130px;border: 1px solid #000;text-align: center;font-size: 12px"
+ >
+
+ <div style="width: 70px;display: flex;flex-direction: column;border-right: 1px solid #000">
+ <div
+ style="display: flex;height: 60%;border-bottom:1px solid #000;
+ justify-content: center;align-items: center;position: relative"
+ >
+ <div
+ id="qrCode2"
+ ref="qrCodeDiv2"
+ style="overflow-y: hidden;height:71%;position: absolute;left: 7px;"
+ />
+ </div>
+ <div
+ style="display: flex;height: 20%;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+ >
+ <div style="margin-left: 3px; ">鏁伴噺:{{ qrForm.startqty }}</div>
+ </div>
+ <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;">
+ <div style="margin-left: 3px; ">鎿嶄綔:{{ qrForm.operator }}</div>
+
+ </div>
+ </div>
+
+ <div style="width:150px;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="margin-left: 3px;">缂栧彿:{{ 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="margin-left: 3px;">浜у搧缂栫爜:{{ 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="margin-left: 3px;">浜у搧鍚嶇О:{{ 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="margin-left: 3px;">涓嬮亾宸ュ簭:{{ qrForm.nextstepname }}</div>
+
+ </div>
+ <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
+ <div style=" margin-left: 3px;">鏃堕棿: {{ qrForm.operatorTime }}</div>
+ <!-- <div>{{ qrForm.operatorTime?qrForm.operatorTime.substring(5):'' }}</div>-->
+ <!-- <div>{{ qrForm.operatorTime }}</div>-->
+ </div>
+
+ </div>
+
+ </div>
+ <div
+ v-if="printSize===5"
+ style="display: flex;width: 140px;height: 80px;border: 1px solid #000;text-align: center;font-size: 10px;"
+ >
+
+ <div v-if="false" style="width: 45px;display: flex;flex-direction: column;border-right: 1px solid #000">
+ <div
+ style="display: flex;height: 60px;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: 20px;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: 20px;justify-content: flex-start;align-items: center">
+ <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
+ {{ qrForm.operator }}
+ </div>
+ </div>
+
+ <div style="width:100%;display: flex;flex-direction: column;">
+ <div
+ style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: center;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: center;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: center;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: center;align-items: center;text-align: left"
+ >
+ <!-- <div style="width:60px;margin-left: 5px;">涓嬮亾宸ュ簭:</div>-->
+ <div>{{ qrForm.nextstepname }}</div>
+ </div>
+ <div style="display: flex;height: 20%;justify-content: center;align-items: center;text-align: left">
+ <!-- <div style="width: 60px;margin-left: 5px;">澶勭悊鏃堕棿:</div>-->
+ <div>{{ qrForm.operatorTime }}</div>
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+
+ <div v-if="isLastPrint" style="display: flex;flex-direction: column">
+
+ <div style="display: flex;font-weight: bold;font-size: 16px;margin-bottom: 20px;">
+ <div style="width: 48%;">
+ 璇烽�夋嫨鍏ュ簱鏉$爜
+ </div>
+ <div style="width: 48%;margin-left: 4%;">
+ 宸查�変腑鐨勫叆搴撴潯鐮�
+ </div>
+ </div>
+
+ <div style="display: flex;">
+ <!-- 璇烽�夋嫨鍏ュ簱鏉$爜-->
+ <div style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;">
+ <div
+ v-for="(item,index) in lastPrintArr"
+ :key="item.inbarcode"
+ :style="{marginTop:index===0?'':'15px'}"
+ style="display: flex;align-items: center;"
+ >
+
+ <!-- v-if="printSize===0"-->
+ <div style="margin-right:40px">
+ <el-checkbox
+ :key="item.inbarcode"
+ v-model="item.checked"
+ @change="val=>inbarcodeChange(val,item)"
+ />
+ </div>
+ <div
+ style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+ >
+ <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
+ {{ item.good_qty }}
+ </div>
+ <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
+ <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
+ {{ item.username }}
+ </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>{{ item.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>{{ item.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>{{ item.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;">浜у搧瑙勬牸:</div>
+ <div>{{ item.partspec ? item.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>{{ item.lm_date }}</div>
+ </div>
+
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+
+ <!-- 宸查�変腑鐨勫叆搴撴潯鐮�-->
+ <div
+ style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;margin-left: 50px;"
+ >
+ <div id="printMe2">
+ <div
+ v-for="(item,index) in lastPrintArrSelected"
+ v-if="item.checked"
+ :key="item.inbarcode"
+ :style="{marginTop:index===0?'':'15px'}"
+ style="display: flex;align-items: center;"
+ >
+ <div
+ style="display: flex;width: 280px;height: 160px;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: 96px;border-bottom:1px solid #000;
+ justify-content: center;align-items: center;position: relative"
+ >
+ <div
+ id="qrCode3"
+ ref="qrCodeDiv3"
+ style="overflow-y: hidden;height:60px;position: absolute;left: 14px;"
+ />
+ </div>
+ <div
+ style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+ >
+ <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
+ {{ item.good_qty }}
+ </div>
+ <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
+ <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
+ {{ item.username }}
+ </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>{{ item.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>{{ item.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>{{ item.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;">浜у搧瑙勬牸:</div>
+ <div>{{ item.partspec ? item.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>{{ item.lm_date }}</div>
+ </div>
+
+ </div>
+
+ </div>
+
+ </div>
+ </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
+ :close-on-click-modal="false"
+ title="鍏宠仈宸ヨ壓璺嚎"
+ :visible.sync="dialogVisibleRoute"
+ width="800px"
+ top="10vh"
+ :fullscreen="isIpad"
+ class="dialogVisibleRoute"
+ @closed="handleCloseRoute"
+ @close="handleCloseRoute"
+ >
+ <div>
+ <i class="el-icon-s-comment" style="color:#42b983;" /> 浜у搧鍚嶇О锛歿{ dialogFormRoute.projectName }}
+ </div>
+ <el-divider />
+ <div style="margin-bottom: 10px">
+ <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ヨ壓璺嚎闆嗗悎
+ </div>
+
+ <div class="myCheckboxGroup">
+ <div
+ v-for="item in dialogFormRoute.routeOperationArr"
+ :key="item.code"
+ :style="{border:item.isSelected1?'1px solid #42b983':'1px solid #eee'}"
+ class="myCheckbox"
+ @click="myCheckboxClick(item)"
+ >
+ <input
+ class="myCheckboxInput"
+ type="checkbox"
+ :value="item.code"
+ :name="item.name"
+ :style="{color:item.isSelected2?'#42b983':'#fff'}"
+ @click="myCheckboxInputClick(item)"
+ >{{ item.name }}
+ <!-- 鐖跺瓙鐐瑰嚮浜嬩欢涓嶅奖鍝�-->
+ <!-- onClick="event.cancelBubble = true"-->
+ </div>
+ </div>
+
+ <el-divider />
+ <div>
+ <i class="el-icon-s-operation" style="color:#42b983;" /> 榛樿宸ヨ壓璺嚎
+ </div>
+ <div style="margin-top: 20px">
+ <el-select
+ v-model="defaultroute_code"
+ filterable
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ class="defaultroute_code"
+ >
+ <el-option
+ v-for="item in defaultroute_codeArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </div>
+ <el-divider />
+ <div style="margin-bottom: 10px">
+ <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ュ簭鍒楄〃
+ </div>
+ <div style="overflow-y: scroll">
+ <el-table
+ ref="projectTableData"
+ :data="projectTableData"
+ border
+ height="280"
+ :row-class-name="tableRowClassName"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ >
+ <el-table-column
+ prop="seq"
+ width="100"
+ label="宸ュ簭搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="stepcode"
+ label="宸ュ簭缂栫爜"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="stepname"
+ label="宸ュ簭鍚嶇О"
+ show-tooltip-when-overflow
+ />
+ <el-table-column
+ prop="enable"
+ label="鍚敤鐘舵��"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.enable==='Y'">
+ <svg-icon icon-class="circleYes" style="margin-right: 2px" />
+ 鏄�
+ </div>
+ <div v-if="row.enable==='N'">
+ <svg-icon icon-class="circleNo" style="margin-right: 2px" />
+ 鍚�
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="routeDialogVisibleCancel">鍙� 娑�</el-button>
+ <el-button v-waves type="primary" @click="routeDialogVisibleConfirm">纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ </div>
+</template>
+
+<script>
+import Pagination from '@/components/Pagination'
+import { handleDatetime, handleDatetime2, validateCode } from '@/utils/global'
+import { getCookie } from '@/utils/auth'
+import QRCode from 'qrcodejs2'
+import $ from 'jquery'
+import elDragDialog from '@/directive/el-drag-dialog'
+import waves from '@/directive/waves'
+import {
+ AddMesOrderCodeSearch,
+ AddUpdateMesOrder, DeleteMesOrder,
+ MesBadOrderSearch, MesOrderDistribution,
+ MesOrderSearch,
+ UpdateMesOrderStepSearch
+} from '@/api/WorkOrder'
+import { PartSelect } from '@/api/ProductModel'
+import { PrentOrganization, PrentOrganizationNoCompany, StepData } from '@/api/GeneralBasicData'
+import Sortable from 'sortablejs'
+import ElDragSelect from '@/components/DragSelect'
+import { MesOrderPrintSearch } from '@/api/GridReport' // base on element-ui
+
+export default {
+ name: 'WorkOrderSend',
+ components: {
+ Pagination, ElDragSelect
+ },
+ directives: { elDragDialog, waves },
+ data() {
+ return {
+ mouseHoverType: 'mouseout',
+ mouseHoverTypeDialog: 'mouseout',
+ isExpandForm: false,
+ isIpad: false,
+ mainHeight: 0,
+ tableHeight: 0,
+ username: '',
+ form: {
+ wkshopcode: '',
+ mesorderstus: 'ALLO', // 宸ュ崟鐘舵�佺爜
+ mesordercode: '', // 宸ュ崟缂栧彿
+ partcode: '', // 浜у搧缂栫爜
+ ordertype: '', // ordertype
+ sourceorder: '', // 婧愬崟鍗曞彿
+ saleordercode: '', // 閿�鍞鍗�
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+ creatuser: '', // 鍒涘缓浜哄憳
+ createdate: '', // 鍒涘缓鏃堕棿
+ prop: 'lm_date', // 鎺掑簭瀛楁
+ order: 'desc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ },
+ erporderstusArr: [
+ // { code: 'NEW', name: '鏂板伐鍗�' }
+ // { code: 'CREATING', name: '鎵ц涓�' },
+ // { code: 'CREATED', name: '宸插叧闂�' }
+ { code: 'ALLO', name: '宸叉淳鍙�' }
+ // { code: 'START', name: '寮�宸�' },
+ // { code: 'CLOSED', name: '瀹屽伐' }
+ // { code: 'NOSCHED', name: '寰呮帓绋�' },
+ // { code: 'SCHED', name: '宸叉帓绋�' }
+ ],
+ wkshopcodeArr: [],
+ total: 10,
+ tableData: [],
+ dialogVisible: false,
+ dialogForm: {
+ mesorderstus: 'NEW', // 宸ュ崟鐘舵�佺爜
+ mesordercode: '', // 宸ュ崟缂栧彿
+ ordertype: 'PO', // 宸ュ崟绫诲瀷
+ sourceorderid: '', // 婧愬崟id
+ sourceorder: '', // 婧愬崟鍗曞彿
+
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+
+ mesqty: '', // 宸ュ崟鏁伴噺
+ wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
+ wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
+
+ deliverydate: '', // 浜や粯鏃堕棿
+ data_sources: '', // 鏁版嵁鏉ユ簮
+
+ mesmaxqty: 0// 宸ュ崟鐨勬渶澶у��
+ },
+ ordertypeArr: [// 宸ュ崟绫诲瀷
+ { code: 'PO', name: '鏍囧噯宸ュ崟' },
+ { code: 'FO', name: '鎶ュ簾琛ュ崟' }
+ ],
+ partArr: [], // 浜у搧淇℃伅
+ wkshopArr: [], // 鐢熶骇杞﹂棿鏁扮粍
+ routeArr: [], // 宸ヨ壓璺嚎鏁扮粍
+ orderlevArr: [
+ { code: 1, name: '鐗圭骇' },
+ { code: 2, name: '绱ф��' },
+ { code: 3, name: '姝e父' }
+ ], // 宸ュ崟绛夌骇鏁扮粍
+ operation: '',
+ dialogFormRules: {
+ mesorderstus: [
+ { required: true, message: '璇烽�夋嫨璁㈠崟鐘舵��', trigger: ['blur', 'change'] }
+ ],
+ partcode: [
+ { required: true, message: '璇烽�夋嫨浜у搧淇℃伅', trigger: ['blur', 'change'] }
+ ],
+ mesordercode: [
+ { required: true, validator: validateCode, trigger: ['blur', 'change'] }
+ ],
+ mesqty: [
+ { required: true, message: '璇疯緭鍏ュ伐鍗曟暟閲�', trigger: ['blur', 'change'] }
+ ],
+ wkshopcode: [
+ { required: true, message: '璇烽�夋嫨鐢熶骇杞﹂棿', trigger: ['blur', 'change'] }
+ ],
+ deliverydate: [
+ { required: true, message: '璇烽�夋嫨棰勮浜や粯鏃ユ湡', trigger: ['blur', 'change'] }
+ ],
+ planstartdate: [
+ { required: true, message: '璇烽�夋嫨寮�濮嬫椂闂�', trigger: ['blur', 'change'] }
+ ],
+ planenddate: [
+ { required: true, message: '璇烽�夋嫨缁撴潫鏃堕棿', trigger: ['blur', 'change'] }
+ ],
+ orderlev: [
+ { required: true, message: '璇烽�夋嫨宸ュ崟绛夌骇', trigger: ['blur', 'change'] }
+ ],
+ isAps: [
+ { required: true, message: '璇烽�夋嫨鏄惁鎺掔▼', trigger: ['blur', 'change'] }
+ ],
+ bomId: [
+ { required: true, message: '璇烽�夋嫨鐗╂枡娓呭崟', trigger: ['blur', 'change'] }
+ ]
+
+ },
+ dialogVisibleTask: false,
+ taskTableData: [],
+
+ dialogVisibleSearch: false,
+ searchTableData: [],
+ dialogVisibleApprove: false,
+ tableDataPrint: [], // 鎵撳嵃椤甸潰鍐呭
+ printObj: {
+ id: 'printMe',
+ popTitle: '鎵撳嵃妯℃澘',
+ preview: false,
+ extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
+ closeCallback(vue) { // 鍏抽棴鎵撳嵃鐨勫洖璋冧簨浠讹紙鏃犳硶纭畾鐐瑰嚮鐨勬槸纭杩樻槸鍙栨秷锛�
+ console.log('11212', vue)
+ // vue.dialogVisible = false
+ vue.dialogVisibleApprove = false
+ },
+ beforeOpenCallback(vue) {
+ vue.printLoading = true
+ console.log('鎵撳紑涔嬪墠')
+ console.log()
+ },
+ openCallback(vue) {
+ vue.printLoading = false
+ console.log('鎵ц浜嗘墦鍗�')
+ }
+ },
+
+ formApprove: {
+ m_po: '', // 婧愬崟鍗曞彿
+ mesordercode: '',
+ partcode: '',
+ partname: '',
+ partspec: '',
+ plan_qty: '',
+ routename: '',
+ lm_date: ''
+ },
+ number: '',
+ 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: '',
+ nextstepname: '',
+ operator: '', // 鎿嶄綔浜�
+ operatorTime: ''// 鎿嶄綔鏃堕棿
+ },
+ dialogVisibleSource: false,
+ sourceTableData: [],
+ sourceForm: {
+ mesordercode: '', // 宸ュ崟缂栧彿
+ sourceorder: '', // 璁㈠崟缂栧彿
+ saleordercode: '', // 閿�鍞鍗曞彿
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+ creatuser: '', // 鍒涘缓浜哄憳
+ // paystartdate: '', // 浜や粯鏃堕棿
+ // paystartdate: '', // 棰勮寮�宸ユ椂闂�
+ // payenddate: '', // 棰勮瀹屽伐鏃堕棿
+ createdate: '', // 鍒涘缓鏃堕棿
+
+ prop: 'lm_date', // 鎺掑簭瀛楁
+ order: 'desc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ },
+ sourceFormTotal: 10,
+ radioSelectedId: '',
+ isExpandDialog: false, // 瀵硅瘽妗嗚〃鍗曟槸鍚﹀睍寮�锛岄粯璁や笉灞曞紑
+ dialogVisibleRoute: false,
+ dialogFormRoute: {
+ projectName: '', // 浜у搧鍚嶇О
+ projectCode: '', // 浜у搧浠g爜
+ routeOperationArr: [] // 宸ヨ壓璺嚎闆嗗悎
+ },
+ defaultroute_code: '', // 榛樿宸ヨ壓璺嚎閫変腑鍊�
+ defaultroute_codeArr: '', // 榛樿宸ヨ壓璺嚎鏁扮粍
+ projectTableData: [], // 璁惧鍒楄〃
+ tableDataDetail: [], // 鐐瑰嚮宸ュ崟琛ㄧ殑琛� 鏄剧ず璇︾粏淇℃伅
+ printSize: 0,
+ printSizeSelectArr: [// 瀹�*楂�
+ { code: 0, name: '80*50' },
+ { code: 1, name: '78*60' },
+ { code: 2, name: '60*40' }
+ // { code: 2, name: '50*60' },
+ // { code: 3, name: '50*40' },
+ // { code: 4, name: '50*80' },
+ // { code: 5, name: '40*30' }
+ ],
+ pickerOptions: {
+ disabledDate(time) {
+ return time.getTime() < Date.now() - 8.64e7
+ }
+ },
+
+ isLastPrint: false, // 鏄惁鏄湯閬撴墦鍗�
+ lastPrintArr: [], // 鏈亾鎵撳嵃鐨勬暟缁�(鎵�鏈�)
+ lastPrintArrSelected: [], // 鏈亾鎵撳嵃鐨勬暟缁�(閫変腑)
+
+ switchButton: false,
+
+ routeStepArr: '',
+
+ stepTableData: [],
+ sortable: null,
+ stepSelectArr: [], // 宸ュ簭涓嬫媺鏁版嵁
+ stepSelectedValue: [], // 涓嬫媺閫変腑鍊�
+
+ multipleSelection: []
+ }
+ },
+ watch: {
+ 'stepSelectedValue': {
+ // deep: true,
+ handler: function(val) {
+ // do something with the new and old value of stepSelectedValue
+ console.log(val, 1)
+ const arr = JSON.parse(JSON.stringify(this.stepTableData))
+ const arrStepcode = arr.map(i => i.stepcode)
+ this.stepTableData = []
+ val.forEach(i => {
+ this.stepTableData.push(
+ {
+ stepcode: i,
+ stepname: this.stepSelectArr.find(j => j.stepcode === i).stepname,
+ stepprice: arrStepcode.includes(i) ? arr.find(j => j.stepcode === i).stepprice : 0
+ }
+ )
+ })
+ }
+ }
+ },
+ activated() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+ },
+ created() {
+ this.handleRequest()
+ },
+ mounted() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+
+ // this.$nextTick(() => {
+ // this.setSort()
+ // })
+ },
+ methods: {
+ setSort() {
+ const el = this.$refs.stepTableDataRef.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
+ this.sortable = Sortable.create(el, {
+ ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
+ setData: function(dataTransfer) {
+ // to avoid Firefox bug
+ // Detail see : https://github.com/RubaXa/Sortable/issues/1012
+ dataTransfer.setData('Text', '')
+ },
+ onEnd: evt => {
+ const targetRow = this.stepTableData.splice(evt.oldIndex, 1)[0]
+ this.stepTableData.splice(evt.newIndex, 0, targetRow)
+
+ this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ // for show the changes, you can delete in you code
+ // const tempIndex = this.newList.splice(evt.oldIndex, 1)[0]
+ // this.newList.splice(evt.newIndex, 0, tempIndex)
+ }
+ })
+ },
+ tableRowClassName({ row, rowIndex }) {
+ return 'custom-row'
+ },
+ handleRequest() {
+ this.getMesOrderSearch().then(res => {
+ if (res.code === '200') {
+ this.getSelect()
+ this.getPrentOrganizationNoCompany()
+ }
+ })
+ },
+ async getPrentOrganizationNoCompany() {
+ const { data: res } = await PrentOrganizationNoCompany()
+ this.wkshopcodeArr = res
+ },
+ async getMesOrderSearch() {
+ // let tempDate = this.form.createdate
+ // if (tempDate.length > 0) {
+ // tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
+ // }
+
+ const data = {
+ wkshopcode: this.form.wkshopcode, //
+ mesorderstus: this.form.mesorderstus, // 宸ュ崟鐘舵�佺爜
+ mesordercode: this.form.mesordercode, // 宸ュ崟缂栧彿
+ partcode: this.form.partcode, // 浜у搧缂栫爜
+ partname: this.form.partname, // 浜у搧鍚嶇О
+ partspec: this.form.partspec, // 浜у搧瑙勬牸
+ creatuser: this.form.creatuser, // 鍒涘缓浜哄憳
+ sourceorder: this.form.sourceorder, // 婧愬崟鍗曞彿
+ saleordercode: this.form.saleordercode, // 閿�鍞鍗�
+ ordertype: this.form.ordertype, // 鍗曟嵁绫诲瀷
+ createdate: this.form.createdate.toString().length > 0 ? handleDatetime(this.form.createdate) : '', // 鍒涘缓鏃堕棿
+ prop: this.form.prop, // 鎺掑簭瀛楁
+ order: this.form.order, // 鎺掑簭瀛楁
+ page: this.form.page, // 绗嚑椤�
+ rows: this.form.rows // 姣忛〉澶氬皯鏉�
+ }
+ const res = await MesOrderSearch(data)
+ this.tableData = res.data
+ this.total = res.count
+
+ // this.form.createdate = tempDate
+ return { code: res.code }
+ },
+ async getSelect() {
+ // 鑾峰彇浜у搧淇℃伅
+ const { data: res1 } = await PartSelect()
+ this.partArr = res1
+
+ // 鑾峰彇缁勭粐
+ const { data: res2 } = await PrentOrganization()
+ this.wkshopArr = res2
+
+ // 鑾峰彇宸ュ簭
+ const { data: res3 } = await StepData()
+ this.stepSelectArr = res3
+ },
+ // 璁㈠崟鐘舵�佹敼鍙樻椂
+ erporderstusChange(val) {
+ this.form.mesorderstus = val
+ },
+ // 鎺掑簭鏀瑰彉鏃�
+ 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.getMesOrderSearch()
+ },
+ sourceSortChange({ column, prop, order }) {
+ if (order === 'descending') {
+ order = 'desc'
+ } else if (order === 'ascending') {
+ order = 'asc'
+ } else {
+ order = 'desc'
+ }
+ this.sourceForm.order = order
+ this.sourceForm.prop = prop
+ this.getMesBadOrderSearch()
+ },
+ // 鏌ヨ
+ search() {
+ this.getMesOrderSearch()
+ },
+
+ // 閲嶇疆
+ reset(val) {
+ this.form.wkshopcode = ''
+ this.form.mesorderstus = 'ALLO'
+ this.form.mesordercode = ''
+ this.form.partcode = ''
+ this.form.partname = ''
+ this.form.partspec = ''
+ this.form.paydate = ''
+ this.form.creatuser = ''
+ this.form.sourceorder = ''
+ this.form.ordertype = ''
+ this.form.createdate = ''
+ this.getMesOrderSearch()
+ },
+ // 鏂板鎸夐挳
+ async add(operation) {
+ const { data: res } = await AddMesOrderCodeSearch()
+ this.dialogForm.mesordercode = res
+ this.operation = operation
+ this.dialogVisible = true
+ this.dialogForm.data_sources = 'MES'
+
+ this.$nextTick(() => {
+ this.setSort()
+ })
+ },
+ // 宸ュ簭浠诲姟
+ 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.dialogForm.mesordercode = res[0].wo_code
+ // this.dialogVisibleTask = true
+ },
+ dialogVisibleBack() {
+ this.dialogVisibleTask = false
+ },
+ handleSelectionChange(val) {
+ this.multipleSelection = val.map(i => i.wo_code)
+ },
+
+ selected(row, index) {
+ return row.status === 'NEW' && row.isstep === 'Y'
+ },
+ // 娲惧彂
+ send() {
+ this.$confirm('鏄惁纭娲惧彂?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ MesOrderDistribution(this.multipleSelection).then(res => {
+ if (res.code === '200') {
+ this.$notify.success('娲惧彂鎴愬姛!')
+ if (this.form.page > 1 && this.tableData.length === 1) {
+ this.form.page--
+ }
+ this.getMesOrderSearch()
+ }
+ })
+ }).catch(() => {
+ this.$notify.info('宸插彇娑堟淳鍙�')
+ })
+ },
+ // 鍒犻櫎鎸夐挳
+ async del(row) {
+ if (row.status === 'START' || row.status === 'CLOSED' || row.status === 'SCHED') {
+ return this.$message.info('姝ゅ伐鍗曚笉鍙垹闄わ紒')
+ }
+ this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ const data = {
+ souceid: row.sourceid ? row.sourceid : '',
+ wocode: row.wo_code,
+ m_po: row.m_po,
+ orderqty: row.plan_qty
+ }
+ DeleteMesOrder(data).then(res => {
+ if (res.code === '200') {
+ this.$notify.success('鍒犻櫎鎴愬姛!')
+ if (this.form.page > 1 && this.tableData.length === 1) {
+ this.form.page--
+ }
+ this.getMesOrderSearch()
+ }
+ })
+ }).catch(() => {
+ this.$notify.info('宸插彇娑堝垹闄�')
+ })
+ },
+
+ // 淇敼鎸夐挳
+ async edit(operation, row) {
+ this.operation = operation
+
+ this.dialogForm.data_sources = row.data_sources
+ this.dialogForm.mesorderstus = row.status
+ this.dialogForm.mesordercode = row.wo_code
+ this.dialogForm.ordertype = row.wotype
+ this.dialogForm.sourceorderid = row.sourceid
+ this.dialogForm.sourceorder = row.m_po
+ this.dialogForm.partcode = row.partcode
+ this.dialogForm.partname = row.partname
+ this.dialogForm.partspec = row.partspec
+ this.dialogForm.wkshopcode = row.wkshp_code
+ this.dialogForm.deliverydate = row.saleOrderDeliveryDate.substring(0, 11)
+ this.dialogForm.mesqty = row.plan_qty
+
+ const data = {
+ sourceid: this.dialogForm.sourceorderid,
+ sourcewo: this.dialogForm.sourceorder,
+ wocode: this.dialogForm.mesordercode,
+ data_sources: this.dialogForm.data_sources
+ }
+ const { data: res } = await UpdateMesOrderStepSearch(data)
+ this.dialogForm.mesmaxqty = res.canupdate_qty
+ this.stepTableData = res.stepdata
+ // res.stepdata.forEach(i => {
+ // this.stepTableData.push(
+ // {
+ // stepcode: i.step_code,
+ // stepname: i.stepname,
+ // stepprice: i.stepprice
+ // }
+ // )
+ // })
+ // this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+
+ this.dialogVisible = true
+ },
+ // 宸ュ崟鍏抽棴浜嬩欢
+ orderClose() {
+ console.log('宸ュ崟鍏抽棴浜嬩欢')
+ },
+ // 瀵硅瘽妗嗕骇鍝佷俊鎭�兼敼鍙�
+ partcodeChangeDialog(val) {
+ console.log(val)
+ this.dialogForm.partname = this.partArr.find(item => item.partcode === val).partname
+ this.dialogForm.partcode = this.partArr.find(item => item.partcode === val).partcode
+ this.dialogForm.partspec = this.partArr.find(item => item.partcode === val).partspec
+ },
+ // 瀵硅瘽妗嗗叧闂簨浠�
+ handleClose() {
+ this.dialogForm = {
+ mesorderstus: 'NEW', // 宸ュ崟鐘舵�佺爜
+ mesordercode: '', // 宸ュ崟缂栧彿
+ ordertype: 'PO', // 宸ュ崟绫诲瀷
+ sourceorderid: '', // 婧愬崟id
+ sourceorder: '', // 婧愬崟鍗曞彿
+
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+
+ mesqty: '', // 宸ュ崟鏁伴噺
+ wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
+ wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
+
+ deliverydate: '', // 浜や粯鏃堕棿
+ data_sources: '' // 鏁版嵁鏉ユ簮
+ }
+ this.stepSelectedValue = []
+ this.stepTableData = []
+ this.$refs.dialogForm.clearValidate()
+ },
+ // 瀵硅瘽妗嗗彇娑�
+ dialogVisibleCancel() {
+ this.dialogVisible = false
+ },
+ // 瀵硅瘽妗嗙‘璁�
+ dialogVisibleConfirm() {
+ this.$refs.dialogForm.validate(valid => {
+ if (valid) {
+ if (this.dialogForm.ordertype === 'FO' && this.dialogForm.sourceorder.toString().trim().length <= 0) {
+ return this.$message.info('婧愬崟鍗曞彿涓嶈兘涓虹┖锛�')
+ }
+
+ if (this.dialogForm.data_sources === 'ERP' && this.dialogForm.mesmaxqty < this.dialogForm.mesqty) {
+ return this.$message.info('姝ゅ伐鍗曠殑鏈�澶т慨鏀规暟鍊间负锛�' + this.dialogForm.mesmaxqty)
+ }
+
+ const workListSub = []
+ this.stepTableData.forEach((i, j) => {
+ workListSub.push(
+ {
+ stepseq: j + 1,
+ stepcode: i.stepcode,
+ stepprice: i.stepprice,
+ isbott: j === 0 ? 'Y' : 'N',
+ isend: j === this.stepTableData.length - 1 ? 'Y' : 'N'
+ }
+ )
+ })
+
+ const data = {
+ wostatus: this.dialogForm.mesorderstus, // 宸ュ崟鐘舵��
+ wocode: this.dialogForm.mesordercode, // 宸ュ崟鍙�
+ wotype: this.dialogForm.ordertype, // 宸ュ崟绫诲瀷
+ sourceid: this.dialogForm.sourceorderid, // 婧愬崟id
+ sourcewo: this.dialogForm.sourceorder, // 婧愬崟鍗曞彿
+ partcode: this.dialogForm.partcode, // 浜у搧缂栧彿
+ wkshopcode: this.dialogForm.wkshopcode,
+ woqty: this.dialogForm.mesqty, // 宸ュ崟鏁伴噺
+ deliverydate: this.dialogForm.deliverydate, // 浜や粯鏃堕棿
+ data_sources: this.dialogForm.data_sources, // 鏁版嵁鏉ユ簮
+ isstep: workListSub.length > 0 ? 'Y' : 'N', //
+ workListSub
+ }
+
+ this.$store.state.app.buttonIsDisabled = true
+ AddUpdateMesOrder(data, this.operation === 'add' ? 'Add' : 'Update').then(res => {
+ if (res.code === '200') {
+ this.dialogVisible = false
+ // this.handlePrint()
+ this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '娲惧彂鎴愬姛锛�')
+ this.getMesOrderSearch()
+ this.$store.state.app.buttonIsDisabled = false
+ } else {
+ this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '娲惧彂澶辫触锛�')
+ }
+ })
+ }
+ })
+ },
+ // 娲惧彂鎵撳嵃
+ async sendPrint() {
+ const data = {
+ username: getCookie('admin'),
+ // username: getCookie('username'),
+ mesordercode: this.dialogForm.mesordercode
+ }
+ const res = await MesOrderPrintSearch1(data)
+ // const res = await PrintOrder(data)
+ if (res.code === '200') {
+ // 鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
+ var args = {
+ type: 'print', // preview print
+ showOptionDlg: false, // 濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
+ report: urlAddRandomNo('./static/grf/浜у搧娴佷紶鍗旳4.grf'),
+ data: res.data
+ }
+ webapp_ws_ajax_run(args)
+ }
+ },
+
+ // 鑾峰彇椤甸潰楂樺害
+ getHeight() {
+ this.$nextTick(() => {
+ this.mainHeight = window.innerHeight - 85
+ this.tableHeight = this.mainHeight - 245
+ if (window.innerHeight < 769) {
+ this.tableHeight = this.tableHeight - 20
+ }
+ this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
+ this.$refs.tableDataRef.doLayout()
+ })
+ },
+ // 宸ヨ壓璺嚎鏀惧ぇ闀滅偣鍑�
+ async searchClick() {
+ if (this.dialogForm.routecode === '') {
+ return this.$message.info('璇峰厛閫夋嫨宸ヨ壓璺嚎锛�')
+ }
+ this.dialogVisibleSearch = true
+ const { data: res } = await SelectRouteStep({ routecode: this.dialogForm.routecode })
+ this.searchTableData = res
+ },
+ dialogVisibleSearchBack() {
+ this.dialogVisibleSearch = false
+ },
+ // 澶勭悊鎵撳嵃
+ handlePrint(wo_code) {
+ // const number = Math.random() * Math.random()
+ // this.number = number === 0 ? (10 + Math.random()) : number
+ // console.log(number)
+
+ const data2 = {
+ mesordercode: wo_code || this.dialogForm.mesordercode
+ }
+ MesOrderPrintSearch(data2).then(res2 => {
+ if (res2.code === '200') {
+ const res3 = res2.data.recordset
+
+ this.tableDataPrint = res3
+ this.formApprove.mesordercode = res3[0].wo_code
+ this.formApprove.m_po = res3[0].m_po || '/'
+ this.formApprove.partcode = res3[0].partcode
+ this.formApprove.partname = res3[0].partname
+ this.formApprove.partspec = res3[0].partspec || '/'
+ this.formApprove.plan_qty = res3[0].plan_qty
+ this.formApprove.routename = localStorage.getItem('username') // 鎵撳嵃浜哄憳
+ this.formApprove.lm_date = res3[0].lm_date
+
+ this.$nextTick(() => {
+ res3.forEach(i => {
+ this.bindQRCode(i.seq, i.stepqrcode, 'small')
+ })
+ this.bindQRCode('0', this.formApprove.mesordercode, 'big')
+
+ const div = document.getElementById('qrCode')
+ // 杩欎箞澶氫唬鐮佸彧闇�瑕佽繖涓�鍙ュ疄鐜版垜浠墍闇�瑕佺殑鍔熻兘锛屽畾浣峝iv婊氬姩鏉′綅缃湪搴曢儴锛宻crollHeight璁$畻鍑篸iv鐨勯珮搴︼紝鍐峴crollTop 璁剧疆婊氬姩鏉$殑楂樺害涓哄灏�
+ div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
+ // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
+ })
+ this.dialogVisibleApprove = true
+ }
+ })
+ },
+ dialogVisibleTaskClose() {
+ this.dialogForm.mesordercode = ''
+ },
+ /*
+ * 鎵嬪姩鐐瑰嚮鎵撳嵃
+ * */
+ // 杩斿洖鎸夐挳
+ dialogVisibleBackPreview() {
+ this.dialogVisibleApprove = false
+ },
+ // dialogVisibleConfirmPreview(param) {
+ // this.$refs.dialogForm.validate(valid => {
+ // if (valid) {
+ // const data = {
+ // username: getCookie('admin'),
+ // mesordercode: this.dialogForm.mesordercode
+ // }
+ // MesOrderPrintSearch1(data).then(res => {
+ // if (res.code === '200') {
+ // this.dialogVisibleApprove = true
+ // console.log(res, 11)
+ // }
+ // })
+ // }
+ // })
+ // },
+ // 鐢熸垚浜岀淮鐮� 宸ュ崟鎶ヨ〃浜岀淮鐮�
+ bindQRCode(seq, text, size) {
+ if (size === 'big') {
+ console.log(text, 1)
+ new QRCode(this.$refs.qrCodeDiv0, {
+ text: text,
+ width: size === 'big' ? 90 : 60,
+ height: size === 'big' ? 90 : 60,
+ // colorDark: '#333333', // 浜岀淮鐮侀鑹�
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ } else {
+ new QRCode(this.$refs['qrCodeDiv' + seq], {
+ text: text,
+ width: size === 'big' ? 90 : 60,
+ height: size === 'big' ? 90 : 60,
+ // colorDark: '#333333', // 浜岀淮鐮侀鑹�
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ }
+ },
+
+ dialogVisibleConfirmClose() {
+ // this.dialogForm.mesordercode = ''
+ this.formApprove.mesordercode = ''
+ this.formApprove.m_po = ''
+ this.formApprove.partcode = ''
+ this.formApprove.partname = ''
+ this.formApprove.partspec = ''
+ this.formApprove.plan_qty = ''
+ this.formApprove.routename = ''
+ this.formApprove.lm_date = ''
+
+ // this.$refs.qrCodeDiv0.title = ''
+
+ this.tableDataPrint = []
+ },
+ // 琛ユ墦鎸夐挳
+ supplementClick() {
+ this.dialogVisibleTask = false
+ this.handlePrint()
+ },
+ // 琛ユ墦灏忔爣绛�
+ supplementSmallClick(row) {
+ // let obj = {}
+ console.log(row, 21)
+ // this.taskTableData.forEach((item, index) => {
+ this.tableDataDetail.forEach((item, index) => {
+ if (item.seq === row.seq) {
+ console.log(item)
+ this.qrForm = {
+ // qrvalue: item.seq === this.taskTableData.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.taskTableData[item.seq].stepcode,
+ qrvalue: item.seq === this.tableDataDetail.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.tableDataDetail[item.seq].stepcode,
+ // startqty: item.seq === this.taskTableData.length ? item.plan_qty : this.taskTableData[item.seq].plan_qty,
+ startqty: item.seq === this.tableDataDetail.length ? item.plan_qty : this.tableDataDetail[item.seq].plan_qty,
+ wo_code: item.wo_code,
+ partcode: item.partcode,
+ partname: item.partname,
+ // nextstepname: item.seq === this.taskTableData.length ? item.stepname : this.taskTableData[item.seq].stepname,
+ nextstepname: item.seq === this.tableDataDetail.length ? item.stepname : this.tableDataDetail[item.seq].stepname,
+ operator: getCookie('username'),
+ operatorTime: handleDatetime2(new Date())
+ }
+ this.$nextTick(() => {
+ console.log(this.qrForm.qrvalue, 3333)
+ this.bindQRCode2(this.qrForm.qrvalue)
+
+ const div = document.getElementById('qrCode2')
+ // 杩欎箞澶氫唬鐮佸彧闇�瑕佽繖涓�鍙ュ疄鐜版垜浠墍闇�瑕佺殑鍔熻兘锛屽畾浣峝iv婊氬姩鏉′綅缃湪搴曢儴锛宻crollHeight璁$畻鍑篸iv鐨勯珮搴︼紝鍐峴crollTop 璁剧疆婊氬姩鏉$殑楂樺害涓哄灏�
+ div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
+ // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
+ })
+ }
+ })
+
+ // this.dialogVisibleTask = false
+ this.dialogVisible2 = true
+ console.log(this.qrForm, 1111)
+ },
+ // 琛ユ墦鐢熶骇鍏ュ簱鏉$爜
+ async getProductInHouseLabCode(ordercode) {
+ const res = await ProductInHouseLabCode({ ordercode })
+ console.log(res)
+ this.isLastPrint = true
+
+ this.lastPrintArr = res.data
+
+ this.dialogVisible2 = true
+
+ // 鐢熶骇浜岀淮鐮�
+ this.$nextTick(() => {
+ this.lastPrintArr.forEach((i, index) => {
+ i.checked = false
+ new QRCode(this.$refs.qrCodeDiv2[index], {
+ text: i.inbarcode,
+ width: this.printSize !== 2 ? 60 : 55,
+ height: this.printSize !== 2 ? 60 : 55,
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ })
+ })
+ },
+ dialogVisible2Close() {
+ this.qrForm.qrvalue = ''
+ this.qrForm.startqty = ''
+ this.qrForm.wo_code = ''
+ this.qrForm.partcode = ''
+ this.qrForm.partname = ''
+ this.qrForm.nextstepname = ''
+ this.qrForm.operator = ''
+ this.qrForm.operatorTime = ''
+ // this.$refs.qrCodeDiv2 = ''
+ this.isLastPrint = false
+ this.lastPrintArr = []
+ this.lastPrintArrSelected = []
+ },
+ // 鐢熸垚浜岀淮鐮� 宸ュ簭鏍囩浜岀淮鐮�
+ bindQRCode2(text) {
+ new QRCode(this.$refs.qrCodeDiv2, {
+ text: text,
+ width: this.printSize !== 2 ? 60 : 55,
+ height: this.printSize !== 2 ? 60 : 55,
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ },
+ // 鎶ュ簾琛ュ崟鎯呭喌涓嬪彲鐐瑰嚮閫夋嫨
+ mesordertsourcesearchclick() {
+ if (this.dialogForm.ordertype === 'PO') {
+ return this.$message.info('宸ュ崟绫诲瀷涓烘姤搴熻ˉ鍗曟儏鍐典笅鍙�夋嫨锛�')
+ }
+
+ this.getMesBadOrderSearch()
+
+ this.dialogVisibleSource = true
+ },
+ async getMesBadOrderSearch() {
+ // let tempDate2 = this.sourceForm.paystartdate
+ // if (tempDate2.length > 0) {
+ // tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
+ // }
+
+ let tempDate = this.sourceForm.createdate
+ if (tempDate.length > 0) {
+ tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
+ }
+
+ const data = {
+ mesordercode: this.sourceForm.mesordercode, // 宸ュ崟缂栧彿
+ sourceorder: this.sourceForm.sourceorder, // 璁㈠崟璁㈠崟鍙�
+ saleordercode: this.sourceForm.sourceorder, // 璁㈠崟璁㈠崟鍙�
+ partcode: this.sourceForm.partcode, // 浜у搧缂栫爜
+ partname: this.sourceForm.partname, // 浜у搧鍚嶇О
+ partspec: this.sourceForm.partspec, // 浜у搧瑙勬牸
+ // paystartdate: tempDate2, // 浜や粯鏃堕棿
+ // payenddate: tempDate, // 浜や粯鏃堕棿
+ creatuser: this.sourceForm.creatuser, // 鍒涘缓浜哄憳
+ createdate: tempDate, // 鍒涘缓鏃堕棿
+
+ prop: this.sourceForm.prop, // 鎺掑簭瀛楁
+ order: this.sourceForm.order, // 鎺掑簭瀛楁
+ page: this.sourceForm.page, // 绗嚑椤�
+ rows: this.sourceForm.rows // 姣忛〉澶氬皯鏉�
+
+ }
+
+ const res = await MesBadOrderSearch(data)
+ this.sourceTableData = res.data
+ this.sourceFormTotal = res.count
+ },
+ // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
+ // getCurrentRowSource2(id) {
+ // this.radioSelectedId = id
+ // },
+ // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
+ getCurrentRowSource(row, event, column) {
+ this.radioSelectedId = row.id
+ this.dialogForm.mesqty = row.bad_qty
+ },
+ sourceSearch() {
+ this.getMesBadOrderSearch()
+ },
+ sourceReset() {
+ this.sourceForm.mesordercode = ''
+ this.sourceForm.sourceorder = ''
+ this.sourceForm.partcode = ''
+ this.sourceForm.partname = ''
+ this.sourceForm.partspec = ''
+ // this.sourceForm.paystartdate = ''
+ // this.sourceForm.payenddate = ''
+ this.sourceForm.creatuser = ''
+ this.sourceForm.createdate = ''
+ this.getMesBadOrderSearch()
+ },
+ dialogVisibleSourceClose() {
+ this.radioSelectedId = ''
+
+ this.sourceForm.mesordercode = ''
+ this.sourceForm.sourceorder = ''
+ this.sourceForm.partcode = ''
+ this.sourceForm.partname = ''
+ this.sourceForm.partspec = ''
+ this.sourceForm.paystartdate = ''
+ this.sourceForm.payenddate = ''
+ this.sourceForm.creatuser = ''
+ this.sourceForm.createdate = ''
+
+ this.isExpandDialog = false
+ this.sourceTableData = []
+ },
+ dialogVisibleSourceBack() {
+ this.dialogVisibleSource = false
+ },
+ dialogVisibleSourceConfirm() {
+ console.log(this.radioSelectedId)
+ this.sourceTableData.forEach(item => {
+ if (item.id === this.radioSelectedId) {
+ this.dialogForm.sourceorder = item.wo_code
+ this.dialogForm.partcode = item.partcode
+ this.dialogForm.partspec = item.partspec
+ }
+ })
+ this.dialogVisibleSource = false
+ },
+ mesordertypeChange(val) {
+ if (val === 'PO') {
+ this.dialogForm.sourceorder = ''
+ this.dialogForm.partcode = ''
+ this.dialogForm.partspec = ''
+ }
+ },
+ /* 鍏宠仈宸ヨ壓璺嚎妯″潡*/
+ // 鍏宠仈宸ヨ壓璺嚎
+ async routeClick(row) {
+ console.log(row)
+ // this.defaultroute_code = row.default_route
+ this.dialogFormRoute.projectCode = row.partcode
+ this.dialogFormRoute.projectName = row.partname
+ this.dialogVisibleRoute = true
+ const { data: res } = await InventoryFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode })
+ this.dialogFormRoute.routeOperationArr = res
+
+ this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
+ item.isSelected1 = false
+ item.isSelected2 = false
+ if (index === 0) {
+ item.isSelected1 = true
+ this.projectTableData = item.Data
+ }
+ if (item.flag === 'Y') {
+ item.isSelected2 = true
+ this.$nextTick(() => {
+ $('input:checkbox').eq(index).prop('checked', true)
+ })
+ }
+ })
+
+ this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y')
+ },
+ // 瀵硅瘽妗嗗叧闂�
+ handleCloseRoute() {
+ this.dialogFormRoute.routeOperationArr = []
+ this.defaultroute_codeArr = []
+ this.defaultroute_code = ''
+ this.projectTableData = []
+ },
+ // 鍙栨秷
+ routeDialogVisibleCancel() {
+ this.dialogVisibleRoute = false
+ },
+ // 纭畾
+ async routeDialogVisibleConfirm() {
+ const temp = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
+ if (this.defaultroute_code === '' && temp.length > 0) {
+ return this.$message.info('榛樿宸ヨ壓璺嚎涓嶈兘涓虹┖锛�')
+ }
+
+ // 鎻愪氦鏍煎紡
+ const data = []
+ this.dialogFormRoute.routeOperationArr.forEach(item => {
+ if (item.isSelected2) {
+ data.push({ code: item.code, name: item.name })
+ }
+ })
+
+ const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, this.defaultroute_code, data)
+ if (res.code === '200') {
+ this.$message.success('淇濆瓨鎴愬姛锛�')
+ await this.getMesOrderSearch()
+ this.dialogVisibleRoute = false
+ }
+ },
+ // 澶х洅瀛愮偣鍑讳簨浠�
+ myCheckboxClick(val) {
+ console.log(val, 1)
+ this.dialogFormRoute.routeOperationArr.forEach(item => {
+ item.isSelected1 = val.code === item.code
+ })
+
+ this.projectTableData = val.Data
+ },
+ // 灏忕洅瀛愮偣鍑讳簨浠�
+ myCheckboxInputClick(val) {
+ console.log(val, 2)
+ val.isSelected2 = !val.isSelected2
+
+ this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
+ if (val.code === item.code) {
+ item.flag = !item.flag
+ }
+ })
+ if (val.code === this.defaultroute_code) {
+ this.defaultroute_code = ''
+ }
+ this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
+ },
+ // 琛岀偣鍑讳簨浠�
+ async rowClick(row, event, column) {
+ const data = {
+ sourceid: row.sourceid,
+ sourcewo: row.m_po,
+ wocode: row.wo_code,
+ data_sources: row.data_sources
+ }
+ const { data: res } = await UpdateMesOrderStepSearch(data)
+ this.tableDataDetail = res.stepdata
+ },
+ // 宸ュ簭鍒犻櫎
+ stepDel(row) {
+ console.log(row)
+ const index = this.stepSelectedValue.findIndex(i => i === row.stepcode)
+ this.stepSelectedValue.splice(index, 1)
+ },
+ // 鎵撳嵃宸ュ崟
+ printOrder() {
+
+ },
+ // 閫夋嫨鎵撳嵃灏哄鐨勫ぇ灏忓�兼敼鍙�
+ printSizeChange(val) {
+ this.$nextTick(() => {
+ this.bindQRCode2(this.qrForm.qrvalue)
+ })
+ },
+ printMe2StylePadding(val) {
+ if (val === 0) {
+ return { paddingLeft: '10px', paddingTop: '5px' }
+ }
+ if (val === 5) {
+ return { paddingLeft: '15px', paddingTop: '7px' }
+ }
+ },
+
+ inbarcodeChange(val, item) {
+ // 褰� lastPrintArrSelected涓湭鏈夊綋鍓嶅嬀閫夌殑鍊兼槸 璧皃ush item 鍚﹀垯璧拌繃婊ゆ帀item
+ if (val) {
+ this.lastPrintArrSelected.push(item)
+ } else {
+ this.lastPrintArrSelected = this.lastPrintArrSelected.filter(i => i.inbarcode !== item.inbarcode)
+ }
+
+ // 鐢熶骇浜岀淮鐮�
+ this.$nextTick(() => {
+ this.lastPrintArrSelected.forEach((i, index) => {
+ console.log(i.inbarcode, 'i.inbarcode')
+ new QRCode(this.$refs.qrCodeDiv3[index], {
+ text: i.inbarcode,
+ width: 60,
+ height: 60,
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ })
+
+ // const div = document.getElementById('qrCode3')
+ // div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶搴曢儴
+
+ this.$forceUpdate()
+ }, 500)
+ },
+ stepSelectedValueChange(val) {
+ // console.log(val, 123)
+ },
+ getSummaries(param) {
+ const { columns, data } = param
+ const sums = []
+ const i = 8
+ columns.forEach((column, index) => {
+ if (index === i) {
+ sums[index] = '鎬绘暟'
+ return
+ }
+ const values = data.map(item => Number(item[column.property]))
+ if (column.property === 'plan_qty') {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr)
+ if (!isNaN(value)) {
+ return prev + curr
+ // return Math.round(prev * 100) / 100 + Math.round(curr * 100) / 100
+ }
+ }, 0)
+
+ sums[index] += ' 鍗�'
+ }
+ })
+
+ this.$nextTick(() => {
+ this.$refs.tableDataRef.doLayout()
+ })
+ return sums
+ }
+ }
+}
+</script>
+<style>
+.sortable-ghost {
+ opacity: .8;
+ color: #fff !important;
+ background: #42b983 !important;
+}
+</style>
+<style lang="scss" scoped>
+$main_color: #42b983;
+
+.dialogVisibleRoute {
+ .myCheckboxGroup {
+ display: flex;
+ flex-wrap: wrap;
+
+ .myCheckbox {
+ //border: 1px solid $main_color;
+ border: 1px solid #eee;
+ display: flex;
+ min-width: 100px;
+ padding: 10px;
+ margin: 10px 30px 0 0;
+ border-radius: 5px;
+ cursor: default;
+
+ .myCheckboxInput {
+ margin: 1px 5px 0 0;
+ cursor: pointer;
+ }
+
+ }
+
+ //.myCheckbox{
+ // border: 1px solid $main_color;
+ //}
+
+ input[type=checkbox] {
+ cursor: pointer;
+ position: relative;
+ width: 14px;
+ height: 14px;
+ font-size: 14px;
+ }
+
+ input[type=checkbox]::after {
+ position: absolute;
+ top: 0;
+ //color: rgb(130, 35, 35);
+ color: $main_color;
+ width: 14px;
+ height: 14px;
+ display: inline-block;
+ visibility: visible;
+ padding-left: 0px;
+ text-align: center;
+ content: ' ';
+ border-radius: 3px
+ }
+
+ input[type=checkbox]:checked::after {
+ //content: "鉁�";
+ content: "鈭�";
+ color: #fff;
+ font-size: 12px;
+ font-weight: bold;
+ background-color: $main_color;
+ }
+ }
+}
+
+.dialogVisibleRoute {
+ ::v-deep .el-dialog__body {
+ padding: 20px 20px !important;
+ }
+}
+
+.defaultroute_code ::v-deep .el-input__suffix-inner {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-top: -3px;
+}
+
+.el-date-editor {
+ font-size: 14px;
+}
+
+::v-deep .el-dialog__body {
+ padding: 20px 100px !important;
+}
+
+.dialogVisibleSearch ::v-deep .el-dialog__body {
+ padding: 20px 20px !important;
+}
+
+.dialogVisibleConfirmClass ::v-deep .el-dialog__body {
+ padding: 20px 20px !important;
+}
+
+::v-deep .el-table .caret-wrapper {
+ transform: scale(0.8);
+}
+
+::v-deep .el-button--text {
+ color: $main_color;
+ font-size: 14px;
+ cursor: pointer;
+}
+
+::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
+ margin: 10px 30px 0px 0;
+}
+
+.body ::v-deep .el-form-item {
+ margin-bottom: 0;
+}
+
+.elForm ::v-deep .el-form-item {
+ margin-bottom: 0;
+}
+
+.elTableDiv {
+ ::v-deep .el-radio__label {
+ display: none;
+ }
+
+}
+
+.el-table::before {
+ height: 0;
+}
+
+//.dialogVisibleConfirmClass >>>.el-table--border, .el-table--fit {
+// border-bottom: 2px solid #000 ;
+// //outline: #000 solid 2px !important;
+//}
+
+.tableDataPrint ::v-deep div.cell {
+ display: flex !important;
+ align-items: center !important;
+ justify-content: center !important;
+}
+
+.formContent {
+ width: 240px;
+}
+
+</style>
+
+<style media="print">
+/*@media print {*/
+@page {
+ size: auto;
+ margin: 3mm;
+}
+
+</style>
+<style>
+.formContent .el-form-item__label {
+ color: #000 !important;
+}
+</style>
+<!--鍏叡椤甸潰鏍峰紡-->
+<style lang="scss" scoped>
+$main_color: #42b983;
+
+::v-deep .el-range-input {
+ font-size: 14px !important;
+}
+
+::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-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 .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;
+}
+
+.userDialogVisible ::v-deep .el-form-item {
+ margin-bottom: 0;
+}
+
+.dateMini {
+ ::v-deep .el-input__inner {
+ line-height: 34px;
+ height: 34px;
+ width: 200px;
+ display: flex;
+ font-size: 14px !important;
+ align-items: center !important;
+ }
+
+ ::v-deep .el-input__prefix {
+ margin-top: -3px;
+ }
+
+ //::v-deep .el-range__icon{
+ // line-height: 28px;
+ //}
+}
+
+::v-deep .el-select__caret {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.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>
--
Gitblit v1.9.3