王震
2023-12-20 440f4d1dbc63c302e59f304e589413019178046d
	modified:   src/api/quality/Packaging_ledger.js
modified: src/const/website.js
modified: src/page/PackingLedgerDetails/index.vue
modified: src/permission.js
modified: src/views/quality/Packaging_ledger/index.vue
modified: vue.config.js
已修改6个文件
219 ■■■■■ 文件已修改
src/api/quality/Packaging_ledger.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/const/website.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/page/PackingLedgerDetails/index.vue 182 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/permission.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/Packaging_ledger/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/quality/Packaging_ledger.js
@@ -18,12 +18,19 @@
export function list(query) {
    return request({
      url: '/mes//qualityPackageBoxDetail/list',
      url: '/mes/qualityPackageBoxDetail/list',
      method: 'get',
      params: query
    })
}
export function selById(query) {
  return request({
    url: '/mes/qualityPackageBox/selById',
    method: 'get',
    params: query
  })
}
export function customerpage(query) {
    return request({
      url: '/mes/customer/page',
src/const/website.js
@@ -3,8 +3,8 @@
  copyright: 'Copyright © 2021 chinaztt.com. All rights reserved.',
  isFirstPage: true, // 配置首页不可关闭
  key: 'ztt', // 配置主键,目前用于存储
  whiteList: ['/login', '/404', '/401', '/lock',"/pack"], // 配置无权限可以访问的页面
  whiteTagList: ['/login', '/404', '/401', '/lock',"/pack"], // 配置不添加tags页面 ('/advanced-router/mutative-detail/*'——*为通配符)
  whiteList: ['/login', '/404', '/401', '/lock','/pack'], // 配置无权限可以访问的页面
  whiteTagList: ['/login', '/404', '/401', '/lock','/pack'], // 配置不添加tags页面 ('/advanced-router/mutative-detail/*'——*为通配符)
  fistPage: {
    label: '首页',
    value: '/wel/index',
src/page/PackingLedgerDetails/index.vue
@@ -1,134 +1,49 @@
<template>
    <div >
        <el-card class="box-card">
        <div slot="header" class="clearfix">
            <span>包装详情</span>
        </div>
        <div>
            <el-table
                    :data="testStandardParams"
                    highlight-current-row
                    height="700"
                    class="txt"
                    stripe
                    >
                    <el-table-column
                        type ="index"
                        label="序号"
                        align="center"
                        width="80"
                    />
                    <el-table-column
                        label="产品"
                        prop="product"
                        show-overflow-tooltip
                        align="center"
                    />
                    <el-table-column
                        label="产品编号"
                        prop="productNo"
                        show-overflow-tooltip
                        align="center"
                    >
                    </el-table-column>
                    <el-table-column
                        label="批次号"
                        prop="outBatchNo"
                        show-overflow-tooltip
                        align="center"
                    >
                    </el-table-column>
                    <el-table-column
                        label="规格型号"
                        prop="specs"
                        show-overflow-tooltip
                        align="center"
                    >
                    </el-table-column>
                    <el-table-column
                        label="单位"
                        prop="unit"
                        show-overflow-tooltip
                        align="center"
                    >
                    </el-table-column>
                    <el-table-column
                        label="数量"
                        prop="number"
                        align="center"
                        show-overflow-tooltip
                        width="80"
                    ></el-table-column>
                </el-table>
        </div>
        </el-card>
        <!-- <div style="padding:40px 180px;">
            <div slot="header" class="clearfix">
                <span>包装台账详情</span>
        <el-card class="box-card" v-for="(el,item) in testStandardParams" >
            <div>
                <el-form  :model="el" label-width="80px">
                    <el-form-item label="序号:">
                        {{ item + 1  }}
                    </el-form-item>
                </el-form>
                <el-form  :model="el" label-width="80px">
                    <el-form-item label="产品:">
                        {{ el.product }}
                    </el-form-item>
                </el-form>
                <el-form  :model="el" label-width="80px">
                    <el-form-item label="产品编号:">
                        {{ el.productNo }}
                    </el-form-item>
                </el-form>
                <el-form  :model="el" label-width="80px">
                    <el-form-item label="批次号:">
                        {{ el.outBatchNo }}
                    </el-form-item>
                </el-form>
                <el-form  :model="el" label-width="80px">
                    <el-form-item label="规格型号:">
                        {{ el.specs }}
                    </el-form-item>
                </el-form>
                <el-form  :model="el" label-width="80px">
                    <el-form-item label="单位:">
                        {{ el.unit }}
                    </el-form-item>
                </el-form>
                <el-form  :model="el" label-width="80px">
                    <el-form-item label="数量:">
                        {{ el.number }}
                    </el-form-item>
                </el-form>
            </div>
            <el-card>
                <el-table
                    :data="testStandardParams"
                    highlight-current-row
                    height="700"
                    class="txt"
                    stripe
                    >
                    <el-table-column
                        type ="index"
                        label="序号"
                        align="center"
                        width="80"
                    />
                    <el-table-column
                        label="产品"
                        prop="product"
                        show-overflow-tooltip
                        align="center"
                    />
                    <el-table-column
                        label="产品编号"
                        prop="productNo"
                        show-overflow-tooltip
                        align="center"
                    >
                    </el-table-column>
                    <el-table-column
                        label="批次号"
                        prop="outBatchNo"
                        show-overflow-tooltip
                        align="center"
                    >
                    </el-table-column>
                    <el-table-column
                        label="规格型号"
                        prop="specs"
                        show-overflow-tooltip
                        align="center"
                    >
                    </el-table-column>
                    <el-table-column
                        label="单位"
                        prop="unit"
                        show-overflow-tooltip
                        align="center"
                    >
                    </el-table-column>
                    <el-table-column
                        label="数量"
                        prop="number"
                        align="center"
                        show-overflow-tooltip
                        width="80"
                    ></el-table-column>
                </el-table>
            </el-card>
        </div> -->
        </el-card>
    </div>
</template>
<script>
import {list} from '@/api/quality/Packaging_ledger'
import {selById} from '@/api/quality/Packaging_ledger'
export default{
    data(){
@@ -137,12 +52,13 @@
        }
    },
    created() {
        this.chuaxun()
        let aa = this.$route.query
        console.log(this.$route.query,"id");
        this.chuaxun(aa)
    },
    methods: {
        chuaxun(){
        list({packageBoxId:50}).then((res) =>{
            console.log(res,"1111111");
        chuaxun(aa){
            selById({id:aa.id}).then((res) =>{
          this.testStandardParams = res.data.data
        })
      },
@@ -152,7 +68,11 @@
</script>
<style>
 .txt{
    font-size: 16px;
 }
.box-card{
    margin: 20px;
    border-radius: 40px;
}
.inputDeep {
}
</style>
src/permission.js
@@ -12,6 +12,7 @@
router.beforeEach((to, from, next) => {
  NProgress.start();
  const meta = to.meta || {};
  const whiteList = ['/login', '/404', '/401', '/lock','/pack']
  if (store.getters.access_token) {
    if (store.getters.isLock && to.path !== '/lock') {
      next({ path: '/lock' });
@@ -35,7 +36,15 @@
    // 页面多开:载入localStorage的auth参数 By Luxn
    let auth = JSON.parse(localStorage.getItem("authorization") || "{}");
    if ( meta.isAuth === false) {
      next();
      //没有token的情况
    if (whiteList.indexOf(to.path) !== -1) {
      // 如果在白名单内则直接跳转
      next()
    } else {
      // 其余页面重定向到登录页
      next('/login')
    }
      // next();
    }else{
      if (auth.date_time) {
        let key = ["access_token", "refresh_token", "expires_in", "user_info", "language"];
@@ -57,7 +66,6 @@
      }else{
        next('/login');
      }
    }
  }
})
src/views/quality/Packaging_ledger/index.vue
@@ -150,7 +150,7 @@
              <el-row>
                <el-col :span="10" :offset="3">包装台账二维码:</el-col>
                <el-col :span="10">
                  <vueQr :text=str :size="110" :margin="1"></vueQr>
                  <vueQr :text=str+item.packageBoxId :size="110" :margin="1"></vueQr>
                </el-col>
              </el-row>
            </el-card>
@@ -174,7 +174,7 @@
export default {
    data(){
        return {
          str:"http://192.168.2.213:8080/#/pack",
          str:"http://192.168.2.213:8080/#/pack?id=",
          qrData:[],
          diaPrintTab: false,
          multipleSelection: [],
@@ -349,6 +349,7 @@
      },
      handleSelectionChange(val){
        this.multipleSelection = val
        console.log(this.multipleSelection[0].id,"数据");
        let lastRow = val[val.length - 1]
        this.handleCurrentChange(lastRow)
      },
vue.config.js
@@ -7,13 +7,8 @@
const url = 'http://192.168.2.7:9999'
// const url = 'http://192.168.32.45:9999'
// const url = 'http://192.168.2.7:9999'
const url = 'http://192.168.32.45: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'
const url = 'http://localhost:9999'
// const url = 'http://localhost:9999'
const localUrl = 'http://localhost:8089'