zss
2023-12-05 a1c751283d02c8a572f39ea18c2573fce3372ef0
Merge remote-tracking branch 'origin/master'
已修改5个文件
已添加1个文件
240 ■■■■■ 文件已修改
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/manufacturingorder/index.vue 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/Packaging_ledger/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/rawMaterial/QrcodeReader.vue 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/rawMaterial/rawMaterial-form.vue 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
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",
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
    }
  }
}
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,
src/views/quality/rawMaterial/QrcodeReader.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,77 @@
<template>
    <div class="qrcode">
      <div class="code">
        <!-- decode是扫描结果的函数,torch用于是否需要打开手电筒,init用于检查该设备是否能够调用摄像头的权限,camera可用于打开前面或者后面摄像头  -->
        <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>
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') {
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'