From 9193459fbb692abc227b1643ae52f65a2e782ebd Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 28 七月 2022 14:25:18 +0800
Subject: [PATCH] 1.自定义打印完成
---
src/permission.js | 2
src/views/kb/printMe.vue | 138 +-
src/views/scgl/gd.vue | 363 +++++
vue.config.js | 3
src/views/login/index.vue | 4
src/views/scgl/sckbg.vue | 217 ++
src/views/kb/zhkb.vue | 124 ++
src/router/index.js | 4
src/views/kb/kbCommon.css | 51
src/views/scgl/gd_autoPrint.vue | 1210 +++++++++++++++++++
src/main.js | 14
src/assets/images/img3.png | 0
src/views/scgl/sckbg_autoPrint.vue | 1578 +++++++++++++++++++++++++
13 files changed, 3,513 insertions(+), 195 deletions(-)
diff --git a/src/assets/images/img3.png b/src/assets/images/img3.png
index b1215b3..98d69d7 100644
--- a/src/assets/images/img3.png
+++ b/src/assets/images/img3.png
Binary files differ
diff --git a/src/main.js b/src/main.js
index 1ff9ba2..563a5c8 100644
--- a/src/main.js
+++ b/src/main.js
@@ -57,6 +57,20 @@
import watermark from './utils/watermark.js'
Vue.prototype.$watermark = watermark
+// 鏃堕棿杩囨护鍣�
+Vue.filter('dataFormat', function(originVal) {
+ const dt = new Date(originVal)
+
+ const y = dt.getFullYear()
+ const m = (dt.getMonth() + 1 + '').padStart(2, '0')
+ const d = (dt.getDate() + '').padStart(2, '0')
+
+ const hh = (dt.getHours() + '').padStart(2, '0')
+ const mm = (dt.getMinutes() + '').padStart(2, '0')
+ const ss = (dt.getSeconds() + '').padStart(2, '0')
+
+ return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
+})
new Vue({
el: '#app',
router,
diff --git a/src/permission.js b/src/permission.js
index c74144e..5c62eb9 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -8,7 +8,7 @@
NProgress.configure({ showSpinner: false }) // NProgress Configuration
-const whiteList = ['/login', '/kb'] // no redirect whitelist
+const whiteList = ['/login', '/zhkb'] // no redirect whitelist
router.beforeEach(async(to, from, next) => {
// start progress bar
diff --git a/src/router/index.js b/src/router/index.js
index b1d6370..7aa2c43 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -35,8 +35,8 @@
* 鐪嬫澘閮ㄥ垎璺敱
* */
{
- path: '/kb',
- component: () => import('@/views/kb/index'),
+ path: '/zhkb',
+ component: () => import('@/views/kb/zhkb'),
hidden: true
}, {
path: '/kb2',
diff --git a/src/views/kb/kbCommon.css b/src/views/kb/kbCommon.css
index 46b1ff3..237f4d0 100644
--- a/src/views/kb/kbCommon.css
+++ b/src/views/kb/kbCommon.css
@@ -2,40 +2,29 @@
width: 1920px;
height: 1080px;
position: relative;
- background-color: lightblue;
+ background-color: #000;
font-size: 20px;
font-family: Microsoft YaHei;
}
.kb_header {
- background-color: #00a79d;
+ /*background-color: #000;*/
+ background-color: #123;
height: 90px;
line-height: 90px;
font-size: 40px;
-
+ color: #09d8f2;
+}
+.kb_headTime{
+ position: absolute;
+ left: 100px;
+ width: 300px;
+ height: 50px;
+ z-index: 10;
+ top: 20px;
+ font-size: 22px;
}
-.kb_content {
- display: flex;
- position: relative;
- height: 990px;
-}
-
-.kb_left {
- width: 30%;
- height: 100%;
-}
-
-.kb_center {
- width: 40%;
- background-color: #00a79d;
- height: 100%;
-}
-
-.kb_right {
- width: 30%;
- height: 100%;
-}
.flex_c_c {
display: flex;
@@ -50,16 +39,6 @@
/*align-content: center;*/
}
-.kb_block{
- display: flex;
- align-content: center;
- justify-content: center;
- width: 556px;
- height: 400px;
- line-height: 400px;
- background-image: linear-gradient(to bottom right, red , yellow);
- /*background-image: repeating-radial-gradient(red, yellow 10%, green 15%);*/
-
- /*background-color: #5a5e66;*/
- margin: 10px;
+.kb_pd10{
+ padding: 10px;
}
diff --git a/src/views/kb/index.vue b/src/views/kb/printMe.vue
similarity index 84%
rename from src/views/kb/index.vue
rename to src/views/kb/printMe.vue
index d3dee41..c5998db 100644
--- a/src/views/kb/index.vue
+++ b/src/views/kb/printMe.vue
@@ -6,7 +6,7 @@
<el-dialog
title="棰勮"
:visible.sync="dialogVisible"
- width="1140"
+ width="812px"
>
<!-- 瑕佹墦鍗扮殑鍖哄煙 -->
<div id="printMe" style="padding: 30px">
@@ -42,60 +42,52 @@
id="table"
:data="tableData"
border
+ :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000'}"
+ :cell-style="{textAlign: 'center',color:'#000',}"
class="elTable"
style="width: 100%;"
>
<el-table-column
id="column0"
- prop="date"
- label="鏃ユ湡"
- width="100"
+ prop="id"
+ label="宸ュ簭鍙�"
+ width="70"
/>
<el-table-column
id="column1"
- prop="name"
- label="濮撳悕"
+ prop="stepcode"
+ label="宸ュ簭浜岀淮鐮�"
width="100"
/>
<el-table-column
id="column2"
- prop="address"
- label="鍦板潃"
- width="150"
+ prop="stepname"
+ label="宸ュ簭"
+ width="120"
/>
<el-table-column
id="column3"
- prop="address"
- label="鍦板潃"
- width="150"
+ prop="plan_qty"
+ label="鍔犲伐鏁伴噺"
+ width="100"
/>
<el-table-column
id="column4"
- prop="address"
- width="150"
-
- label="鍦板潃"
+ prop="good_qty"
+ width="100"
+ label="鍚堟牸鏁伴噺"
/>
<el-table-column
id="column5"
- width="150"
-
- prop="address"
- label="鍦板潃"
+ width="100"
+ prop="ng_qty"
+ label="涓嶈壇鏁伴噺"
/>
<el-table-column
id="column6"
- prop="address"
+ prop="desc"
width="120"
-
- label="鍦板潃"
- />
- <el-table-column
- id="column7"
- width="119"
-
- prop="address"
- label="鍦板潃"
+ label="澶囨敞"
/>
</el-table>
</div>
@@ -226,7 +218,7 @@
},
QRImgUrl: '',
QRlink: 'www.xxx.com',
- dialogVisible: false,
+ dialogVisible: true,
printObj: {
id: 'printMe',
popTitle: '鎵撳嵃妯℃澘',
@@ -283,23 +275,10 @@
// standard: '',
// extraCss: ''
},
- tableData: [{
- date: '2016-05-02',
- name: '鐜嬪皬铏�',
- address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�'
- }, {
- date: '2016-05-04',
- name: '鐜嬪皬铏�',
- address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1517 寮�'
- }, {
- date: '2016-05-01',
- name: '鐜嬪皬铏�',
- address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1519 寮�'
- }, {
- date: '2016-05-03',
- name: '鐜嬪皬铏�',
- address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1516 寮�'
- }],
+ tableData: [
+ { id: 1, stepcode: '001', stepname: '棰嗘枡', plan_qty: 100, good_qty: 10, ng_qty: 5, desc: '鍚堟牸' },
+ { id: 2, stepcode: '001', stepname: '棰嗘枡', plan_qty: 100, good_qty: 10, ng_qty: 5, desc: '鍚堟牸' }
+ ],
printContentObj: {}
}
},
@@ -311,9 +290,9 @@
// 濡傛灉WEB鎶ヨ〃瀹㈡埛绔▼搴忎负寮�鏈鸿嚜鍚姩锛屼互涓嬭皟鐢ㄥ簲璇ュ幓鎺夈�傛洿澶氳鏄庤鍙傝�冨府鍔┾�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->閮ㄧ讲涓庡畨瑁呪�濋儴鍒嗕腑涓庤胺姝孋hrome娴忚鍣ㄧ殑鐩稿叧璇存槑
webapp_urlprotocol_startup() // 鍚姩WEB鎶ヨ〃瀹㈡埛绔▼搴忥紝浠ヤ究渚﹀惉鎺ュ彈 WebSocket 鏁版嵁
// }
- // this.$nextTick(() => {
- // this.bindQRCode()
- // })
+ this.$nextTick(() => {
+ this.bindQRCode()
+ })
},
methods: {
// addWatermark() {
@@ -324,32 +303,32 @@
// }
// },
clickMe() {
- // this.dialogVisible = true
- // this.$nextTick(() => {
- // this.bindQRCode()
- // this.addWatermark()
- // console.log(document.getElementById('column0').style.width = '200px', 0)
- // console.log(document.getElementById('column7'), 7)
- // console.log(document.getElementById('table'), 2)
- // console.log(document.getElementById('table').getElementsByTagName('el-table'), 1)
- // })
+ // this.dialogVisible = true
+ // this.$nextTick(() => {
+ // this.bindQRCode()
+ // this.addWatermark()
+ // console.log(document.getElementById('column0').style.width = '200px', 0)
+ // console.log(document.getElementById('column7'), 7)
+ // console.log(document.getElementById('table'), 2)
+ // console.log(document.getElementById('table').getElementsByTagName('el-table'), 1)
+ // })
this.dialogVisible = true
},
- // bindQRCode() {
- // if (this.firstbindQRCode) {
- // const text = 'PO202206280001;Step02'
- // new QRCode(this.$refs.qrCodeDiv2, {
- // // text: 'Vue瀹炵幇鐢熸垚浜岀淮鐮侊紒',
- // text: text,
- // width: 80,
- // height: 80,
- // colorDark: '#333333', // 浜岀淮鐮侀鑹�
- // colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- // correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- // })
- // this.firstbindQRCode = false
- // }
- // },
+ bindQRCode() {
+ if (this.firstbindQRCode) {
+ const text = 'PO202206280001;Step02'
+ new QRCode(this.$refs.qrCodeDiv, {
+ // text: 'Vue瀹炵幇鐢熸垚浜岀淮鐮侊紒',
+ text: text,
+ width: 80,
+ height: 80,
+ colorDark: '#333333', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
+ this.firstbindQRCode = false
+ }
+ },
async TestClick() {
const data = {
mesordercode: 'PO202206280001_4',
@@ -433,5 +412,14 @@
/*/deep/.el-table__body-wrapper::-webkit-scrollbar{*/
/* width: 0;*/
/*}*/
+
+/*.el-table--border,.el-table--fit{*/
+/* border-right: 1px solid #000 !important;*/
+/* border-bottom: 1px solid #000 !important;*/
+/*}*/
+/*.el-table--border td, .el-table--border th, .el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed{*/
+/* border-left: 1px solid #000 !important;*/
+/* border-top: 1px solid #000 !important;*/
+/*}*/
</style>
diff --git a/src/views/kb/zhkb.vue b/src/views/kb/zhkb.vue
new file mode 100644
index 0000000..a07a4fe
--- /dev/null
+++ b/src/views/kb/zhkb.vue
@@ -0,0 +1,124 @@
+<template>
+ <div>
+ <div class="kb_dashboard">
+ <div class="kb_header ">
+ <div class="flex_c_c">
+ 澶у矝杞﹂棿缁煎悎鐪嬫澘
+ </div>
+ <div class="kb_headTime">
+ <span>{{ headTime |dataFormat }}</span>
+ </div>
+ </div>
+
+ <div class="kb_content">
+ <div class="kb_left">
+ <div class="kb_left_top kb_pd10">
+ <div v-for="item in leftTopData" :key="item.id">
+ <div class="kb_block ">
+ <div>{{ item.name }}</div>
+ <div style="margin-top: 10px">{{ item.value }}</div>
+ </div>
+ </div>
+ </div>
+ <div class="kb_left_bottom kb_pd10">
+ 2
+ </div>
+ </div>
+ <div class="kb_right kb_pd10">
+ 3
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+import './kbCommon.css'
+
+export default {
+ name: 'Index2',
+ data() {
+ return {
+ headTime: new Date(),
+ leftTopData: [
+ { id: 1, name: '閿傜數浜х嚎', value: 1000, children: [] },
+ { id: 2, name: '鍖呰浜х嚎', value: 1200, children: [] },
+ { id: 3, name: '鍖呰浜х嚎', value: 1300, children: [] }
+ ]//
+ }
+ },
+ created() {
+ },
+ mounted() {
+ // setInterval(this.getNowTime, 500)
+ this.handleData()
+ },
+ methods: {
+ // 澶勭悊鏁版嵁
+ handleData() {
+
+ },
+ // 鑾峰彇褰撳墠鏃堕棿
+ getNowTime() {
+ const dt = new Date()
+
+ const y = dt.getFullYear()
+ const m = (dt.getMonth() + 1 + '').padStart(2, '0')
+ const d = (dt.getDate() + '').padStart(2, '0')
+
+ const hh = (dt.getHours() + '').padStart(2, '0')
+ const mm = (dt.getMinutes() + '').padStart(2, '0')
+ const ss = (dt.getSeconds() + '').padStart(2, '0')
+
+ this.headTime = `${y}-${m}-${d} ${hh}:${mm}:${ss}`
+ }
+ }
+}
+</script>
+
+<style scoped lang="scss">
+
+.kb_content {
+ display: flex;
+ position: relative;
+ height: 990px;
+ width: 100%;
+ background-color: #99a9bf;
+
+ .kb_left {
+ width: 1340px;
+ height: 100%;
+
+ .kb_left_top {
+ height: 495px;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+
+ .kb_block{
+ width: 150px;
+ height: 150px;
+ color: #fff;
+ letter-spacing:5px;
+ background-color: #42b983;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+ }
+ }
+
+ .kb_left_bottom {
+ height: 495px;
+ background-color: #20a0ff;
+ }
+ }
+
+ .kb_right {
+ width: 580px;
+ height: 100%;
+ background-color: #42b983;
+ }
+}
+
+</style>
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 3dc2f42..94f903d 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -155,8 +155,8 @@
}
return {
loginForm: {
- username: '002',
- password: '123456'
+ username: '',
+ password: ''
},
loginRules: {
username: [{ required: true, trigger: ['blur', 'change'], validator: validateUsername }],
diff --git a/src/views/scgl/gd.vue b/src/views/scgl/gd.vue
index 07e2d5a..1c12268 100644
--- a/src/views/scgl/gd.vue
+++ b/src/views/scgl/gd.vue
@@ -467,11 +467,12 @@
/>
</el-table>
</el-dialog>
+
<span slot="footer" class="dialog-footer">
<div class="footerButton">
<el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
- <el-button v-else type="primary" @click="dialogVisibleConfirm">纭� 瀹�/鎵� 鍗�</el-button>
+ <!-- <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">棰勮</el-button>-->
+ <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
</div>
</span>
</el-dialog>
@@ -484,7 +485,13 @@
top="15vh"
class="dialogVisibleSearch"
:close-on-click-modal="false"
+ @close="dialogVisibleTaskClose"
>
+ <el-button
+ style="margin-bottom: 15px"
+ type="primary"
+ @click="supplementClick"
+ >琛ユ墦</el-button>
<el-table
:data="taskTableData"
border
@@ -548,6 +555,137 @@
</span>
</el-dialog>
+ <!-- 鎵撳嵃棰勮瀵硅瘽妗�-->
+ <el-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">
+ <div style="width: 78%">
+ <el-form
+ ref="formApprove"
+ :model="formApprove"
+ label-width="100px"
+ 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.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">
+ {{ username }}
+ </el-form-item>
+ <el-form-item label="鎵撳嵃鏃堕棿锛�" class="formContent">
+ {{ formApprove.lm_date }}
+ </el-form-item>
+ </div>
+ </el-form>
+ </div>
+ <div style="width: 22%;display: flex;justify-content: center;align-items: center">
+ <!-- <div :id="'qrCode'+0" :ref="'qrCodeDiv'+0" />-->
+ <div />
+ </div>
+ </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 @click="dialogVisibleBackPreview">杩� 鍥�</el-button>
+ <!-- <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
+ <!-- <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�/鎵� 鍗�</el-button>-->
+ <el-button v-print="printObj" type="primary">鎵� 鍗�</el-button>
+ </div>
+ </span>
+ </el-dialog>
</div>
</template>
@@ -565,6 +703,7 @@
import { getCookie } from '@/utils/auth'
import { MesOrderPrintSearch1, PrintOrder } from '@/api/utils'
import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
+import QRCode from 'qrcodejs2'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
@@ -588,6 +727,7 @@
isFullscreen: false,
mainHeight: 0,
tableHeight: 0,
+ username: '',
form: {
mesorderstus: '', // 宸ュ崟鐘舵�佺爜
mesordercode: '', // 宸ュ崟缂栧彿
@@ -673,26 +813,42 @@
},
dialogVisibleTask: false,
taskTableData: [],
- // dialogFormTask: {
- // partname: '', // 浜у搧鍚嶇О
- // partspec: '', // 浜у搧瑙勬牸
- // wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
- // routename: '', // 宸ヨ壓璺嚎鍚嶇О
- //
- // mesorderstusName: '', // 宸ュ崟鐘舵�佸悕绉�
- // mesorderstus: '', // 宸ュ崟鐘舵�佺爜
- // mesordercode: '', // 宸ュ崟缂栧彿
- // partcode: '', // 浜у搧缂栫爜
- // mesqty: '', // 宸ュ崟鏁伴噺
- //
- // routecode: '', // 宸ヨ壓璺嚎缂栫爜
- // wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
- // planstartdate: '', // 璁″垝寮�濮嬫椂闂�
- // planenddate: '', // 璁″垝瀹屾垚鏃堕棿
- // orderlev: '' // 宸ュ崟绛夌骇
- // },
+
dialogVisibleSearch: false,
- searchTableData: []
+ 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: {
+ mesordercode: '',
+ partcode: '',
+ partname: '',
+ partspec: '',
+ plan_qty: '',
+ routename: '',
+ lm_date: ''
+ },
+ number: ''
}
},
created() {
@@ -703,7 +859,8 @@
window.addEventListener('resize', this.getHeight)
this.getHeight()
// webapp_urlprotocol_startup()
- webapp_ws_autoupdate(true)
+ // webapp_ws_autoupdate(true)
+ this.username = getCookie('username')
},
methods: {
async getMesOrderSearch() {
@@ -819,6 +976,7 @@
this.dialogVisibleTask = true
const { data: res } = await SearchWorkStep({ wo_code: row.wo_code })
this.taskTableData = res
+ this.dialogForm.mesordercode = res[0].wo_code
},
dialogVisibleBack() {
this.dialogVisibleTask = false
@@ -972,13 +1130,15 @@
orderlev: this.dialogForm.orderlev, // 宸ュ崟绛夌骇
OperType: this.operation === 'add' ? 'Add' : 'Update'
}
+
AddUpdateMesOrder(data).then(res => {
if (res.code === '200') {
- if (this.operation !== 'add') {
- this.sendPrint()
- }
- this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '娲惧彂鎴愬姛锛�')
this.dialogVisible = false
+
+ this.handlePrint()
+
+ this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '娲惧彂鎴愬姛锛�')
+ // this.dialogVisible = false
this.getMesOrderSearch()
} else {
this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '娲惧彂澶辫触锛�')
@@ -990,12 +1150,12 @@
// 娲惧彂鎵撳嵃
async sendPrint() {
const data = {
- // username: getCookie('admin'),
- username: getCookie('username'),
+ username: getCookie('admin'),
+ // username: getCookie('username'),
mesordercode: this.dialogForm.mesordercode
}
- // const res = await MesOrderPrintSearch1(data)
- const res = await PrintOrder(data)
+ const res = await MesOrderPrintSearch1(data)
+ // const res = await PrintOrder(data)
if (res.code === '200') {
// 鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
var args = {
@@ -1007,6 +1167,7 @@
webapp_ws_ajax_run(args)
}
},
+
// 鑾峰彇椤甸潰楂樺害
getHeight() {
this.$nextTick(() => {
@@ -1029,7 +1190,108 @@
},
dialogVisibleSearchBack() {
this.dialogVisibleSearch = false
+ },
+ // 澶勭悊鎵撳嵃
+ handlePrint() {
+ // const number = Math.random() * Math.random()
+ // this.number = number === 0 ? (10 + Math.random()) : number
+ // console.log(number)
+ this.dialogVisibleApprove = true
+ const data2 = {
+ username: getCookie('admin'),
+ mesordercode: this.dialogForm.mesordercode
+ }
+ MesOrderPrintSearch1(data2).then(res2 => {
+ if (res2.code === '200') {
+ const res3 = res2.data.recordset
+
+ this.tableDataPrint = res3
+ this.formApprove.mesordercode = res3[0].wo_code
+ 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 = res3[0].routename
+ this.formApprove.lm_date = res3[0].lm_date
+
+ this.$nextTick(() => {
+ // this.bindQRCode(0, this.formApprove.mesordercode, 'big')
+ res3.forEach(i => {
+ this.bindQRCode(i.seq, i.stepqrcode, 'small')
+ })
+ })
+ }
+ })
+ },
+ 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) {
+ 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.partcode = ''
+ this.formApprove.partname = ''
+ this.formApprove.partspec = ''
+ this.formApprove.plan_qty = ''
+ this.formApprove.routename = ''
+ this.formApprove.lm_date = ''
+ // this.$refs.qrCodeDiv0 = ''
+ // this.$refs.qrCodeDiv1 = ''
+ // this.$refs.qrCodeDiv2 = ''
+ // this.$refs.qrCodeDiv3 = ''
+
+ // // this.$ref['qrCodeDiv'].clearable()
+ // this.tableDataPrint.forEach((item, index) => {
+ // this.$ref[('qrCodeDiv' + index).toString()] = ''
+ // // this.bindQRCode(item.seq, '')
+ // })
+ // // this.bindQRCode(this.tableDataPrint.length, '')
+ // this.$ref[('qrCodeDiv' + this.tableDataPrint.length).toString()] = ''
+ // // this.bindQRCode()
+ this.tableDataPrint = []
+ },
+ // 琛ユ墦鎸夐挳
+ supplementClick() {
+ this.dialogVisibleTask = false
+ this.handlePrint()
}
+
}
}
</script>
@@ -1088,6 +1350,10 @@
}
.dialogVisibleSearch ::v-deep .el-dialog__body {
+ padding: 20px 20px !important;
+}
+
+.dialogVisibleConfirmClass ::v-deep .el-dialog__body {
padding: 20px 20px !important;
}
@@ -1182,6 +1448,10 @@
margin-bottom: 0;
}
+.elForm ::v-deep .el-form-item {
+ margin-bottom: 0;
+}
+
::v-deep .el-input__inner:focus {
border-color: $main_color;
}
@@ -1207,4 +1477,37 @@
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>
diff --git a/src/views/scgl/gd_autoPrint.vue b/src/views/scgl/gd_autoPrint.vue
new file mode 100644
index 0000000..a89ba41
--- /dev/null
+++ b/src/views/scgl/gd_autoPrint.vue
@@ -0,0 +1,1210 @@
+<template>
+ <div>
+ <div class="body" :style="{height:mainHeight+'px'}">
+ <div style="padding: 10px 5px 0 0">
+ <el-form
+ ref="form"
+ :model="form"
+ label-width="80px"
+ inline
+ style="display: flex;justify-content: space-between"
+ >
+ <div class="elForm">
+ <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-select v-model="form.partcode" :popper-append-to-body="false" style="width: 200px" placeholder="璇烽�夋嫨">-->
+ <!-- <el-option-->
+ <!-- v-for="item in OrgTypeArr"-->
+ <!-- :key="item.code"-->
+ <!-- :label="item.name"-->
+ <!-- :value="item.code"-->
+ <!-- />-->
+ <!-- </el-select>-->
+ <el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item label="浜у搧瑙勬牸" style=" display: flex;">
+ <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item label="鍒涘缓浜哄憳" style=" display: flex;">
+ <el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
+ </el-form-item>
+ <el-form-item 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"
+ style="width: 200px;"
+ format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ />
+ </el-form-item>
+ </div>
+ <div style="min-height: 100px">
+ <div style="display: flex;align-items: start;justify-content:end;margin-top: 5px;z-index: 2">
+ <el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
+ <el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
+ </div>
+ <!-- <div v-if="!isFullscreen" style="display: flex;align-items: start; margin-top: 15px;z-index: 2">-->
+ <!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>-->
+ <!-- <el-button type="primary" icon="el-icon-connection" @click="send('send')">娲惧彂</el-button>-->
+ <!-- <el-button type="primary" icon="el-icon-switch-button">璁㈠崟鍏抽棴</el-button>-->
+ <!-- </div>-->
+ <!-- <div v-if="isFullscreen" style="display: flex;flex-direction: column;align-items: end">-->
+ <!-- <div style="display: flex;margin: 10px 0">-->
+ <!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>-->
+ <!-- <el-button type="primary" icon="el-icon-connection" @click="send('send')">娲惧彂</el-button>-->
+ <!-- </div>-->
+ <!-- <el-button type="primary" icon="el-icon-switch-button">璁㈠崟鍏抽棴</el-button>-->
+ <!-- </div>-->
+
+ </div>
+ </el-form>
+ </div>
+ <el-divider />
+ <div style="margin-left: 10px;display: flex">
+ <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
+ <el-button type="primary" icon="el-icon-connection" @click="send('send')">娲惧彂</el-button>
+ <el-button type="primary" icon="el-icon-switch-button" @click="orderClose">宸ュ崟鍏抽棴</el-button>
+ </div>
+ <el-divider />
+ <div class="elTableDiv">
+ <el-table
+ :data="tableData"
+ :height="tableHeight+'px'"
+ border
+ stripe
+ :style="{width: 100+'%',height:tableHeight+'px',}"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ @sort-change="sortChange"
+ >
+ <!-- <el-table-column-->
+ <!-- type="selection"-->
+ <!-- width="50"-->
+ <!-- />-->
+ <el-table-column
+ width="50"
+ fixed
+ >
+ <template slot-scope="{row}">
+ <el-radio
+ v-model="radioSelected"
+ :label="row.wo_code"
+ style="color: #fff;padding-left: 10px; margin-right: -25px;"
+ @change.native="getCurrentRow(row.wo_code)"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="RowNum"
+ width="50"
+ label="搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="status"
+ label="璁㈠崟鐘舵��"
+ 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==='ALLO'">宸叉淳鍙�</div>
+ <div v-if="row.status==='START'">寮�宸�</div>
+ <div v-if="row.status==='CLOSED'">瀹屽伐</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wo_code"
+ label="宸ュ崟缂栧彿"
+ sortable="custom"
+ min-width="160"
+ />
+ <el-table-column
+ prop="partcode"
+ label="浜у搧缂栫爜"
+ sortable="custom"
+ min-width="120"
+ />
+ <el-table-column
+ prop="partname"
+ min-width="150"
+ label="浜у搧鍚嶇О"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partspec"
+ label="浜у搧瑙勬牸"
+ sortable="custom"
+ width="110"
+ />
+ <el-table-column
+ prop="plan_qty"
+ label="宸ュ崟鏁�"
+ sortable="custom"
+ width="100"
+ />
+ <el-table-column
+ prop="wkshp_name"
+ label="鐢熶骇杞﹂棿"
+ sortable="custom"
+ width="120"
+ />
+ <el-table-column
+ prop="route_name"
+ label="宸ヨ壓璺嚎"
+ sortable="custom"
+ min-width="130"
+ />
+
+ <el-table-column
+ prop="plan_startdate"
+ label="璁″垝寮�濮嬫椂闂�"
+ sortable="custom"
+ width="160"
+ />
+ <el-table-column
+ prop="plan_enddate"
+ label="璁″垝缁撴潫鏃堕棿"
+ sortable="custom"
+ width="160"
+ />
+ <el-table-column
+ prop="piroque"
+ label="宸ュ崟绛夌骇"
+ sortable="custom"
+ width="120"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.piroque==='1'">鐗圭骇</div>
+ <div v-if="row.piroque==='2'">绱ф��</div>
+ <div v-if="row.piroque==='3'">姝e父</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="lm_user"
+ label="鍒涘缓浜哄憳"
+ sortable="custom"
+ width="120"
+ />
+ <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-button type="text" @click="check(row)">宸ュ簭浠诲姟</el-button>
+ <el-button type="text" @click="del(row)">鍒犻櫎</el-button>
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ <!--鍒嗛〉-->
+ <pagination
+ v-show="total>0"
+ :total="total"
+ :page.sync="form.page"
+ :limit.sync="form.rows"
+ align="right"
+ layout="prev, pager, next,sizes"
+ popper-class="select_bottom"
+ @pagination="getMesOrderSearch"
+ />
+ </div>
+ <!--鏂板娲惧彂瀵硅瘽妗�-->
+ <el-dialog
+ :title="operation==='add'?'鏂板':'娲惧彂'"
+ :visible.sync="dialogVisible"
+ width="840px"
+ top="15vh"
+ :close-on-click-modal="false"
+ @closed="handleClose"
+ @close="handleClose"
+ >
+ <el-form
+ ref="dialogForm"
+ inline
+ :rules="dialogFormRules"
+ :model="dialogForm"
+ label-width="110px"
+ >
+ <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-form-item>
+ <el-form-item label="宸ュ崟鏁伴噺" prop="mesqty">
+ <el-input
+ v-model="dialogForm.mesqty"
+ oninput="value=value.replace(/[^0-9.]/g,'')"
+ :disabled="operation!=='add'"
+ style="width: 200px"
+ />
+ </el-form-item>
+ <el-form-item
+ v-if="operation==='add'"
+ 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"
+ :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 label="浜у搧缂栫爜" prop="partcode">
+ <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>
+ <div style="display: flex">
+ <div style="display: flex;flex-wrap: nowrap">
+ <el-form-item label="宸ヨ壓璺嚎" prop="routecode">
+ <el-select
+ v-model="dialogForm.routecode"
+ filterable
+ :disabled="dialogForm.partcode===''"
+ :popper-append-to-body="false"
+ style="width: 172px"
+ placeholder="璇烽�夋嫨"
+ @change="routecodeChange"
+ >
+ <el-option
+ v-for="item in routeArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-button
+ type="primary"
+ style="padding: 0 10px;margin-left: -8px;margin-top: 5px"
+ class="el-icon-search"
+ @click="searchClick"
+ />
+ <!-- :disabled="dialogForm.routecode===''"-->
+
+ </div>
+ <el-form-item label="鐢熶骇杞﹂棿" prop="wkshopcode">
+ <el-select
+ v-model="dialogForm.wkshopcode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ :disabled="dialogForm.routecode===''"
+ >
+ <el-option
+ v-for="item in wkshopArr"
+ :key="item.org_code"
+ :label="item.org_name"
+ :value="item.org_code"
+ />
+ </el-select>
+ </el-form-item>
+ </div>
+ <el-form-item label="璁″垝寮�濮嬫椂闂�" prop="planstartdate">
+ <el-date-picker
+ v-model="dialogForm.planstartdate"
+ type="date"
+ :clearable="false"
+ value-format="yyyy-MM-dd"
+ style="width: 200px"
+ placeholder="閫夋嫨鏃ユ湡"
+ />
+ </el-form-item>
+ <el-form-item label="璁″垝瀹屾垚鏃堕棿" prop="planenddate">
+ <el-date-picker
+ v-model="dialogForm.planenddate"
+ type="date"
+ :clearable="false"
+ value-format="yyyy-MM-dd"
+ style="width: 200px"
+ placeholder="閫夋嫨鏃ユ湡"
+ />
+ </el-form-item>
+ <el-form-item label="宸ュ崟绛夌骇" prop="orderlev">
+ <el-select
+ v-model="dialogForm.orderlev"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in orderlevArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ </el-form>
+
+ <!-- 宸ヨ壓璺嚎鏀惧ぇ闀滃璇濇-->
+ <el-dialog
+ title="宸ヨ壓璺嚎"
+ :visible.sync="dialogVisibleSearch"
+ width="840px"
+ top="20vh"
+ class="dialogVisibleSearch"
+ append-to-body
+ :close-on-click-modal="false"
+ >
+ <el-table
+ :data="searchTableData"
+ border
+ stripe
+ height="300"
+ style="width: 100%;"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ >
+ <el-table-column
+ prop="seq"
+ label="搴忓彿"
+ width="50"
+ />
+ <el-table-column
+ prop="stepcode"
+ label="宸ュ簭缂栫爜"
+ />
+ <el-table-column
+ prop="stepname"
+ 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>
+ </el-dialog>
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
+ <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
+ <el-button v-else type="primary" @click="dialogVisibleConfirm">纭� 瀹�/鎵� 鍗�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
+ <!-- 宸ュ簭浠诲姟瀵硅瘽妗�-->
+ <el-dialog
+ title="宸ュ簭浠诲姟"
+ :visible.sync="dialogVisibleTask"
+ width="840px"
+ top="15vh"
+ class="dialogVisibleSearch"
+ :close-on-click-modal="false"
+ >
+ <el-table
+ :data="taskTableData"
+ border
+ stripe
+ 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="搴忓彿"
+ />
+ <el-table-column
+ prop="wo_code"
+ label="宸ュ崟缂栧彿"
+ width="200"
+ />
+ <el-table-column
+ prop="stepcode"
+ label="宸ュ簭缂栫爜"
+ />
+ <el-table-column
+ prop="stepname"
+ 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"
+ label="浠诲姟鏁伴噺"
+ />
+ <el-table-column
+ prop="good_qty"
+ label="鍚堟牸鏁伴噺"
+ />
+ <el-table-column
+ prop="ng_qty"
+ label="涓嶈壇鏁伴噺"
+ />
+ </el-table>
+
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button @click="dialogVisibleBack">杩� 鍥�</el-button>
+ <!-- <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
+ </div>
+ </span>
+ </el-dialog>
+
+ </div>
+</template>
+
+<script>
+import Pagination from '@/components/Pagination'
+import {
+ AddUpdateMesOrder,
+ ClosedMesOrder,
+ DeleteMesOrder,
+ MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep,
+ SelectRouteStep
+} from '@/api/scgl'
+import { PartSelect } from '@/api/zzmx'
+import { handleDatetime } from '@/utils/global'
+import { getCookie } from '@/utils/auth'
+import { MesOrderPrintSearch1, PrintOrder } from '@/api/utils'
+import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
+
+const SER_HZ = /^[\u4e00-\u9fa5]+$/
+export default {
+ name: 'GD',
+ components: {
+ Pagination
+ },
+ 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 {
+ isFullscreen: false,
+ mainHeight: 0,
+ tableHeight: 0,
+ form: {
+ mesorderstus: '', // 宸ュ崟鐘舵�佺爜
+ mesordercode: '', // 宸ュ崟缂栧彿
+ partcode: '', // 浜у搧缂栫爜
+ 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: '瀹屽伐' }
+ ],
+ total: 10,
+ radioSelected: '',
+ tableData: [],
+ dialogVisible: false,
+ dialogForm: {
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+ wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
+ routename: '', // 宸ヨ壓璺嚎鍚嶇О
+
+ mesorderstus: 'NEW', // 宸ュ崟鐘舵�佺爜
+ mesordercode: '', // 宸ュ崟缂栧彿
+ partcode: '', // 浜у搧缂栫爜
+ mesqty: '', // 宸ュ崟鏁伴噺
+
+ routecode: '', // 宸ヨ壓璺嚎缂栫爜
+ wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
+ planstartdate: '', // 璁″垝寮�濮嬫椂闂�
+ planenddate: '', // 璁″垝瀹屾垚鏃堕棿
+ orderlev: '', // 宸ュ崟绛夌骇
+
+ OperType: '' // 鎿嶄綔绫诲瀷
+ },
+ 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: validateName, trigger: ['blur', 'change'] }
+ ],
+ mesqty: [
+ { required: true, message: '璇疯緭鍏ュ伐鍗曟暟閲�', trigger: ['blur', 'change'] }
+ ],
+ wkshopcode: [
+ { required: true, message: '璇烽�夋嫨鐢熶骇杞﹂棿', trigger: ['blur', 'change'] }
+ ],
+ routecode: [
+ { 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'] }
+ ]
+
+ },
+ dialogVisibleTask: false,
+ taskTableData: [],
+ // dialogFormTask: {
+ // partname: '', // 浜у搧鍚嶇О
+ // partspec: '', // 浜у搧瑙勬牸
+ // wkshopname: '', // 鐢熶骇杞﹂棿鍚嶇О
+ // routename: '', // 宸ヨ壓璺嚎鍚嶇О
+ //
+ // mesorderstusName: '', // 宸ュ崟鐘舵�佸悕绉�
+ // mesorderstus: '', // 宸ュ崟鐘舵�佺爜
+ // mesordercode: '', // 宸ュ崟缂栧彿
+ // partcode: '', // 浜у搧缂栫爜
+ // mesqty: '', // 宸ュ崟鏁伴噺
+ //
+ // routecode: '', // 宸ヨ壓璺嚎缂栫爜
+ // wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
+ // planstartdate: '', // 璁″垝寮�濮嬫椂闂�
+ // planenddate: '', // 璁″垝瀹屾垚鏃堕棿
+ // orderlev: '' // 宸ュ崟绛夌骇
+ // },
+ dialogVisibleSearch: false,
+ searchTableData: []
+ }
+ },
+ created() {
+ this.getMesOrderSearch()
+ this.getSelect()
+ },
+ mounted() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+ // webapp_urlprotocol_startup()
+ webapp_ws_autoupdate(true)
+ },
+ methods: {
+ async getMesOrderSearch() {
+ // let tempDate = this.form.createdate
+ // if (tempDate.length > 0) {
+ // tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
+ // }
+
+ const data = {
+ mesorderstus: this.form.mesorderstus, // 宸ュ崟鐘舵�佺爜
+ mesordercode: this.form.mesordercode, // 宸ュ崟缂栧彿
+ partcode: this.form.partcode, // 浜у搧缂栫爜
+ partname: this.form.partname, // 浜у搧鍚嶇О
+ partspec: this.form.partspec, // 浜у搧瑙勬牸
+ creatuser: this.form.creatuser, // 鍒涘缓浜哄憳
+ 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
+ },
+ async getSelect() {
+ // 鑾峰彇浜у搧淇℃伅
+ const { data: res1 } = await PartSelect()
+ this.partArr = res1
+ },
+ // 璁㈠崟鐘舵�佹敼鍙樻椂
+ 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()
+ },
+ // 鏌ヨ
+ search() {
+ this.getMesOrderSearch()
+ },
+
+ // 閲嶇疆
+ reset(val) {
+ this.form.mesorderstus = ''
+ this.form.mesordercode = ''
+ this.form.partcode = ''
+ this.form.partname = ''
+ this.form.partspec = ''
+ this.form.paydate = ''
+ this.form.creatuser = ''
+ this.form.createdate = ''
+ this.getMesOrderSearch()
+ },
+ // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
+ getCurrentRow(wo_code) {
+ this.radioSelected = wo_code
+ },
+ // 鏂板鎸夐挳
+ async add(operation) {
+ this.operation = operation
+ this.dialogVisible = true
+ this.dialogForm.planstartdate = handleDatetime(new Date())
+ this.dialogForm.planenddate = handleDatetime(new Date())
+ this.dialogForm.orderlev = 3
+ },
+
+ // 浜у搧淇℃伅鍊兼敼鍙�
+ async partcodeChange(val) {
+ console.log(val, 22)
+ const { data: res } = await PartSelectRoute({ partcode: val })
+ this.routeArr = res
+
+ let flag = false
+ this.routeArr.forEach(item => {
+ if (item.code === item.default_route) {
+ this.dialogForm.routecode = item.code
+ this.routecodeChange(this.dialogForm.routecode)
+ flag = true
+ }
+ })
+ if (!flag) {
+ this.dialogForm.routecode = ''
+ }
+
+ this.dialogForm.wkshopcode = ''
+ },
+ // 宸ヨ壓璺嚎鍊兼敼鍙�
+ async routecodeChange(val) {
+ const data = {
+ partcode: this.dialogForm.partcode,
+ routecode: this.dialogForm.routecode
+ }
+ // 鑾峰彇鐢熶骇杞﹂棿鏁扮粍
+ const { data: res2 } = await RouteSelectWkshop(data)
+ this.wkshopArr = res2
+ this.dialogForm.wkshopcode = ''
+ },
+ // 宸ュ簭浠诲姟
+ async check(row) {
+ this.dialogVisibleTask = true
+ const { data: res } = await SearchWorkStep({ wo_code: row.wo_code })
+ this.taskTableData = res
+ },
+ dialogVisibleBack() {
+ this.dialogVisibleTask = false
+ },
+ // 娲惧彂
+ send(operation) {
+ if (this.radioSelected.length < 1) {
+ return this.$message.info('璇峰厛閫夋嫨宸ュ崟锛�')
+ }
+
+ const row = this.tableData.find(item => item.wo_code === this.radioSelected)
+
+ if (row.status !== 'NEW') {
+ return this.$message.info('姝ゅ伐鍗曚负闈炴柊宸ュ崟鐘舵�侊紝涓嶅彲娲惧彂锛�')
+ }
+ this.operation = operation
+ this.dialogVisible = true
+ this.$nextTick(() => {
+ this.dialogForm.mesorderstus = row.status
+ this.dialogForm.mesordercode = row.wo_code
+ this.dialogForm.partcode = row.partcode
+ this.partcodeChange(row.partcode)
+ this.dialogForm.partname = row.partname
+ this.dialogForm.mesqty = row.plan_qty
+ this.dialogForm.partspec = row.partspec
+ // this.routecodeChange(this.dialogForm.routecode)
+
+ this.dialogForm.planstartdate = row.plan_startdate !== null ? row.plan_startdate : handleDatetime(new Date())
+ this.dialogForm.planenddate = row.plan_enddate !== null ? row.plan_enddate : handleDatetime(new Date())
+ this.dialogForm.orderlev = row.piroque !== null ? row.piroque : 3 // 绛夌骇
+ })
+ },
+ // 鍒犻櫎鎸夐挳
+ async del(row) {
+ console.log(row.status)
+ if (row.status === 'START' || row.status === 'CLOSED') {
+ return this.$message.info('姝ゅ伐鍗曚笉鍙垹闄わ紒')
+ }
+ this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ console.log(row, 1)
+ const data = {
+ wocode: row.wo_code,
+ m_po: row.m_po,
+ orderqty: row.plan_qty
+ }
+ console.log(data, 2)
+ DeleteMesOrder(data).then(res => {
+ if (res.code === '200') {
+ this.$message.success('鍒犻櫎鎴愬姛!')
+ this.getMesOrderSearch()
+ }
+ })
+ }).catch(() => {
+ this.$message.info('宸插彇娑堝垹闄�')
+ })
+ },
+ // 宸ュ崟鍏抽棴浜嬩欢
+ orderClose() {
+ if (this.radioSelected.length < 1) {
+ return this.$message.info('璇峰厛閫夋嫨宸ュ崟锛�')
+ }
+ console.log('宸ュ崟鍏抽棴浜嬩欢')
+ this.tableData.forEach(item => {
+ if (item.wo_code === this.radioSelected) {
+ if (item.status === 'START') {
+ return this.$message.info('褰撳墠宸ュ崟鏈畬宸ワ紝鏃犳硶鍏抽棴锛�')
+ } else if (item.status === 'CLOSED') {
+ return this.$message.info('宸ュ崟宸插叧闂紝鏃犻渶鍐嶅叧闂紒')
+ } else {
+ this.$confirm('鏄惁纭鍏抽棴宸ュ崟?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ const data = {
+ wocode: item.wo_code,
+ m_po: item.m_po
+ }
+ ClosedMesOrder(data).then(res => {
+ if (res.code === '200') {
+ this.$message.success('宸ュ崟鍏抽棴鎴愬姛!')
+ this.getMesOrderSearch()
+ // this.radioSelected = ''
+ }
+ })
+ }).catch(() => {
+ this.$message.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
+ // const { data: res } = await PartSelectRpute({ partcode: val })
+ // this.routeArr = res
+ // this.dialogForm.routecode = ''
+ this.partcodeChange(val)
+ },
+ // 瀵硅瘽妗嗗叧闂簨浠�
+ handleClose() {
+ this.dialogForm.partname = '' // 浜у搧鍚嶇О
+ this.dialogForm.partspec = '' // 浜у搧瑙勬牸
+ this.dialogForm.wkshopname = '' // 鐢熶骇杞﹂棿鍚嶇О
+ this.dialogForm.routename = '' // 宸ヨ壓璺嚎鍚嶇О
+
+ this.dialogForm.mesorderstus = 'NEW' // 宸ュ崟鐘舵�佺爜
+ this.dialogForm.mesordercode = '' // 宸ュ崟缂栧彿
+ this.dialogForm.partcode = '' // 浜у搧缂栫爜
+ this.dialogForm.mesqty = '' // 宸ュ崟鏁伴噺
+
+ this.dialogForm.routecode = '' // 宸ヨ壓璺嚎缂栫爜
+ this.dialogForm.wkshopcode = '' // 鐢熶骇杞﹂棿缂栫爜
+ this.dialogForm.planstartdate = '' // 璁″垝寮�濮嬫椂闂�
+ this.dialogForm.planenddate = '' // 璁″垝瀹屾垚鏃堕棿
+ this.dialogForm.orderlev = '' // 宸ュ崟绛夌骇
+
+ this.$refs.dialogForm.clearValidate()
+ },
+ // 瀵硅瘽妗嗗彇娑�
+ dialogVisibleCancel() {
+ this.dialogVisible = false
+ },
+ // 瀵硅瘽妗嗙‘璁�
+ dialogVisibleConfirm() {
+ this.$refs.dialogForm.validate(valid => {
+ if (valid) {
+ const data = {
+ // partname: this.dialogForm.partname, // 浜у搧鍚嶇О
+ // partspec: this.dialogForm.partspec, // 浜у搧瑙勬牸
+ // wkshopname: this.dialogForm.wkshopname, // 鐢熶骇杞﹂棿鍚嶇О
+ // routename: this.dialogForm.routename, // 宸ヨ壓璺嚎鍚嶇О
+
+ mesorderstus: this.dialogForm.mesorderstus, // 宸ュ崟鐘舵�佺爜
+ mesordercode: this.dialogForm.mesordercode, // 宸ュ崟缂栧彿
+ partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
+ mesqty: this.dialogForm.mesqty, // 宸ュ崟鏁伴噺
+
+ routecode: this.dialogForm.routecode, // 宸ヨ壓璺嚎缂栫爜
+ wkshopcode: this.dialogForm.wkshopcode, // 鐢熶骇杞﹂棿缂栫爜
+ planstartdate: this.dialogForm.planstartdate, // 璁″垝寮�濮嬫椂闂�
+ planenddate: this.dialogForm.planenddate, // 璁″垝瀹屾垚鏃堕棿
+ orderlev: this.dialogForm.orderlev, // 宸ュ崟绛夌骇
+ OperType: this.operation === 'add' ? 'Add' : 'Update'
+ }
+ AddUpdateMesOrder(data).then(res => {
+ if (res.code === '200') {
+ if (this.operation !== 'add') {
+ this.sendPrint()
+ }
+ this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '娲惧彂鎴愬姛锛�')
+ this.dialogVisible = false
+ this.getMesOrderSearch()
+ } 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 - 250
+ this.tableHeight = this.mainHeight - 100
+ // this.isFullscreen = window.innerHeight < 800
+ if (this.isFullscreen) {
+ this.tableHeight = this.tableHeight - 50
+ }
+ })
+ },
+ // 宸ヨ壓璺嚎鏀惧ぇ闀滅偣鍑�
+ 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
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+$main_color: #42b983;
+::v-deep .el-button--primary {
+ background-color: $main_color !important;
+ height: 30px;
+ display: flex;
+ align-items: center;
+ //border: 1px solid $main_color;
+ border: none;
+ padding: 0 20px;
+}
+
+::v-deep .el-button--primary:hover {
+ border: none;
+}
+
+::v-deep .el-button--info {
+ height: 30px;
+ display: flex;
+ align-items: center;
+ padding: 0 20px;
+}
+
+::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
+ background-color: $main_color !important;
+}
+
+::v-deep .el-dialog__footer {
+ display: flex;
+ justify-content: flex-end;
+}
+
+.footerButton {
+ display: flex;
+ justify-content: end;
+}
+
+::v-deep .el-button--default {
+ background-color: #ffffff !important;
+ height: 30px;
+ display: flex;
+ align-items: center;
+ padding: 0 20px;
+}
+
+::v-deep .el-button--default:hover {
+ color: #606266;
+}
+
+::v-deep .el-dialog__body {
+ padding: 20px 100px !important;
+}
+
+.dialogVisibleSearch ::v-deep .el-dialog__body {
+ padding: 20px 20px !important;
+}
+
+::v-deep .el-radio__input.is-checked .el-radio__inner {
+ background-color: $main_color;
+ border-color: $main_color;
+}
+
+::v-deep .el-radio__input.is-checked + .el-radio__label {
+ color: $main_color !important;
+}
+
+::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
+ border-color: $main_color;
+ background-color: $main_color;
+}
+
+::v-deep .el-input__inner {
+ height: 30px;
+ line-height: 30px;
+}
+
+::v-deep .el-input__inner:focus {
+ border-color: $main_color;
+}
+
+::v-deep .el-table .caret-wrapper {
+ transform: scale(0.8);
+}
+
+::v-deep .cell {
+ display: flex !important;
+ align-items: center !important;
+ justify-content: space-between !important;
+}
+
+::v-deep .el-button--text {
+ color: $main_color;
+ font-size: 14px;
+ cursor: pointer;
+}
+
+.operationClass {
+ height: 23px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.el-icon-share {
+ color: $main_color;
+ cursor: pointer;
+}
+
+.el-checkbox.is-bordered.is-checked {
+ border-color: $main_color;
+}
+
+::v-deep .el-radio__input.is-checked .el-radio__inner {
+ border-color: $main_color;
+ background: $main_color;
+}
+
+::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
+ border-color: $main_color;
+ background: $main_color;
+}
+
+::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
+ color: $main_color !important;
+}
+
+::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
+ margin: 10px 30px 0px 0;
+}
+
+::v-deep .el-radio__input.is-checked + .el-radio__label {
+ color: $main_color;
+}
+
+::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
+ margin: 10px 30px 0px 0;
+}
+
+.body ::v-deep .el-divider {
+ border: 1px solid #eee;
+ width: 99%;
+ margin: 10px auto;
+}
+
+.body ::v-deep .el-form-item {
+ margin-bottom: 0;
+}
+
+::v-deep .el-input__inner:focus {
+ border-color: $main_color;
+}
+
+::v-deep .el-select .el-input__inner:focus {
+ border-color: $main_color;
+}
+
+::v-deep .el-select-dropdown__item.selected {
+ color: $main_color;
+}
+
+::v-deep .el-checkbox__inner:hover {
+ border-color: $main_color;
+}
+
+::v-deep .el-textarea__inner:focus {
+ border-color: $main_color;
+}
+
+.elTableDiv {
+ ::v-deep .el-radio__label {
+ display: none;
+ }
+}
+</style>
diff --git a/src/views/scgl/sckbg.vue b/src/views/scgl/sckbg.vue
index 5984778..9810c13 100644
--- a/src/views/scgl/sckbg.vue
+++ b/src/views/scgl/sckbg.vue
@@ -655,6 +655,68 @@
</div>
</span>
</el-dialog>
+
+ <!--鎵撳嵃棰勮椤甸潰-->
+ <el-dialog
+ title="棰勮"
+ :visible.sync="dialogVisible2"
+ width="1140"
+ @close="dialogVisible2Close"
+ >
+ <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
+ <div id="printMe2" style="padding: 30px;">
+ <div
+ style="display: flex;width: 250px;height: 150px;border: 1px solid #000;text-align: center;font-size: 10px;"
+ >
+
+ <div style="width: 60px;display: flex;flex-direction: column;border-right: 1px solid #000">
+ <div
+ style="display: flex;height: 75%;border-bottom:1px solid #000;justify-content: center;align-items: center "
+ >
+ <div id="qrCode2" ref="qrCodeDiv2" />
+ </div>
+ <div style="display: flex;height: 25%;justify-content: flex-start;align-items: center">
+ <div style="margin-left: 5px;width: 40px">鏁伴噺:</div>
+ {{ qrForm.startqty }}
+ </div>
+ </div>
+
+ <div style="width:190px;display: flex;flex-direction: column">
+ <div
+ style="display: flex;height: 25%;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: 25%;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: 25%;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: 25%;justify-content: flex-start;align-items: center;text-align: left">
+ <div style="width: 60px;margin-left: 5px;">涓嬮亾宸ュ簭:</div>
+ <div>{{ qrForm.nextstepname }}</div>
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button @click="dialogVisible2 = false">鍙� 娑�</el-button>
+ <el-button v-print="printObj2" type="primary">纭� 瀹�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
</div>
</template>
@@ -677,6 +739,7 @@
SavaMesOrderStepReport
} from '@/api/scgl'
import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
+import QRCode from 'qrcodejs2'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
@@ -813,9 +876,53 @@
{ required: true, message: '璇疯緭鍏ユ姤宸ユ暟閲�', trigger: ['blur', 'change'] }
]
},
- activeName: ''
+ activeName: '',
+ dialogVisible2: false,
+ printObj2: {
+ id: 'printMe2',
+ popTitle: '鎵撳嵃妯℃澘',
+ preview: false,
+ extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
+ closeCallback(vue) { // 鍏抽棴鎵撳嵃鐨勫洖璋冧簨浠讹紙鏃犳硶纭畾鐐瑰嚮鐨勬槸纭杩樻槸鍙栨秷锛�
+ console.log('11212', vue)
+ // vue.dialogVisible = false
+ vue.dialogVisible2 = false
+ vue.dialogVisible = false
+ },
+ beforeOpenCallback(vue) {
+ vue.printLoading = true
+ console.log('鎵撳紑涔嬪墠')
+ console.log()
+ },
+ openCallback(vue) {
+ vue.printLoading = false
+ console.log('鎵ц浜嗘墦鍗�')
+ }
+ },
+ qrForm: {
+ qrvalue: '',
+ startqty: '',
+ wo_code: '',
+ partcode: '',
+ partname: '',
+ nextstepname: ''
+ }
}
},
+ // computed: {
+ // qrLink: function() {
+ // return this.$store.getters.getPreviewUrl
+ // }
+ // },
+ // watch: {
+ // qrLink: function(newVal, oldNew) {
+ // if (newVal !== oldNew) {
+ // this.$nextTick(() => {
+ // this.bindQRCode(newVal)
+ // })
+ // }
+ // }
+ // },
created() {
this.getMesOrderStepSearch()
this.tabClick()
@@ -826,9 +933,10 @@
this.$nextTick(() => {
$("input[name='produceCode']")[0].focus()
+ // this.bindQRCode('10001;001')
})
// webapp_urlprotocol_startup()
- webapp_ws_autoupdate(true)
+ // webapp_ws_autoupdate(true)
},
methods: {
async getMesOrderStepSearch() {
@@ -1265,9 +1373,10 @@
}
SavaMesOrderStepIn(data).then(res => {
if (res.code === '200') {
- this.WXprint()
+ this.WXprint2()
this.$message.success('鏀舵枡鎴愬姛锛�')
this.dialogVisible = false
+ this.dialogVisible2 = true
this.tabClick()
} else {
this.$message.error('鏀舵枡澶辫触!')
@@ -1327,11 +1436,13 @@
ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
}
+
SavaMesOrderStepReport(data).then(res => {
if (res.code === '200') {
- this.ZZprint()
+ this.ZZprint2()
this.$message.success('鎶ュ伐鎴愬姛锛�')
this.dialogVisible = false
+ this.dialogVisible2 = true
this.tabClick()
} else {
this.$message.error('鎶ュ伐澶辫触!')
@@ -1341,52 +1452,53 @@
}
})
},
- async ZZprint() {
- const obj = {
- recordset: [
- {
- wo_code: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
- partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
- partname: this.dialogForm.partname, // 浜у搧鍚嶇О
- next_stepname: this.dialogForm.nextstepname, // 涓嬮亾宸ュ簭
- qty: this.dialogForm.startqty, // 鏁伴噺
- // qrcode: this.form.orderstepqrcode// 浜岀淮鐮�
- qrcode: this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode // 浜岀淮鐮�
- }
- ]
- }
- const args = {
- type: 'print', // preview print
- showOptionDlg: false, // 濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
- report: urlAddRandomNo('./static/grf/鎶ュ伐浜у嚭鏍囩.grf'),
- data: obj
- }
- webapp_ws_ajax_run(args)
+ // 鐢熸垚浜岀淮鐮�
+ bindQRCode(text) {
+ new QRCode(this.$refs.qrCodeDiv2, {
+ text: text,
+ width: 50,
+ height: 50,
+ colorDark: '#000', // 浜岀淮鐮侀鑹�
+ colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+ correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+ })
},
- // 澶栧崗鏀舵枡鎵撳嵃
- WXprint() {
- // 鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
- const obj = {
- recordset: [
- {
- wo_code: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
- partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
- partname: this.dialogForm.partname, // 浜у搧鍚嶇О
- next_stepname: this.dialogForm.nextstepname, // 涓嬮亾宸ュ簭
- qty: this.dialogForm.sqty, // 鏁伴噺
- // qrcode: this.WXform.orderstepqrcode// 浜岀淮鐮�
- qrcode: this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode// 浜岀淮鐮�
- }
- ]
- }
- const args = {
- type: 'print', // preview print
- showOptionDlg: false, // 濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
- report: urlAddRandomNo('./static/grf/澶栧崗鏀舵枡鏍囩.grf'),
- data: obj
- }
- webapp_ws_ajax_run(args)
+ ZZprint2() {
+ this.qrForm.qrvalue = this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode
+ this.qrForm.startqty = this.dialogForm.startqty
+ this.qrForm.wo_code = this.dialogForm.wo_code
+ this.qrForm.partcode = this.dialogForm.partcode
+ this.qrForm.partname = this.dialogForm.partname
+ this.qrForm.nextstepname = this.dialogForm.nextstepname
+
+ this.$nextTick(() => {
+ this.bindQRCode(this.qrForm.qrvalue)
+ console.log(this.$refs.qrCodeDiv2, 123)
+ // console.log(this.$refs.qrCodeDiv2.querySelectorAll('#qrCode2>img'), 1)
+ // console.log(this.$refs.qrCodeDiv2.querySelectorAll('#qrCode2>canvas'), 2)
+ })
},
+ WXprint2() {
+ this.qrForm.qrvalue = this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode
+ this.qrForm.startqty = this.dialogForm.sqty
+ this.qrForm.wo_code = this.dialogForm.wo_code
+ this.qrForm.partcode = this.dialogForm.partcode
+ this.qrForm.partname = this.dialogForm.partname
+ this.qrForm.nextstepname = this.dialogForm.nextstepname
+ this.$nextTick(() => {
+ this.bindQRCode(this.qrForm.qrvalue)
+ })
+ },
+ dialogVisible2Close() {
+ this.qrForm.qrvalue = ''
+ this.qrForm.startqty = ''
+ this.qrForm.wo_code = ''
+ this.qrForm.partcode = ''
+ this.qrForm.partname = ''
+ this.qrForm.nextstepname = ''
+ this.$refs.qrCodeDiv2 = ''
+ },
+
// 鑾峰彇椤甸潰楂樺害
getHeight() {
this.$nextTick(() => {
@@ -1576,3 +1688,12 @@
}
}
</style>
+<style media="print">
+/*@media print {*/
+@page {
+ size: auto;
+ margin: 3mm;
+ font-size: 10px;
+}
+
+</style>
diff --git a/src/views/scgl/sckbg_autoPrint.vue b/src/views/scgl/sckbg_autoPrint.vue
new file mode 100644
index 0000000..5984778
--- /dev/null
+++ b/src/views/scgl/sckbg_autoPrint.vue
@@ -0,0 +1,1578 @@
+<template>
+ <div>
+ <div class="body" style="padding: 0;height: 100%" :style="{height:mainHeight+'px'}">
+ <el-tabs ref="elTabs" v-model="activeName" type="border-card" @tab-click="tabClick">
+ <el-tab-pane label="鐢熶骇鍒楄〃">
+ <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between">
+ <div style="display: flex;align-items: center">
+ <div style="width: 90px">鎵弿鏉$爜锛�</div>
+ <!-- oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"-->
+
+ <el-input
+ v-model="form.orderstepqrcode"
+ name="produceCode"
+ style="width: 300px"
+ @keyup.enter.native="val=>enterNative(val,'produceCode')"
+ />
+ </div>
+ <div v-if="false" style="display: flex;padding-right: 10px">
+ <el-button @click="ZZstart">
+ <svg-icon icon-class="start_time" style="margin-right: 2px" />
+ 寮�濮�
+ </el-button>
+ <el-button @click="ZZreport">
+ <svg-icon icon-class="report_work" style="margin-right: 2px" />
+ 鎶ュ伐
+ </el-button>
+ </div>
+ </div>
+ <el-divider />
+ <div class="elTableDiv">
+ <el-table
+ :data="tableData"
+ :height="tableHeight+'px'"
+ border
+ stripe
+ :style="{width: 100+'%',height:tableHeight+'px',}"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ @sort-change="sortChange"
+ >
+ <!-- <el-table-column-->
+ <!-- width="50"-->
+ <!-- fixed-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <el-radio-->
+ <!-- v-model="radioSelected"-->
+ <!-- :label="row.wo"-->
+ <!-- style="color: #fff;padding-left: 10px; margin-right: -25px;"-->
+ <!-- @change.native="getCurrentRow(row.wo)"-->
+ <!-- />-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <el-table-column
+ prop="RowNum"
+ width="50"
+ label="搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="status"
+ label="鐘舵��"
+ sortable="custom"
+ width="110"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.status==='NEW'">鏂拌鍗�</div>
+ <div v-if="row.status==='ALLO'">宸叉淳鍙�</div>
+ <div v-if="row.status==='START'">寮�宸�</div>
+ <div v-if="row.status==='CLOSED'">瀹屽伐</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wo_code"
+ label="宸ュ崟鍙�"
+ min-width="160"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partcode"
+ label="浜у搧缂栫爜"
+ min-width="110"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partname"
+ min-width="110"
+ label="浜у搧鍚嶇О"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="stepname"
+ label="宸ュ簭"
+ min-width="80"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="descr"
+ label="宸ュ簭鎻忚堪"
+ min-width="150"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="plan_qty"
+ label="浠诲姟鏁伴噺"
+ width="110"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="good_qty"
+ label="宸叉姤宸ユ暟閲�(鑹搧)"
+ sortable="custom"
+ width="160"
+ />
+ <el-table-column
+ prop="ng_qty"
+ label="涓嶈壇鏁伴噺"
+ width="150"
+
+ sortable="custom"
+ />
+ <el-table-column
+ prop="plan_startdate"
+ label="璁″垝寮�宸ユ棩鏈�"
+ width="185"
+ sortable="custom"
+ />
+ <!-- <el-table-column-->
+ <!-- label="鎿嶄綔"-->
+ <!-- width="150"-->
+ <!-- fixed="right"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div class="operationClass">-->
+ <!-- <el-button type="text" @click="edit('edit',row)">缂栬緫</el-button>-->
+ <!-- <el-button type="text" @click="del(row)">鍒犻櫎</el-button>-->
+ <!-- </div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ </el-table>
+ </div>
+ <!--鍒嗛〉-->
+ <pagination
+ v-show="total>0"
+ :total="total"
+ :page.sync="form.page"
+ :limit.sync="form.rows"
+ align="right"
+ layout="prev, pager, next,sizes"
+ popper-class="select_bottom"
+ @pagination="getMesOrderStepSearch"
+ />
+ </el-tab-pane>
+ <el-tab-pane label="澶栧崗鍒楄〃">
+ <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between">
+ <div style="display: flex;align-items: center">
+ <div style="width: 90px;">澶栧崗绫诲瀷锛�</div>
+ <el-select
+ v-model="WXSelected"
+ filterable
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in WXSelectArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ <div style="width: 90px;margin-left: 20px">鎵弿鏉$爜锛�</div>
+ <el-input
+ v-model="WXform.orderstepqrcode"
+ name="WXproduceCode"
+ style="width: 300px"
+ @keyup.enter.native="val=>enterNative(val,'WXproduceCode')"
+ />
+ </div>
+ <div v-if="false" style="display: flex;padding-right: 10px">
+ <el-button @click="WXsend">
+ <svg-icon icon-class="start_time" style="margin-right: 2px" />
+ 鍙戞枡
+ </el-button>
+ <el-button @click="WXback">
+ <svg-icon icon-class="report_work" style="margin-right: 2px" />
+ 鏀舵枡
+ </el-button>
+ </div>
+ </div>
+ <el-divider />
+ <div class="elTableDiv">
+ <el-table
+ :data="WXtableData"
+ :height="tableHeight+'px'"
+ border
+ stripe
+ :style="{width: 100+'%',height:tableHeight+'px',}"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ @sort-change="WXsortChange"
+ >
+ <!-- <el-table-column-->
+ <!-- width="50"-->
+ <!-- fixed-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <el-radio-->
+ <!-- v-model="radioSelected"-->
+ <!-- :label="row.wo_code"-->
+ <!-- style="color: #fff;padding-left: 10px; margin-right: -25px;"-->
+ <!-- @change.native="getWXCurrentRow(row.wo_code)"-->
+ <!-- />-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <el-table-column
+ prop="RowNum"
+ width="50"
+ label="搴忓彿"
+ fixed
+ />
+ <el-table-column
+ prop="status"
+ label="鐘舵��"
+ sortable="custom"
+ width="110"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.status==='NEW'">鏂拌鍗�</div>
+ <div v-if="row.status==='ALLO'">宸叉淳鍙�</div>
+ <div v-if="row.status==='START'">宸插彂鏂�</div>
+ <div v-if="row.status==='CLOSED'">宸叉敹鏂�</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wo_code"
+ label="宸ュ崟鍙�"
+ min-width="160"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partcode"
+ label="浜у搧缂栫爜"
+ min-width="110"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partname"
+ label="浜у搧鍚嶇О"
+ min-width="110"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="stepname"
+ label="宸ュ簭"
+ min-width="80"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="descr"
+ label="宸ュ簭鎻忚堪"
+ min-width="150"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="plan_qty"
+ label="浠诲姟鏁伴噺"
+ width="110"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="good_qty"
+ label="宸叉敹鏂欐暟閲�(鑹搧)"
+ sortable="custom"
+ width="160"
+ />
+ <el-table-column
+ prop="ng_qty"
+ label="涓嶈壇鏁伴噺"
+ width="150"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="plan_startdate"
+ label="璁″垝寮�宸ユ棩鏈�"
+ width="185"
+ sortable="custom"
+ />
+ <!-- <el-table-column-->
+ <!-- label="鎿嶄綔"-->
+ <!-- width="150"-->
+ <!-- fixed="right"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div class="operationClass">-->
+ <!-- <el-button type="text" @click="edit('edit',row)">缂栬緫</el-button>-->
+ <!-- <el-button type="text" @click="del(row)">鍒犻櫎</el-button>-->
+ <!-- </div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ </el-table>
+ </div>
+ <!--鍒嗛〉-->
+ <pagination
+ v-show="WXtotal>0"
+ :total="WXtotal"
+ :page.sync="WXform.page"
+ :limit.sync="WXform.rows"
+ align="right"
+ layout="prev, pager, next,sizes"
+ popper-class="select_bottom"
+ @pagination="getMesOrderStepSearch"
+ />
+ </el-tab-pane>
+ </el-tabs>
+
+ </div>
+
+ <el-dialog
+ :title="dialogTitle"
+ :visible.sync="dialogVisible"
+ width="800"
+ class="dialogVisible"
+ :top="dialogTitle==='鑷埗鎶ュ伐'?'5vh':'15vh'"
+ :close-on-click-modal="false"
+ @close="handleClose"
+ @closed="handleClose"
+ >
+ <el-form
+ ref="dialogForm"
+ inline
+ :rules="dialogFormRules"
+ :model="dialogForm"
+ label-width="110px"
+ >
+ <el-form-item label="宸ュ崟缂栧彿锛�">
+ <div style="width: 200px">{{ dialogForm.wo_code }}</div>
+ </el-form-item>
+ <el-form-item label="浜у搧缂栫爜锛�">
+ <div style="width: 200px">{{ dialogForm.partcode }}</div>
+ </el-form-item>
+ <el-form-item label="浜у搧鍚嶇О锛�">
+ <div style="width: 200px">{{ dialogForm.partname }}</div>
+ </el-form-item>
+ <el-form-item label="浜у搧瑙勬牸锛�">
+ <div style="width: 200px">{{ dialogForm.partspec }}</div>
+ </el-form-item>
+ <el-form-item label="褰撳墠宸ュ簭锛�">
+ <div style="width: 200px">{{ dialogForm.stepname }}</div>
+ </el-form-item>
+ <el-form-item label="宸ュ簭鎻忚堪锛�">
+ <!-- <el-tooltip class="item" effect="dark" content="鍘熸潗鏂欏垏鎸夋潗鏂欏垏鎸夋潗鏂欏垏鎸夋椂鎵撳崱鏁版嵁鐨勫崱" placement="top-start">-->
+ <div style="width: 200px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;">
+ {{ dialogForm.stepdesc }}
+ </div>
+ <!-- </el-tooltip>-->
+ </el-form-item>
+ <el-form-item label="浠诲姟鏁伴噺锛�">
+ <div style="width: 200px">{{ dialogForm.planqty }}</div>
+ </el-form-item>
+
+ <el-form-item v-if="dialogTitle==='鑷埗寮�濮�'" label="鏈紑/宸插紑锛�">
+ <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div>
+ </el-form-item>
+ <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="鏈姤/宸叉姤锛�">
+ <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div>
+ </el-form-item>
+ <el-form-item v-if="dialogTitle==='澶栧崗鍙戞枡'" label="鏈彂/宸插彂锛�">
+ <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div>
+ </el-form-item>
+ <el-form-item v-if="dialogTitle==='澶栧崗鏀舵枡'" label="鏈敹/宸叉敹锛�">
+ <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div>
+ </el-form-item>
+ <!--鑷埗寮�濮�-->
+ <el-form-item v-if="dialogTitle==='鑷埗寮�濮�'" label="寮�宸ユ暟閲忥細">
+ <div style="width: 200px">{{ dialogForm.startqty }}</div>
+ <!-- <div style="width: 200px">{{ dialogForm.noreportqty }}</div>-->
+ </el-form-item>
+ <el-form-item v-if="dialogTitle==='鑷埗寮�濮�'" prop="eqpcode" label="鐢熶骇璁惧锛�">
+ <el-select
+ v-model="dialogForm.eqpcode"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in ZZeqpArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <!-- 鑷埗鎶ュ伐 -->
+ <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="涓嬮亾宸ュ簭锛�">
+ <div style="width: 200px">{{ dialogForm.nextstepname }}</div>
+ </el-form-item>
+ <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" prop="usergroupcode" label="鐢熶骇鐝粍锛�">
+ <el-select
+ v-model="dialogForm.usergroupcode"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ @change="usergroupChange"
+ >
+ <el-option
+ v-for="item in ZZtreams"
+ :key="item.group_code"
+ :label="item.group_name"
+ :value="item.group_code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="璁惧鍚嶇О锛�" prop="eqpcode">
+ <el-select
+ v-model="dialogForm.eqpcode"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in ZZeqpArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="鎶ュ伐鏁伴噺锛�" prop="startqty">
+ <el-input v-model="dialogForm.startqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />
+ <!-- <el-input v-model="dialogForm.noreportqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />-->
+ </el-form-item>
+ <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="涓嶈壇鏁伴噺锛�">
+ <el-input v-model="dialogForm.noputqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />
+ </el-form-item>
+ <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="涓嶈壇鍘熷洜锛�">
+ <el-select
+ v-model="dialogForm.badcode"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ :disabled="parseFloat(dialogForm.noputqty)===0||dialogForm.noputqty.trim()===''"
+ multiple
+ >
+ <el-option
+ v-for="item in badArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <div v-if="dialogTitle==='鑷埗鎶ュ伐'">
+ <i class="el-icon-s-operation" style="color:#42b983;" /> 浜哄憳鍒楄〃
+ <el-button type="primary" style="margin: 10px 0" @click="userAdd">澧炶</el-button>
+ <el-table
+ :data="userTableData"
+ border
+ stripe
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ height="180"
+ highlight-current-row
+ style="width: 100%"
+ >
+ <el-table-column
+ width="100"
+ label="搴忓彿"
+ type="index"
+ />
+ <el-table-column
+ prop="username"
+ label="浜哄憳鍚嶇О"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.isVisible===0">{{ row.username }}</div>
+ <el-select
+ v-if="row.isVisible===1"
+ v-model="row.username"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ @change="val=>usernameChange(val,row)"
+ >
+ <el-option
+ v-for="item in ZZuserArr"
+ :key="item.usercode"
+ :label="item.username"
+ :value="item.usercode"
+ />
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="RowNum"
+ label="鎿嶄綔"
+ >
+ <template slot-scope="{row}">
+ <div class="operationClass">
+ <el-button v-if="row.isVisible===0" type="text" @click="userDel(row)">鍒犻櫎</el-button>
+ <el-button v-if="row.isVisible===1&&!userIsSave" type="text" @click="userSave(row)">淇濆瓨</el-button>
+ <el-button v-if="row.isVisible===1" type="text" @click="userCancel(row)">鍙栨秷</el-button>
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+ <!--鍒嗛〉-->
+ <pagination
+ v-show="UserTotal>0"
+ :total="UserTotal"
+ :page.sync="Userform.page"
+ :limit.sync="Userform.rows"
+ align="right"
+ layout="prev, pager, next,sizes"
+ popper-class="select_bottom"
+ @pagination="getMesOrderStepSearch"
+ />
+ </div>
+ <!-- 澶栧崗鍙戞枡-->
+ <el-form-item
+ v-if="dialogTitle==='澶栧崗鍙戞枡'"
+ label="澶栧崗渚涙柟锛�"
+ prop="wxcode"
+ >
+ <el-select
+ v-model="dialogForm.wxcode"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ filterable
+ >
+ <el-option
+ v-for="item in WXouterprovide"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item
+ v-if="dialogTitle==='澶栧崗鍙戞枡'"
+ label="鍙戞枡浜哄憳锛�"
+ prop="outuser"
+ >
+ <el-select
+ v-model="dialogForm.outuser"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ filterable
+ >
+ <el-option
+ v-for="item in WXoutuser"
+ :key="item.usercode"
+ :label="item.username"
+ :value="item.usercode"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item
+ v-if="dialogTitle==='澶栧崗鍙戞枡'"
+ label="鍙戞枡鏁伴噺锛�"
+ prop="fqty"
+ >
+ <el-input v-model="dialogForm.fqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />
+ </el-form-item>
+ <!-- 澶栧崗鏀舵枡-->
+ <el-form-item
+ v-if="dialogTitle==='澶栧崗鏀舵枡'"
+ label="涓嬮亾宸ュ簭锛�"
+ >
+ <div style="width: 200px">{{ dialogForm.nextstepname }}</div>
+ </el-form-item>
+ <el-form-item
+ v-if="dialogTitle==='澶栧崗鏀舵枡'"
+ label="澶栧崗渚涙柟锛�"
+ prop="wxcode"
+ >
+ <el-select
+ v-model="dialogForm.wxcode"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in WXouterprovide"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item
+ v-if="dialogTitle==='澶栧崗鏀舵枡'"
+ label="鏀舵枡浜哄憳锛�"
+ prop="inuser"
+ >
+ <el-select
+ v-model="dialogForm.inuser"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in WXoutuser"
+ :key="item.usercode"
+ :label="item.username"
+ :value="item.usercode"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item
+ v-if="dialogTitle==='澶栧崗鏀舵枡'"
+ label="鏀舵枡鏁伴噺锛�"
+ prop="sqty"
+ >
+ <el-input
+ v-model="dialogForm.sqty"
+ style="width: 200px"
+ oninput="value=value.replace(/[^0-9.]/g,'')"
+ />
+ </el-form-item>
+ <el-form-item
+ v-if="dialogTitle==='澶栧崗鏀舵枡'"
+ label="涓嶈壇鏁伴噺锛�"
+ prop="noputqty"
+ >
+ <el-input
+ v-model="dialogForm.noputqty"
+ style="width: 200px"
+ oninput="value=value.replace(/[^0-9.]/g,'')"
+ />
+ </el-form-item>
+ <el-form-item
+ v-if="dialogTitle==='澶栧崗鏀舵枡'"
+ label="涓嶈壇鍘熷洜锛�"
+ prop="badcode"
+ >
+ <el-select
+ v-model="dialogForm.badcode"
+ style="width: 200px;"
+ multiple
+ :disabled="parseFloat(dialogForm.noputqty)===0||dialogForm.noputqty.trim()===''"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in badArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
+
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
+ <el-button v-if="dialogTitle==='鑷埗寮�濮�'" type="primary" @click="dialogVisibleConfirm">寮� 宸�</el-button>
+ <el-button v-if="dialogTitle==='鑷埗鎶ュ伐'" type="primary" @click="dialogVisibleConfirm">鎻愪氦/鎵撳嵃</el-button>
+ <el-button v-if="dialogTitle==='澶栧崗鍙戞枡'" type="primary" @click="dialogVisibleConfirm">鍙戞枡</el-button>
+ <el-button v-if="dialogTitle==='澶栧崗鏀舵枡'" type="primary" @click="dialogVisibleConfirm">鏀舵枡/鎵撳嵃</el-button>
+ </div>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import Pagination from '@/components/Pagination'
+import $ from 'jquery'
+import {
+ MesOrderGroupSelectUser,
+ MesOrderSelectUser,
+ MesOrderStepReportSelectUserGroup,
+ MesOrderStepSearch,
+ MesOrderStepStart,
+ MesOrderStepStartSelectEqp,
+ MesOrderWxStepSearch,
+ MesOrderStepSelectWX,
+ SavaMesOrderStepOut,
+ MesOrderStepSelectCause,
+ SavaMesOrderStepIn,
+ SavaMesOrderStepStart,
+ SavaMesOrderStepReport
+} from '@/api/scgl'
+import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
+
+const SER_HZ = /^[\u4e00-\u9fa5]+$/
+export default {
+ name: 'SCKBG',
+ components: {
+ Pagination
+ },
+ data() {
+ const validateName = (rule, value, callback) => {
+ if (!value) {
+ return callback(new Error('璇疯緭鍏ョ紪鐮�'))
+ } else {
+ if (SER_HZ.test(value)) {
+ return callback(new Error('缂栫爜涓嶈兘涓轰腑鏂�'))
+ } else {
+ callback()
+ }
+ }
+ }
+ const validateTypeCode = (rule, value, callback) => {
+ if (!value) {
+ return callback(new Error('璇烽�夋嫨涓婄骇'))
+ } else {
+ callback()
+ }
+ }
+ return {
+ mainHeight: 0,
+ tableHeight: 0,
+ // produceCode: '', // 宸ュ簭鐮�
+ // WXproduceCode: '', // 澶栧崗宸ュ簭鐮�
+ radioSelected: '', // 宸ュ簭閫変腑
+ WXradioSelected: '', // 宸ュ簭閫変腑
+ form: {
+ orderstepqrcode: '', // 鎵弿鐨勪簩缁寸爜淇℃伅
+ prop: 'wo_code', // 鎺掑簭瀛楁
+ order: 'asc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ },
+ total: 10,
+ tableData: [],
+ WXform: { // 澶栧崗琛ㄥ崟
+ orderstepqrcode: '', // 鎵弿鐨勪簩缁寸爜淇℃伅
+ prop: 'wo_code', // 鎺掑簭瀛楁z
+ order: 'asc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ },
+ WXtotal: 10, // 澶栧崗琛ㄥ崟鎬绘暟
+ WXtableData: [], // 澶栧崗琛�
+
+ WXSelectArr: [// 澶栧崗绫诲瀷涓嬫媺鍒楄〃
+ { code: 'OUT', name: '鍙戞枡' },
+ { code: 'IN', name: '鏀舵枡' }
+ ],
+ WXSelected: 'OUT', // 澶栧崗涓嬫媺鍒楄〃閫変腑鍊�
+ dialogVisible: false,
+ dialogTitle: '', // 鑷埗寮�濮嬨�佽嚜鍒舵姤宸ャ�佸鍗忓彂鏂欍�佸鍗忔敹鏂�
+ dialogForm: {
+ wo_code: '', // 宸ュ崟缂栧彿
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 浜у搧瑙勬牸
+ stepseq: '', // 宸ュ簭搴忓彿
+ stepcode: '', // 宸ュ簭缂栫爜
+ stepname: '', // 褰撳墠宸ュ簭鍚�
+ nextstepname: '', // 涓嬩竴閬撳伐搴忓悕
+ stepdesc: '', // 宸ュ簭鎻忚堪
+ planqty: '', // 浠诲姟鏁伴噺
+ reportqty: '', // 宸叉姤鏁伴噺
+ noreportqty: '', // 鏈姤鏁伴噺
+ startqty: '', // 寮�(鎶�)宸ユ暟閲�
+
+ wxcode: '', // 澶栧崗渚涘簲鍟嗙紪鐮�
+ outuser: '', // 鍙戞枡浜哄憳
+ taskqty: '', // 浠诲姟鏁伴噺
+ fqty: '', // 鍙戞枡鏁伴噺
+
+ inuser: '', // 鏀舵枡浜哄憳
+ sqty: '', // 鏀舵枡鏁伴噺
+ ngqty: '', // 涓嶈壇鏁伴噺
+ badcode: '', // 涓嶈壇鍘熷洜缂栫爜
+
+ noputqty: '', // 涓嶈壇鏁伴噺
+
+ eqpcode: '', // 鐢熶骇璁惧缂栫爜
+
+ usergroupcode: '', // 鐝粍缂栫爜
+ reportuser: '', // 鎶ュ伐浜哄憳
+
+ startqtySum: '' // 涓嶈兘瓒呰繃鐨勬暟鍊�
+
+ },
+ ZZuserArr: [], // 鑷埗鐢ㄦ埛鎵�鏈�
+ ZZtreams: [], // 鑷埗鐢熶骇鐝粍鏁扮粍
+ ZZeqpArr: [], // 鑷埗璁惧鍚嶇О
+ badArr: [], // 涓嶈壇鍘熷洜鏁扮粍
+ WXouterprovide: [], // 澶栧崗渚涙柟鏁扮粍
+ WXoutuser: [], // 鍙戞枡浜哄憳鏁扮粍
+ userTableData: [], // 浜哄憳鍒楄〃
+ UserTotal: 0,
+ Userform: {},
+ userIsSave: false, // 姝や汉鍛樻槸鍚﹀彲淇濇寔
+ dialogFormRules: {
+ outuser: [
+ { required: true, message: '璇烽�夋嫨鍙戞枡浜哄憳', trigger: ['blur', 'change'] }
+ ],
+ fqty: [
+ { required: true, message: '璇疯緭鍏ュ彂鏂欐暟閲�', trigger: ['blur', 'change'] }
+ ],
+ wxcode: [
+ { required: true, message: '璇烽�夋嫨澶栧崗渚涙柟', trigger: ['blur', 'change'] }
+ ],
+ inuser: [
+ { required: true, message: '璇烽�夋嫨鏀舵枡浜哄憳', trigger: ['blur', 'change'] }
+ ],
+ sqty: [
+ { required: true, message: '璇疯緭鍏ユ敹鏂欐暟閲�', trigger: ['blur', 'change'] }
+ ],
+ // noputqty: [
+ // { required: true, message: '璇疯緭鍏ヤ笉鑹暟閲�', trigger: ['blur', 'change'] }
+ // ],
+ // badcode: [
+ // { required: true, message: '璇烽�夋嫨涓嶈壇鍘熷洜', trigger: ['blur', 'change'] }
+ // ]
+ eqpcode: [
+ { required: true, message: '璇烽�夋嫨鐢熶骇璁惧', trigger: ['blur', 'change'] }
+ ],
+ usergroupcode: [
+ { required: true, message: '璇烽�夋嫨鐢熶骇鐝粍', trigger: ['blur', 'change'] }
+ ],
+ startqty: [
+ { required: true, message: '璇疯緭鍏ユ姤宸ユ暟閲�', trigger: ['blur', 'change'] }
+ ]
+ },
+ activeName: ''
+ }
+ },
+ created() {
+ this.getMesOrderStepSearch()
+ this.tabClick()
+ },
+ mounted() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+
+ this.$nextTick(() => {
+ $("input[name='produceCode']")[0].focus()
+ })
+ // webapp_urlprotocol_startup()
+ webapp_ws_autoupdate(true)
+ },
+ methods: {
+ async getMesOrderStepSearch() {
+ const res = await MesOrderStepSearch(this.form)
+ if (res.code === '200') {
+ this.tableData = res.data
+ this.total = res.count
+ }
+ },
+ async getMesOrderWxStepSearch() {
+ const res = await MesOrderWxStepSearch(this.WXform)
+ if (res.code === '200') {
+ this.WXtableData = res.data
+ }
+ },
+ // 鎺掑簭鏀瑰彉鏃�
+ sortChange({ column, prop, order }) {
+ if (order === 'descending') {
+ order = 'desc'
+ } else if (order === 'ascending') {
+ order = 'asc'
+ } else {
+ order = 'desc'
+ }
+ this.form.order = order
+ this.form.prop = prop
+ this.getMesOrderStepSearch()
+ },
+ // WX鎺掑簭鏀瑰彉鏃�
+ WXsortChange({ column, prop, order }) {
+ if (order === 'descending') {
+ order = 'desc'
+ } else if (order === 'ascending') {
+ order = 'asc'
+ } else {
+ order = 'desc'
+ }
+ this.WXform.order = order
+ this.WXform.prop = prop
+ this.getMesOrderWxStepSearch()
+ },
+ // 鑷埗椤电鍘熺偣鐐瑰嚮
+ getCurrentRow(val) {
+
+ },
+ // 澶栧崗椤电鍘熺偣鐐瑰嚮
+ getWXCurrentRow(val) {
+ console.log(val)
+ this.WXradioSelected = val
+ },
+ // tab鎸夐挳鍒囨崲榧犳爣鑷姩鑱氱劍
+ tabClick(val, d) {
+ if (this.$refs.elTabs.currentName === '0') {
+ this.$nextTick(() => {
+ this.getMesOrderStepSearch()
+ $("input[name='produceCode']")[0].focus()
+ this.WXform.orderstepqrcode = ''
+ })
+ }
+ if (this.$refs.elTabs.currentName === '1') {
+ this.$nextTick(() => {
+ this.getMesOrderWxStepSearch()
+ $("input[name='WXproduceCode']")[0].focus()
+ this.form.orderstepqrcode = ''
+ })
+ }
+ },
+ // 鎵爜閿洏鍥炶溅浜嬩欢
+ async enterNative(val, belong) {
+ console.log(val, belong)
+ // 寮�宸ワ細code="200" count=0
+ // 鎶ュ伐锛歝ode="200" count=1
+ // 鍙戞枡锛歝ode="200" count=2
+ // 鏀舵枡锛歝ode="200" count=3
+ // 璧板垪琛ㄥ舰寮� code="200" count=4
+ if (belong === 'produceCode') {
+ const orderstepqrcode = this.form.orderstepqrcode
+ const data = {
+ OperType: 'ZZ',
+ orderstepqrcode: orderstepqrcode,
+ SelectType: ''
+ }
+ const res = await MesOrderStepStart(data)
+ if (res.code === '200' && res.count === 0) {
+ await this.ZZstart(res.data)
+ }
+ if (res.code === '200' && res.count === 1) {
+ await this.ZZreport(res.data)
+ }
+ }
+ if (belong === 'WXproduceCode') {
+ const orderstepqrcode = this.WXform.orderstepqrcode
+ const data = {
+ OperType: 'WX',
+ orderstepqrcode: orderstepqrcode,
+ SelectType: this.WXSelected// OUT銆両N
+ }
+ const res = await MesOrderStepStart(data)
+ if (res.code === '200' && res.count === 2) {
+ await this.WXsend(res.data)
+ }
+ if (res.code === '200' && res.count === 3) {
+ await this.WXback(res.data)
+ }
+ }
+ },
+ // 鏌ヨ
+ search() {
+ this.getMesOrderStepSearch()
+ },
+ // 鑷埗寮�濮�
+ async ZZstart(obj) {
+ // if (!this.ZZisExecutable) {
+ // return this.$message.info('璇峰厛鎵爜宸ュ簭浜岀淮鐮侊紒')
+ // }
+ this.dialogTitle = '鑷埗寮�濮�'
+ this.dialogVisible = true
+
+ this.$nextTick(() => {
+ this.dialogForm.wo_code = obj.wo_code
+ this.dialogForm.partcode = obj.partnumber
+ this.dialogForm.partname = obj.partname
+ this.dialogForm.partspec = obj.partspec
+ this.dialogForm.stepseq = obj.seq
+ this.dialogForm.stepcode = obj.stepcode
+ this.dialogForm.stepname = obj.stepname
+ this.dialogForm.stepdesc = obj.stepdesc
+ this.dialogForm.planqty = obj.planqty
+ this.dialogForm.reportqty = obj.reportqty
+ this.dialogForm.noreportqty = obj.noreportqty
+ // this.dialogForm.startqty = obj.startqty
+ this.dialogForm.startqty = obj.noreportqty
+ })
+
+ await this.getMesOrderStepStartSelectEqp()
+ },
+ // 鑷埗鎶ュ伐
+ async ZZreport(obj) {
+ // if (!this.ZZisExecutable) {
+ // return this.$message.info('璇峰厛鎵爜宸ュ簭浜岀淮鐮侊紒')
+ // }
+ this.dialogTitle = '鑷埗鎶ュ伐'
+ this.dialogVisible = true
+
+ this.$nextTick(() => {
+ this.dialogForm.wo_code = obj.wo_code
+ this.dialogForm.partcode = obj.partnumber
+ this.dialogForm.partname = obj.partname
+ this.dialogForm.partspec = obj.partspec
+ this.dialogForm.stepseq = obj.seq
+ this.dialogForm.stepcode = obj.stepcode
+ this.dialogForm.stepname = obj.stepname
+ this.dialogForm.stepdesc = obj.stepdesc
+ this.dialogForm.planqty = obj.planqty
+ this.dialogForm.reportqty = obj.reportqty
+ this.dialogForm.noputqty = obj.noputqty
+ this.dialogForm.noreportqty = obj.noreportqty
+ // this.dialogForm.startqty = obj.startqty
+ this.dialogForm.startqty = obj.noreportqty
+
+ if (obj.nextstepname === null || obj.nextstepcode === '') {
+ this.dialogForm.nextstepname = obj.stepname
+ this.dialogForm.nextstepcode = obj.stepcode
+ } else {
+ this.dialogForm.nextstepname = obj.nextstepname
+ this.dialogForm.nextstepcode = obj.nextstepcode
+ }
+
+ this.dialogForm.startqtySum = obj.noreportqty
+ })
+
+ await this.getMesOrderStepStartSelectEqp()
+ await this.getMesOrderStepReportSelectUserGroup()
+ await this.getMesOrderStepSelectCause('ZZ')
+ await this.getMesOrderSelectUserZZ()
+ },
+ // 澶栧崗鍙戞枡
+ async WXsend(obj) {
+ // if (this.WXradioSelected.length < 1 && obj.length < 1) {
+ // return this.$message.info('璇峰厛閫夋嫨宸ュ簭锛�')
+ // }
+ // console.log(this.WXform.orderstepqrcode === '', 6)
+ // if (this.WXform.orderstepqrcode === '') {
+ // return this.$message.info('璇峰厛杈撳叆宸ュ簭锛�')
+ // }
+ this.dialogTitle = '澶栧崗鍙戞枡'
+ this.dialogVisible = true
+
+ this.$nextTick(() => {
+ this.dialogForm.wo_code = obj.wo_code
+ this.dialogForm.partcode = obj.partnumber
+ this.dialogForm.partname = obj.partname
+ this.dialogForm.partspec = obj.partspec
+ this.dialogForm.stepname = obj.stepname
+ this.dialogForm.stepdesc = obj.stepdesc
+ this.dialogForm.planqty = obj.planqty
+ this.dialogForm.reportqty = obj.reportqty
+ this.dialogForm.noreportqty = obj.noreportqty
+ this.dialogForm.fqty = obj.startqty
+ this.dialogForm.stepcode = obj.stepcode
+ this.dialogForm.stepseq = obj.seq
+ })
+
+ await this.getMesOrderStepSelectWX()
+ await this.getMesOrderSelectUser()
+ },
+ // 澶栧崗鏀舵枡
+ async WXback(obj) {
+ // if (this.WXform.orderstepqrcode === '') {
+ // return this.$message.info('璇峰厛杈撳叆宸ュ簭锛�')
+ // }
+ this.dialogTitle = '澶栧崗鏀舵枡'
+ this.dialogVisible = true
+
+ this.$nextTick(() => {
+ this.dialogForm.wo_code = obj.wo_code
+ this.dialogForm.partcode = obj.partnumber
+ this.dialogForm.partname = obj.partname
+ this.dialogForm.partspec = obj.partspec
+ this.dialogForm.stepname = obj.stepname
+ this.dialogForm.stepdesc = obj.stepdesc
+ this.dialogForm.planqty = obj.planqty
+ this.dialogForm.reportqty = obj.reportqty
+ this.dialogForm.noreportqty = obj.noreportqty
+ this.dialogForm.stepcode = obj.stepcode
+ if (obj.nextstepname === null || obj.nextstepcode === '') {
+ this.dialogForm.nextstepname = obj.stepname
+ this.dialogForm.nextstepcode = obj.stepcode
+ } else {
+ this.dialogForm.nextstepname = obj.nextstepname
+ this.dialogForm.nextstepcode = obj.nextstepcode
+ }
+ this.dialogForm.noputqty = obj.noputqty
+ this.dialogForm.stepseq = obj.seq
+ this.dialogForm.sqty = obj.startqty
+
+ this.dialogForm.startqtySum = obj.startqty
+ })
+ await this.getMesOrderStepSelectWX()
+ await this.getMesOrderSelectUser()
+ await this.getMesOrderStepSelectCause('WX')
+ },
+ // 鐢熶骇鐝粍涓嬫媺鏀瑰彉
+ usergroupChange(val) {
+ this.dialogForm.usergroupcode = val
+ this.getUserTableData()
+ },
+ // 鑾峰彇鑷埗鎶ュ伐鐢熶骇鐝粍涓嬫媺鍒楄〃
+ async getMesOrderStepReportSelectUserGroup() {
+ const { data: res } = await MesOrderStepReportSelectUserGroup()
+ this.ZZtreams = res
+ },
+ // 鑾峰彇鑷埗鎶ュ伐琛ㄦ牸user鎵�鏈�
+ async getMesOrderSelectUserZZ() {
+ const { data: res } = await MesOrderSelectUser({ usercode: this.dialogForm.usergroupcode })
+ this.ZZuserArr = res
+ },
+ // 鑾峰彇鑷埗鐢熶骇璁惧涓嬫媺
+ async getMesOrderStepStartSelectEqp() {
+ const { data: res } = await MesOrderStepStartSelectEqp({ orderstepqrcode: this.form.orderstepqrcode })
+ this.ZZeqpArr = res
+ },
+ // 鑾峰彇WX渚涙柟鎺ュ彛
+ async getMesOrderStepSelectWX() {
+ const { data: res } = await MesOrderStepSelectWX({ orderstepqrcode: this.WXform.orderstepqrcode })
+ this.WXouterprovide = res
+ },
+ // 鑾峰彇鏀跺彂鏂欎汉鍛樹笅鎷夋帴鍙�
+ async getMesOrderSelectUser() {
+ const { data: res } = await MesOrderSelectUser({ usercode: this.dialogForm.outuser })
+ this.WXoutuser = res
+ },
+ // 鑾峰彇鏀舵枡涓嶈壇鍘熷洜涓嬫媺
+ async getMesOrderStepSelectCause(val) {
+ let orderstepqrcode = ''
+ if (val === 'WX') {
+ orderstepqrcode = this.WXform.orderstepqrcode
+ }
+ if (val === 'ZZ') {
+ orderstepqrcode = this.form.orderstepqrcode
+ }
+ const { data: res } = await MesOrderStepSelectCause({ orderstepqrcode: orderstepqrcode })
+ this.badArr = res
+ },
+ // 鎶ュ伐鏌ヨ鐢ㄦ埛琛�
+ async getUserTableData() {
+ const { data: res } = await MesOrderGroupSelectUser({ usergroupcode: this.dialogForm.usergroupcode })
+ this.userTableData = res
+ this.userTableData.forEach(item => {
+ let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
+ number = number === 0 ? (10 + Math.random()) : number
+ item.isVisible = 0
+ item.number = number
+ })
+ },
+ // 鐢ㄦ埛娣诲姞
+ userAdd() {
+ let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
+ number = number === 0 ? (10 + Math.random()) : number
+ console.log(this.userTableData, 6)
+ this.userTableData.unshift({ usercode: '', username: '', isVisible: 1, number: number })
+ },
+ // 鐢ㄦ埛鍒楄〃鍒犻櫎
+ userDel(row) {
+ this.userTableData.forEach((item, index) => {
+ if (item.number === row.number) {
+ this.userTableData.splice(index, 1)
+ }
+ })
+ },
+ // 鐢ㄦ埛鍒楄〃淇濆瓨
+ userSave(row) {
+ this.userTableData.forEach(item => {
+ if (item.number === row.number) {
+ item.isVisible = 0
+ }
+ })
+ },
+ // 鐢ㄦ埛鍒楄〃鍙栨秷
+ userCancel(row) {
+ this.userTableData.forEach((item, index) => {
+ if (item.number === row.number) {
+ this.userTableData.splice(index, 1)
+ }
+ })
+ },
+ // 鐢ㄦ埛鍒楄〃浜哄憳鍚嶇О鍊奸�変腑
+ usernameChange(val, row) {
+ this.userTableData.forEach(item => {
+ if (item.usercode === val) {
+ this.userIsSave = true
+ return this.$message.info('姝や汉鍛樺凡鍦ㄥ垪涓紒')
+ }
+ if (item.number === row.number) {
+ this.userIsSave = false
+ item.usercode = val
+ item.username = this.ZZuserArr.find(item => item.usercode === val).username
+ }
+ })
+ },
+ // 瀵硅瘽妗嗗叧闂簨浠�
+ handleClose() {
+ this.dialogForm.wo_code = '', // 宸ュ崟缂栧彿
+ this.dialogForm.partcode = '', // 浜у搧缂栫爜
+ this.dialogForm.partname = '', // 浜у搧鍚嶇О
+ this.dialogForm.partspec = '', // 浜у搧瑙勬牸
+ this.dialogForm.stepseq = '', // 宸ュ簭搴忓彿
+ this.dialogForm.stepcode = '', // 宸ュ簭缂栫爜
+ this.dialogForm.stepname = '', // 褰撳墠宸ュ簭鍚�
+ this.dialogForm.nextstepname = '', // 涓嬩竴閬撳伐搴忓悕
+ this.dialogForm.stepdesc = '', // 宸ュ簭鎻忚堪
+ this.dialogForm.planqty = '', // 浠诲姟鏁伴噺
+ this.dialogForm.reportqty = '', // 宸叉姤鏁伴噺
+ this.dialogForm.noreportqty = '', // 鏈姤鏁伴噺
+ this.dialogForm.startqty = '', // 寮�(鎶�)宸ユ暟閲�
+
+ this.dialogForm.wxcode = '', // 澶栧崗渚涘簲鍟嗙紪鐮�
+ this.dialogForm.outuser = '', // 鍙戞枡浜哄憳
+ this.dialogForm.taskqty = '', // 浠诲姟鏁伴噺
+ this.dialogForm.fqty = '', // 鍙戞枡鏁伴噺
+
+ this.dialogForm.inuser = '', // 鏀舵枡浜哄憳
+ this.dialogForm.sqty = '', // 鏀舵枡鏁伴噺
+ this.dialogForm.ngqty = '', // 涓嶈壇鏁伴噺
+ this.dialogForm.badcode = '', // 涓嶈壇鍘熷洜缂栫爜
+
+ this.dialogForm.noputqty = '', // 涓嶈壇鏁伴噺
+
+ this.dialogForm.eqpcode = '', // 鐢熶骇璁惧缂栫爜
+
+ this.dialogForm.usergroupcode = '', // 鐝粍缂栫爜
+ this.dialogForm.reportuser = '', // 鎶ュ伐浜哄憳
+
+ this.dialogForm.startqtySum = '' // 涓嶈兘瓒呰繃鐨勬暟鍊�
+
+ this.$refs.dialogForm.clearValidate()
+ },
+ // 瀵硅瘽妗嗗彇娑�
+ dialogVisibleCancel() {
+ this.dialogVisible = false
+ this.tabClick()
+ },
+ // 瀵硅瘽妗嗙‘璁�
+ dialogVisibleConfirm() {
+ this.$refs.dialogForm.validate(valid => {
+ if (valid) {
+ if (this.dialogTitle === '澶栧崗鍙戞枡') {
+ if (parseFloat(this.dialogForm.fqty) > parseFloat(this.dialogForm.noreportqty)) {
+ return this.$message.info('鍙戞枡鏁伴噺涓嶈兘澶т簬鏈彂鏁伴噺!')
+ }
+ const data = {
+ mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
+ partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
+ stepseq: this.dialogForm.stepseq, // 宸ュ簭搴忓彿 鏆傛椂缂�
+ stepcode: this.dialogForm.stepcode, // 宸ュ簭缂栫爜
+ wxcode: this.dialogForm.wxcode, // 澶栧崗渚涘簲鍟嗙紪鐮�
+ outuser: this.dialogForm.outuser, // 鍙戞枡浜哄憳
+ taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
+ fqty: this.dialogForm.fqty // 鍙戞枡鏁伴噺
+ }
+ SavaMesOrderStepOut(data).then(res => {
+ if (res.code === '200') {
+ this.$message.success('鍙戞枡鎴愬姛锛�')
+ this.dialogVisible = false
+ this.tabClick()
+ } else {
+ this.$message.error('鍙戞枡澶辫触!')
+ }
+ })
+ }
+
+ if (this.dialogTitle === '澶栧崗鏀舵枡') {
+ if (parseFloat(this.dialogForm.startqtySum) < parseFloat(this.dialogForm.sqty) + parseFloat(this.dialogForm.noputqty)) {
+ return this.$message.info('鏀舵枡鏁伴噺鍔犱笉鑹暟閲忎笉鑳藉ぇ浜庝簡鏈敹鏁伴噺!')
+ }
+
+ if (parseFloat(this.dialogForm.noputqty) > 0) {
+ if (this.dialogForm.badcode.length < 1) {
+ return this.$message.info('璇烽�夋嫨涓嶈壇鍘熷洜锛�')
+ }
+ }
+
+ const data = {
+ mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
+ partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
+ stepseq: this.dialogForm.stepseq, // 宸ュ簭搴忓彿
+ stepcode: this.dialogForm.stepcode, // 宸ュ簭缂栫爜
+ wxcode: this.dialogForm.wxcode, // 澶栧崗渚涘簲鍟嗙紪鐮�
+ inuser: this.dialogForm.inuser, // 鍙戞枡浜哄憳
+ taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
+ sqty: this.dialogForm.sqty, // 鏀舵枡鏁伴噺
+ ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
+ badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
+ }
+ SavaMesOrderStepIn(data).then(res => {
+ if (res.code === '200') {
+ this.WXprint()
+ this.$message.success('鏀舵枡鎴愬姛锛�')
+ this.dialogVisible = false
+ this.tabClick()
+ } else {
+ this.$message.error('鏀舵枡澶辫触!')
+ }
+ })
+ }
+
+ if (this.dialogTitle === '鑷埗寮�濮�') {
+ const data = {
+ mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
+ partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
+ stepseq: this.dialogForm.stepseq, // 宸ュ簭搴忓彿 鏆傛椂缂�
+ stepcode: this.dialogForm.stepcode, // 宸ュ簭缂栫爜
+ eqpcode: this.dialogForm.eqpcode, // 鐢熶骇璁惧
+ taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
+ startqty: this.dialogForm.startqty// 寮�濮嬫暟閲�
+ }
+ SavaMesOrderStepStart(data).then(res => {
+ if (res.code === '200') {
+ this.$message.success('寮�宸ユ垚鍔燂紒')
+ this.dialogVisible = false
+ this.tabClick()
+ } else {
+ this.$message.error('寮�宸ュけ璐�!')
+ }
+ })
+ }
+
+ if (this.dialogTitle === '鑷埗鎶ュ伐') {
+ if (parseFloat(this.dialogForm.startqtySum) < parseFloat(this.dialogForm.startqty) + parseFloat(this.dialogForm.noputqty)) {
+ return this.$message.info('鎶ュ伐鏁伴噺鍔犱笉鑹暟閲忎笉鑳藉ぇ浜庝簡鏈姤鏁伴噺!')
+ }
+ if (this.userTableData.length < 1) {
+ return this.$message.info('浜哄憳鍒楄〃涓嶈兘涓虹┖!')
+ }
+
+ if (parseFloat(this.dialogForm.noputqty) > 0) {
+ if (this.dialogForm.badcode.length < 1) {
+ return this.$message.info('璇烽�夋嫨涓嶈壇鍘熷洜锛�')
+ }
+ }
+
+ const reportuser = this.userTableData.map(item => item.usercode).join(';')
+ const data = {
+ mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
+ partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
+ stepseq: this.dialogForm.stepseq, // 宸ュ簭搴忓彿
+ stepcode: this.dialogForm.stepcode, // 宸ュ簭缂栫爜
+ eqpcode: this.dialogForm.eqpcode, // 璁惧缂栫爜
+ usergroupcode: this.dialogForm.usergroupcode, // 鐝粍缂栫爜
+ reportuser: reportuser, // 鎶ュ伐浜哄憳
+ taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
+ // startqty: this.dialogForm.startqty, // 寮�宸ユ暟閲�
+ startqty: this.dialogForm.reportqty, // 寮�宸ユ暟閲�
+ // reportqty: this.dialogForm.reportqty, // 鎶ュ伐鏁伴噺
+ reportqty: this.dialogForm.startqty, // 鎶ュ伐鏁伴噺
+ ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
+ badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
+ }
+ SavaMesOrderStepReport(data).then(res => {
+ if (res.code === '200') {
+ this.ZZprint()
+ this.$message.success('鎶ュ伐鎴愬姛锛�')
+ this.dialogVisible = false
+ this.tabClick()
+ } else {
+ this.$message.error('鎶ュ伐澶辫触!')
+ }
+ })
+ }
+ }
+ })
+ },
+ async ZZprint() {
+ const obj = {
+ recordset: [
+ {
+ wo_code: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
+ partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
+ partname: this.dialogForm.partname, // 浜у搧鍚嶇О
+ next_stepname: this.dialogForm.nextstepname, // 涓嬮亾宸ュ簭
+ qty: this.dialogForm.startqty, // 鏁伴噺
+ // qrcode: this.form.orderstepqrcode// 浜岀淮鐮�
+ qrcode: this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode // 浜岀淮鐮�
+ }
+ ]
+ }
+ const args = {
+ type: 'print', // preview print
+ showOptionDlg: false, // 濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
+ report: urlAddRandomNo('./static/grf/鎶ュ伐浜у嚭鏍囩.grf'),
+ data: obj
+ }
+ webapp_ws_ajax_run(args)
+ },
+ // 澶栧崗鏀舵枡鎵撳嵃
+ WXprint() {
+ // 鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
+ const obj = {
+ recordset: [
+ {
+ wo_code: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
+ partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
+ partname: this.dialogForm.partname, // 浜у搧鍚嶇О
+ next_stepname: this.dialogForm.nextstepname, // 涓嬮亾宸ュ簭
+ qty: this.dialogForm.sqty, // 鏁伴噺
+ // qrcode: this.WXform.orderstepqrcode// 浜岀淮鐮�
+ qrcode: this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode// 浜岀淮鐮�
+ }
+ ]
+ }
+ const args = {
+ type: 'print', // preview print
+ showOptionDlg: false, // 濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
+ report: urlAddRandomNo('./static/grf/澶栧崗鏀舵枡鏍囩.grf'),
+ data: obj
+ }
+ webapp_ws_ajax_run(args)
+ },
+ // 鑾峰彇椤甸潰楂樺害
+ getHeight() {
+ this.$nextTick(() => {
+ this.mainHeight = window.innerHeight - 250
+ this.tableHeight = this.mainHeight - 80
+ })
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+$main_color: #42b983;
+::v-deep .el-button--primary {
+ background-color: $main_color !important;
+ height: 30px;
+ display: flex;
+ align-items: center;
+ //border: 1px solid $main_color;
+ border: none;
+ padding: 0 20px;
+}
+
+::v-deep .el-button--primary:hover {
+ border: none;
+}
+
+::v-deep .el-button--info {
+ height: 30px;
+ display: flex;
+ align-items: center;
+ padding: 0 20px;
+}
+
+::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
+ background-color: $main_color !important;
+}
+
+::v-deep .el-dialog__footer {
+ display: flex;
+ justify-content: flex-end;
+}
+
+.footerButton {
+ display: flex;
+ justify-content: end;
+}
+
+::v-deep .el-button--default {
+ background-color: #ffffff !important;
+ height: 30px;
+ display: flex;
+ align-items: center;
+ padding: 0 20px;
+}
+
+::v-deep .el-button--default:hover {
+ color: #606266;
+}
+
+::v-deep .el-dialog__body {
+ padding: 20px 100px !important;
+}
+
+::v-deep .el-radio__input.is-checked .el-radio__inner {
+ background-color: $main_color;
+ border-color: $main_color;
+}
+
+::v-deep .el-radio__input.is-checked + .el-radio__label {
+ color: $main_color !important;
+}
+
+::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
+ border-color: $main_color;
+ background-color: $main_color;
+}
+
+::v-deep .el-input__inner {
+ height: 30px;
+ line-height: 30px;
+}
+
+::v-deep .el-input__inner:focus {
+ border-color: $main_color;
+}
+
+::v-deep .el-table .caret-wrapper {
+ transform: scale(0.8);
+}
+
+::v-deep .cell {
+ display: flex !important;
+ align-items: center !important;
+ justify-content: space-between !important;
+}
+
+::v-deep .el-button--text {
+ color: $main_color;
+ font-size: 14px;
+ cursor: pointer;
+}
+
+.operationClass {
+ height: 23px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.el-icon-share {
+ color: $main_color;
+ cursor: pointer;
+}
+
+.el-checkbox.is-bordered.is-checked {
+ border-color: $main_color;
+}
+
+::v-deep .el-radio__input.is-checked .el-radio__inner {
+ border-color: $main_color;
+ background: $main_color;
+}
+
+::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
+ border-color: $main_color;
+ background: $main_color;
+}
+
+::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
+ color: $main_color !important;
+}
+
+::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
+ margin: 10px 30px 0px 0;
+}
+
+::v-deep .el-radio__input.is-checked + .el-radio__label {
+ color: $main_color;
+}
+
+::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
+ margin: 10px 30px 0px 0;
+}
+
+.body ::v-deep .el-divider {
+ border: 1px solid #eee;
+ width: 99%;
+ margin: 10px auto;
+}
+
+.body ::v-deep .el-form-item {
+ margin-bottom: 0;
+}
+
+::v-deep .el-input__inner:focus {
+ border-color: $main_color;
+}
+
+::v-deep .el-select .el-input__inner:focus {
+ border-color: $main_color;
+}
+
+::v-deep .el-select-dropdown__item.selected {
+ color: $main_color;
+}
+
+::v-deep .el-checkbox__inner:hover {
+ border-color: $main_color;
+}
+
+::v-deep .el-textarea__inner:focus {
+ border-color: $main_color;
+}
+
+//.dialogVisible{
+::v-deep .el-select .el-input .el-select__caret {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+//}
+.elTableDiv {
+ ::v-deep .el-radio__label {
+ display: none;
+ }
+}
+</style>
diff --git a/vue.config.js b/vue.config.js
index df6483e..cb3afd4 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -50,7 +50,8 @@
},
proxy: {
[process.env.VUE_APP_BASE_API]: {
- target: 'http://121.196.36.24:8001', // 璇锋眰鐨勭涓夆絽鎺モ紳鍦板潃
+ target: 'http://121.196.36.24:8001', // 璇锋眰鐨勭涓夆絽鎺モ紳鍦板潃 鏈湴寮�鍙戞湇鍔″櫒
+ // target: 'http://192.168.2.138:8001', // 璇锋眰鐨勭涓夆絽鎺モ紳鍦板潃 瀹㈡埛鏈嶅姟鍣�
changeOrigin: true, // 璇锋眰璺ㄥ煙鏃讹紝闇�閰嶇疆姝ら」
pathRewrite: { // 璺緞閲嶅啓,鏇挎崲target涓殑璇锋眰鍦板潃
['^' + process.env.VUE_APP_BASE_API]: '/api/'
--
Gitblit v1.9.3