From a1c751283d02c8a572f39ea18c2573fce3372ef0 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期二, 05 十二月 2023 13:05:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/quality/rawMaterial/rawMaterial-form.vue | 82 ++++++++++++++++++++
src/views/plan/manufacturingorder/index.vue | 66 ++++++++++++++++
src/views/quality/rawMaterial/QrcodeReader.vue | 77 +++++++++++++++++++
vue.config.js | 2
package.json | 1
src/views/quality/Packaging_ledger/index.vue | 12 +-
6 files changed, 229 insertions(+), 11 deletions(-)
diff --git a/package.json b/package.json
index fb282aa..1bd2008 100644
--- a/package.json
+++ b/package.json
@@ -45,6 +45,7 @@
"vue-json-editor": "^1.2.3",
"vue-json-tree-view": "^2.1.4",
"vue-qr": "^4.0.9",
+ "vue-qrcode-reader": "^5.4.1",
"vue-quill-editor": "3.0.6",
"vue-router": "^3.0.2",
"vuedraggable": "^2.24.3",
diff --git a/src/views/plan/manufacturingorder/index.vue b/src/views/plan/manufacturingorder/index.vue
index c6e2cf8..9cd676f 100644
--- a/src/views/plan/manufacturingorder/index.vue
+++ b/src/views/plan/manufacturingorder/index.vue
@@ -105,6 +105,12 @@
:loading="loadingExcel"
>瀵煎嚭
</el-button>
+ <el-button
+ @click="labelPrint"
+ type="primary"
+ style="margin-left:10px;"
+ >鎵撳嵃鏍囩
+ </el-button>
<!-- <el-button
v-if="permissions.manufacturingorder_update_orderno"
@click="updateOrderNo"
@@ -189,6 +195,35 @@
</div>
</span>
</el-dialog>
+ <!-- 鏍囩鎵撳嵃 -->
+ <el-dialog title="鏍囩鍒楄〃" :visible.sync="diaPrintTab" width="500px">
+ <div class="dia_body" style="height: 400px;overflow-y: auto;padding: 0 10px;">
+ <el-card class="box-card" v-for="(tem, i) in orderDatalist" :key="i" style="margin-bottom: 15px;">
+ <el-row>
+ <el-col :span="10" :offset="3">搴忓彿锛�</el-col>
+ <el-col :span="10" style="font-weight: bold;">{{ i + 1 }}</el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="10" :offset="3">瀹㈡埛璁㈠崟鍙凤細</el-col>
+ <el-col :span="10" style="font-weight: bold;">{{ tem.customerOrderNo }}</el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="10" :offset="3">闆朵欢鍚嶇О锛�</el-col>
+ <el-col :span="10" style="font-weight: bold;">{{ tem.partName }}</el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="10" :offset="3">璁㈠崟浜岀淮鐮侊細</el-col>
+ <el-col :span="10">
+ <vueQr :text="JSON.stringify(tem)" :size="200" :margin="2"></vueQr>
+ </el-col>
+ </el-row>
+ </el-card>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="diaPrintTab = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="diaPrintTab = false">鎵� 鍗�</el-button>
+ </span>
+ </el-dialog>
</basic-container>
</div>
</template>
@@ -218,9 +253,12 @@
import DelMatUnIssueVue from './DelMatUnIssue.vue'
import { getStore } from '@/util/store.js'
import { getObj as getSysParam } from '@/api/admin/sys-public-param'
+import vueQr from 'vue-qr'
export default {
data() {
return {
+ orderDatalist:[],
+ diaPrintTab:false,
showCustomerorder: false,
paramObj: { customerList: null },
customerOrder: null,
@@ -895,7 +933,8 @@
AutoOperationtask,
IssueMaterialForm,
OrderMergeForm,
- DelMatUnIssueVue
+ DelMatUnIssueVue,
+ vueQr
},
created() {
this.getManufactureAttrs()
@@ -1357,6 +1396,24 @@
},
// table鑷甫浜嬩欢
handleSelectionChange(val) {
+ let orderData = []
+ orderData =val.map( el =>{
+ return{
+ moNo:el.moNo,
+ workShop:el.workShop,
+ operationNames:el.operationNames,
+ customerOrderNo:el.customerOrderNo,
+ customerName:el.customerName,
+ mpsNo:el.mpsNo,
+ remark:el.remark,
+ partNo:el.partNo,
+ partName:el.partName,
+ unit:el.unit,
+ requiredDate:el.requiredDate,
+ }
+ })
+ this.orderDatalist = orderData
+ console.log(orderData,"澶氳閫変腑");
// 鏍规嵁鐘舵�侊紝绂佺敤琛ㄥご鎸夐挳
// 绛涢�夊嚭閫変腑璁板綍鐨勭姸鎬�
var stateArr = val.map(function(value, index) {
@@ -1648,6 +1705,13 @@
} else {
this.$message.error('涓婁紶澶辫触')
}
+ },
+ labelPrint(){
+ if(this.multipleSelection.length==0){
+ this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
+ return
+ }
+ this.diaPrintTab = true
}
}
}
diff --git a/src/views/quality/Packaging_ledger/index.vue b/src/views/quality/Packaging_ledger/index.vue
index 0b27c4a..45b5115 100644
--- a/src/views/quality/Packaging_ledger/index.vue
+++ b/src/views/quality/Packaging_ledger/index.vue
@@ -290,7 +290,6 @@
})
},
handleCurrentChange(row){
- console.log(row,"涓�琛�");
if(row.state=='宸叉姤妫�'){
this.isCheck = true
}
@@ -303,13 +302,16 @@
},
rightquery(){
list({packageBoxId:this.goid}).then((res) =>{
- console.log(res,"nihaoa");
this.testStandardParams = res.data.data
})
},
//璇︽儏娣诲姞
relateOperationParam(){
- this.increase = true
+ if (this.dataway.state == "鏈姤妫�") {
+ this.increase = true
+ }else{
+ this.$message.error('璇峰厛閫夋嫨鍖呰椤圭洰')
+ }
},
preserve(datalist){
this.testStandardParams = datalist
@@ -317,19 +319,16 @@
},
//鍙宠竟淇濆瓨
addpreserve(){
- console.log(this.testStandardParams,"淇濆瓨鏁版嵁");
this.testStandardParams.forEach(el => {
el.packageBoxId =this.goid
});
saveList(this.testStandardParams).then((res) =>{
- console.log(res,"淇濆瓨鎴愬姛");
this.$message.success('淇濆瓨鎴愬姛')
this.rightquery()
})
},
//鍒犻櫎
deleteadd(row){
- console.log(row,"");
deledata({id:row.id}).then((res)=>{
this.$message.success('鍒犻櫎鎴愬姛')
this.rightquery()
@@ -337,7 +336,6 @@
},
//瀹℃牳
check(row){
- console.log(row,"瀹℃牳");
let packageBox = {
id:row.id,
packageNo:row.packageNo,
diff --git a/src/views/quality/rawMaterial/QrcodeReader.vue b/src/views/quality/rawMaterial/QrcodeReader.vue
new file mode 100644
index 0000000..2dbdff2
--- /dev/null
+++ b/src/views/quality/rawMaterial/QrcodeReader.vue
@@ -0,0 +1,77 @@
+<template>
+ <div class="qrcode">
+ <div class="code">
+ <!-- decode鏄壂鎻忕粨鏋滅殑鍑芥暟锛宼orch鐢ㄤ簬鏄惁闇�瑕佹墦寮�鎵嬬數绛掞紝init鐢ㄤ簬妫�鏌ヨ璁惧鏄惁鑳藉璋冪敤鎽勫儚澶寸殑鏉冮檺锛宑amera鍙敤浜庢墦寮�鍓嶉潰鎴栬�呭悗闈㈡憚鍍忓ご -->
+ <qrcode-drop-zone @decode="onDecode">
+ <qrcode-stream @decode="onDecode" :torch="torchActive" @init="onInit" :camera="camera" />
+ </qrcode-drop-zone>
+ <div class="code-button">
+ <button @click="switchCamera">鐩告満鍙嶈浆</button>
+ <button @click="ClickFlash">鎵撳紑鎵嬬數绛�</button>
+ <button @click="turnCameraOff">鍏抽棴鐩告満</button>
+ </div>
+ </div>
+ </div>
+ </template>
+
+ <script>
+ // 寮曠敤vue-qrcode-reader鎻掍欢
+ import { QrcodeStream, QrcodeDropZone, QrcodeCapture } from 'vue-qrcode-reader'
+
+ export default {
+ name: 'Approve',
+ props: {
+ camera: {
+ type: String,
+ default: 'rear',
+ },
+ torchActive: {
+ type: Boolean,
+ default: false,
+ },
+ qrcode: {
+ type: Boolean,
+ default: false,
+ },
+ noStreamApiSupport: {
+ type: Boolean,
+ default: false,
+ },
+ },
+ data() {
+ return {}
+ },
+ created() {
+ console.log(222222222222224564646);
+ },
+
+ components: {
+ // 娉ㄥ唽缁勪欢
+ QrcodeStream,
+ QrcodeDropZone,
+ QrcodeCapture,
+ },
+ methods: {
+ // 鎵爜缁撴灉鍥炶皟
+ onDecode(result) {
+ this.$emit('onDecode', result)
+ },
+ // 鐩告満鍙嶈浆
+ switchCamera() {
+ this.$emit('switchCamera')
+ },
+ // 鍏抽棴鐩告満锛燂紵锛燂紵锛燂紵
+ turnCameraOff() {
+ this.$emit('turnCameraOff')
+ },
+ // 鎵撳紑鎵嬬數绛�
+ ClickFlash() {
+ this.$emit('ClickFlash')
+ },
+ // 妫�鏌ユ槸鍚﹁皟鐢ㄦ憚鍍忓ご
+ onInit(promise) {
+ this.$emit('onInit', promise)
+ },
+ },
+ }
+ </script>
\ No newline at end of file
diff --git a/src/views/quality/rawMaterial/rawMaterial-form.vue b/src/views/quality/rawMaterial/rawMaterial-form.vue
index 62a368f..7e8f9be 100644
--- a/src/views/quality/rawMaterial/rawMaterial-form.vue
+++ b/src/views/quality/rawMaterial/rawMaterial-form.vue
@@ -34,6 +34,11 @@
icon="el-icon-search"
:disabled="resultVal!=null && dataForm.id!=null"
@click="queryCode()"></el-button>
+ <!-- <el-button
+ slot="append"
+ icon="el-icon-full-screen"
+ :disabled="resultVal!=null && dataForm.id!=null"
+ @click="Turnonthecamera"></el-button> -->
</el-input>
</el-form-item>
</el-col>
@@ -51,7 +56,6 @@
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
disabled>
-
</el-date-picker>
</el-form-item>
</el-col>
@@ -261,6 +265,7 @@
<el-button type="primary" @click="submitSave()">纭� 瀹�</el-button>
</span>
</el-dialog>
+ <!-- <qrcode :qrcode="qrcode" v-show="qrcode" :camera="camera" /> -->
</div>
</template>
@@ -273,13 +278,19 @@
updateRawInspectsById,
updateDeviceById, } from '@/api/quality/rawMaterial'
import rawMaterialPartDialog from '@/views/common/rawMaterial-part'
+ // import qrcode from './QrcodeReader.vue'
export default {
computed:{},
components:{
- rawMaterialPartDialog
+ rawMaterialPartDialog,
+ // qrcode
+ // qrcode: () => import('./QrcodeReader.vue'),
},
data(){
return{
+ qrcode: false,
+ torchActive: false,
+ camera: 'off',
userdata:[],
currentRow:[],
userlist:[],
@@ -352,6 +363,73 @@
},
},
methods:{
+ // 鎵撳紑鐩告満
+ Turnonthecamera() {
+ this.qrcode = true
+ this.camera = 'rear'
+ console.log(2222222);
+ },
+ // 鎵爜缁撴灉鍥炶皟
+ // onDecode(result) {
+ // console.log(result)
+ // this.turnCameraOff()
+ // },
+ // 鐩告満鍙嶈浆
+ // switchCamera() {
+ // switch (this.camera) {
+ // case 'front':
+ // this.camera = 'rear'
+ // break
+ // case 'rear':
+ // this.camera = 'front'
+ // break
+ // default:
+ // this.$toast('閿欒')
+ // }
+ // },
+ // 鍏抽棴鐩告満
+ // turnCameraOff() {
+ // this.camera = 'off'
+ // this.qrcode = false
+ // },
+ // 鎵撳紑鎵嬬數绛�
+ // ClickFlash() {
+ // switch (this.torchActive) {
+ // case true:
+ // this.torchActive = false
+ // break
+ // case false:
+ // this.torchActive = true
+ // break
+ // default:
+ // this.$toast('閿欒')
+ // }
+ // },
+
+ // 妫�鏌ユ槸鍚﹁皟鐢ㄦ憚鍍忓ご
+ // async onInit(promise) {
+ // try {
+ // await promise
+ // } catch (error) {
+ // if (error.name === 'StreamApiNotSupportedError') {
+ // } else if (error.name === 'NotAllowedError') {
+ // this.errorMessage = 'Hey! I need access to your camera'
+ // } else if (error.name === 'NotFoundError') {
+ // this.errorMessage = 'Do you even have a camera on your device?'
+ // } else if (error.name === 'NotSupportedError') {
+ // this.errorMessage =
+ // 'Seems like this page is served in non-secure context (HTTPS, localhost or file://)'
+ // } else if (error.name === 'NotReadableError') {
+ // this.errorMessage =
+ // "Couldn't access your camera. Is it already in use?"
+ // } else if (error.name === 'OverconstrainedError') {
+ // this.errorMessage =
+ // "Constraints don't match any installed camera. Did you asked for the front camera although there is none?"
+ // } else {
+ // this.errorMessage = 'UNKNOWN ERROR: ' + error.message
+ // }
+ // }
+ // },
// 纭鍥炶皟
selectPart(param, nodePart, index) {
if (typeof param !== 'undefined') {
diff --git a/vue.config.js b/vue.config.js
index f9db903..f313e55 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -3,7 +3,7 @@
* https://cli.vuejs.org/zh/config/
*/
// const url = 'http://192.168.2.7:9999'
-// const url = 'http://192.168.2.7:9999'
+const url = 'http://192.168.2.7:9999'
//const url = 'http://192.168.32.45:9999'
// const url = 'http://192.168.0.23:9999'
--
Gitblit v1.9.3