浏览代码

二维码管理

qymljy 2 周之前
父节点
当前提交
08214e59d4

+ 142 - 0
package-lock.json

@@ -29,6 +29,7 @@
         "moment": "^2.29.4",
         "nprogress": "^0.2.0",
         "print-js": "^1.6.0",
+        "qrcodejs2": "^0.0.2",
         "sass-loader": "^16.0.2",
         "script-loader": "^0.7.2",
         "sortablejs": "^1.15.2",
@@ -37,6 +38,7 @@
         "vue-countupjs": "^1.0.0",
         "vue-i18n": "^8.27.0",
         "vue-image-viewer": "^1.1.8",
+        "vue-qr": "^4.0.9",
         "vue-router": "^3.5.1",
         "vuex": "^3.6.2",
         "xlsx": "^0.18.5"
@@ -6989,6 +6991,20 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/decompress-response": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmmirror.com/decompress-response/-/decompress-response-6.0.0.tgz",
+      "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
+      "dependencies": {
+        "mimic-response": "^3.1.0"
+      },
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
     "node_modules/deep-equal": {
       "version": "1.1.2",
       "resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.1.2.tgz",
@@ -10703,6 +10719,11 @@
       "resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz",
       "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
     },
+    "node_modules/js-binary-schema-parser": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmmirror.com/js-binary-schema-parser/-/js-binary-schema-parser-2.0.3.tgz",
+      "integrity": "sha512-xezGJmOb4lk/M1ZZLTR/jaBHQ4gG/lqQnJqdIv4721DMggsa1bDVlHXNeHYogaIEHD9vCRv0fcL4hMA+Coarkg=="
+    },
     "node_modules/js-md5": {
       "version": "0.7.3",
       "resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz",
@@ -11597,6 +11618,17 @@
         "node": ">=6"
       }
     },
+    "node_modules/mimic-response": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmmirror.com/mimic-response/-/mimic-response-3.1.0.tgz",
+      "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
     "node_modules/mini-css-extract-plugin": {
       "version": "2.9.2",
       "resolved": "https://registry.npmmirror.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.2.tgz",
@@ -12413,6 +12445,11 @@
         "node": ">=6"
       }
     },
+    "node_modules/parenthesis": {
+      "version": "3.1.8",
+      "resolved": "https://registry.npmmirror.com/parenthesis/-/parenthesis-3.1.8.tgz",
+      "integrity": "sha512-KF/U8tk54BgQewkJPvB4s/US3VQY68BRDpH638+7O/n58TpnwiwnOtGIOsT2/i+M78s61BBpeC83STB88d8sqw=="
+    },
     "node_modules/parse-json": {
       "version": "5.2.0",
       "resolved": "https://registry.npmmirror.com/parse-json/-/parse-json-5.2.0.tgz",
@@ -13430,6 +13467,11 @@
         "node": ">=6"
       }
     },
+    "node_modules/qrcodejs2": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmmirror.com/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
+      "integrity": "sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA=="
+    },
     "node_modules/qs": {
       "version": "6.7.0",
       "resolved": "https://registry.npmmirror.com/qs/-/qs-6.7.0.tgz",
@@ -14463,6 +14505,49 @@
       "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
       "dev": true
     },
+    "node_modules/simple-concat": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/simple-concat/-/simple-concat-1.0.1.tgz",
+      "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ]
+    },
+    "node_modules/simple-get": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmmirror.com/simple-get/-/simple-get-4.0.1.tgz",
+      "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ],
+      "dependencies": {
+        "decompress-response": "^6.0.0",
+        "once": "^1.3.1",
+        "simple-concat": "^1.0.0"
+      }
+    },
     "node_modules/simple-swizzle": {
       "version": "0.2.2",
       "resolved": "https://registry.npmmirror.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
@@ -14806,6 +14891,14 @@
       "resolved": "https://registry.npmmirror.com/string-convert/-/string-convert-0.2.1.tgz",
       "integrity": "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A=="
     },
+    "node_modules/string-split-by": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/string-split-by/-/string-split-by-1.0.0.tgz",
+      "integrity": "sha512-KaJKY+hfpzNyet/emP81PJA9hTVSfxNLS9SFTWxdCnnW1/zOOwiV248+EfoX7IQFcBaOp4G5YE6xTJMF+pLg6A==",
+      "dependencies": {
+        "parenthesis": "^3.1.5"
+      }
+    },
     "node_modules/string-width": {
       "version": "4.2.3",
       "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
@@ -17036,6 +17129,55 @@
         "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
+    "node_modules/vue-qr": {
+      "version": "4.0.9",
+      "resolved": "https://registry.npmmirror.com/vue-qr/-/vue-qr-4.0.9.tgz",
+      "integrity": "sha512-pAISV94T0MNEYA3NGjykUpsXRE2QfaNxlu9ZhEL6CERgqNc21hJYuP3hRVzAWfBQlgO18DPmZTbrFerJC3+Ikw==",
+      "dependencies": {
+        "glob": "^8.0.1",
+        "js-binary-schema-parser": "^2.0.2",
+        "simple-get": "^4.0.1",
+        "string-split-by": "^1.0.0"
+      }
+    },
+    "node_modules/vue-qr/node_modules/brace-expansion": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.2.tgz",
+      "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
+      "dependencies": {
+        "balanced-match": "^1.0.0"
+      }
+    },
+    "node_modules/vue-qr/node_modules/glob": {
+      "version": "8.1.0",
+      "resolved": "https://registry.npmmirror.com/glob/-/glob-8.1.0.tgz",
+      "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
+      "deprecated": "Glob versions prior to v9 are no longer supported",
+      "dependencies": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^5.0.1",
+        "once": "^1.3.0"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/vue-qr/node_modules/minimatch": {
+      "version": "5.1.6",
+      "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.1.6.tgz",
+      "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
+      "dependencies": {
+        "brace-expansion": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
     "node_modules/vue-ref": {
       "version": "2.0.0",
       "resolved": "https://registry.npmmirror.com/vue-ref/-/vue-ref-2.0.0.tgz",

+ 2 - 0
package.json

@@ -30,6 +30,7 @@
     "moment": "^2.29.4",
     "nprogress": "^0.2.0",
     "print-js": "^1.6.0",
+    "qrcodejs2": "^0.0.2",
     "sass-loader": "^16.0.2",
     "script-loader": "^0.7.2",
     "sortablejs": "^1.15.2",
@@ -38,6 +39,7 @@
     "vue-countupjs": "^1.0.0",
     "vue-i18n": "^8.27.0",
     "vue-image-viewer": "^1.1.8",
+    "vue-qr": "^4.0.9",
     "vue-router": "^3.5.1",
     "vuex": "^3.6.2",
     "xlsx": "^0.18.5"

+ 22 - 2
src/HDrpManagement/codeManage/index.vue

@@ -8,17 +8,27 @@
         idName="plm_technicalinfo_codeids"
         :apiId="{query:2025082513210302,del:2025082513211502}">
       <template v-slot:tbList="scope">
+        <div v-if="scope.data.column.columnname == 'codeImg'" @click="codeClick">
+            <vue-qr  text="http://192.168.3.146:8000/codeToFile.html" :size="36" ></vue-qr>
+        </div>
         <div>
           {{scope.data.column.data[scope.data.column.columnname]}}
         </div>
       </template>
       <template v-slot:tbOpreation="scope">
         <edit :data="scope.data.data" @onSuccess="onSuccess" class="inline-16"></edit>
-        <darwerPanel :id="scope.data.data.plm_technicalinfo_codeid" :title="$t(`关联商品`)" :detailPath="{path:'/relationCode'}" class="inline-16"/>
+        <darwerPanel :id="scope.data.data.plm_technicalinfo_codeid" :title="$t(`关联商品`)" :detailPath="{path:'/relationCode'}" class="inline-16" @closeDrawer="onSuccess"/>
         <btnDelete class="inline-16" paramID="2025082513211502" nameKey="plm_technicalinfo_codeids" :id="scope.data.data.plm_technicalinfo_codeid"
                    message="确认是否删除,确定删除则删除该二维码id及其所有关联商品信息" @onSuccess="onSuccess" btnTitle="删除"></btnDelete>
       </template>
     </basicLayout>
+    <el-dialog
+        append-to-body
+        :visible.sync="dialogVisible"
+        width="700px"
+    >
+      <vue-qr  text="http://192.168.3.146:8000/codeToFile.html" :size="600" @click="codeClick"></vue-qr>
+    </el-dialog>
   </div>
 </template>
 
@@ -26,12 +36,22 @@
 import edit from '@/Form/codeManage/edit'
 import darwerPanel from '@/HManagement/archives_sc/components/Rpanel'
 import btnDelete from '@/components/btn-popconfirm/index'
+import vueQr from 'vue-qr'
 export default {
   name: "index",
-  components:{edit,darwerPanel,btnDelete},
+  components:{edit,darwerPanel,btnDelete,vueQr},
+  data(){
+    return {
+      dialogVisible:false
+    }
+  },
   methods:{
     onSuccess(){
       this.$refs.basicLayout.listData()
+    },
+    codeClick(){
+      console.log('输出111111111111')
+      this.dialogVisible = true
     }
   }
 }

+ 242 - 0
src/HDrpManagement/codeManage/modules/add.vue

@@ -0,0 +1,242 @@
+<template>
+  <div>
+    <el-button size="small" type="primary"  @click="onShow">{{$t(`新增关联商品`)}}</el-button>
+    <el-drawer
+        :title="$t(`新增关联商品`)"
+        :visible.sync="drawer"
+        :wrapperClosable="false"
+        size="85%"
+        @close="onClose"
+        append-to-body
+    >
+      <div class="drawer__panel" style="margin-top: 0;margin-bottom: 0;padding-top: 0">
+        <div style="margin-top: 20px;margin-bottom: 10px">
+          <uploadAllData
+              class="inline-16"
+              :total="total"
+              @handlePullApi="handlePullApi"
+              @handleUploadApi="handleUploadApi"
+              @onSuccess="onSuccess"
+          ></uploadAllData>
+          <el-input style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="params.content.where.condition?params.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="params.content.where.condition" @keyup.native.enter="productsData(params.content.pageNumber = 1)" @clear="productsData(params.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+          </el-input>
+        </div>
+
+        <selectClass ref="class" @clickAreaBase="clickAreaBase" @brandChange="brandChange" @onClassChange="onClassChange" @Search="Search" @clearSearch="clearSearch" @clickField="clickField" :default="true"></selectClass>
+        <div>
+          <tablelayout :layout="tablecols" :data="productsList" :custom="true" :checkbox="true" height="calc(100vh - 392px)" @checkboxCallBack="checkboxCallBack">
+            <template v-slot:customcol="scope">
+              <div v-if="scope.column.columnname === 'province'">
+                <span>{{scope.column.data.province}} - {{scope.column.data.city}} - {{scope.column.data.county}}</span>
+              </div>
+              <div v-else-if="scope.column.columnname === 'isonsale'" :style="{color:scope.column.data[scope.column.columnname] === 1?tool.getStatusColor('上架',true):tool.getStatusColor('下架',true)}">
+                <span>{{scope.column.data.isonsale ? $t('上架') : $t('下架')}}</span>
+              </div>
+              <p v-else-if="scope.column.columnname === 'status'">
+                <span :style="tool.getStatusColor(scope.column.data[[scope.column.columnname]])">{{$t(scope.column.data[[scope.column.columnname]])}}</span>
+              </p>
+              <p v-else-if="scope.column.columnname === 'itemclass'">
+                <span v-if="JSON.stringify(scope.column.data.itemclass) !== '[]' && scope.column.data.itemclass">
+                   <span v-for="item in scope.column.data.itemclass" :key="item.index">
+                     <el-tag style="margin-right: 10px;margin-top: 5px;margin-bottom: 5px" type="success">{{$t(item.itemclassfullname)}}</el-tag>
+                  </span>
+                </span>
+                <span v-else>
+                  --
+                </span>
+              </p>
+              <div v-else-if="scope.column.columnname === 'nominalpressure'">
+                {{tool.nominalPressureSet(scope.column.data.nominalpressure)}}
+              </div>
+              <div v-else>{{scope.column.columnname === 'operation' || scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname] : '--'}}</div>
+            </template>
+
+          </tablelayout>
+
+        </div>
+        <div>
+          <div style="margin-top: 10px;float: left">{{$t(`已选`)}} {{selected}} {{$t(`个商品,共`)}} {{total}} {{$t(`个商品`)}}</div>
+          <div  style="margin-top: 10px;text-align:right">
+            <el-pagination
+                background
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="params.content.pageNumber"
+                :page-sizes="[20, 50, 100, 200]"
+                layout="total,sizes, prev, pager, next, jumper"
+                :total="total">
+            </el-pagination>
+          </div>
+        </div>
+        <div class="dialog-footer">
+          <el-button size="small" @click="drawer = false" class="normal-btn-width">{{$t(`取消`)}}</el-button>
+          <el-button size="small" type="primary" @click="onSubmit"  class="normal-btn-width btn-primary">{{$t(`确定`)}}</el-button>
+        </div>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import tablelayout from '@/components/table/index2'
+import uploadAllData from '@/components/uploadAllData/index'
+import selectClass from '@/components/selectClass/index'
+export default {
+  name: "add",
+  props:["plm_technicalinfo_codeid"],
+  data(){
+    return {
+      drawer:false,
+      add:false,
+      placeholder:this.$t('商品名称'),
+      form:{
+        itemid:''
+      },
+      rules:{
+        itemid: [
+          { required: true, message: this.$t('档案名称不可为空'), trigger: 'blur' },
+        ],
+      },
+      productsList:[],
+      multipleSelection: [],
+      tablecols:[],
+      tableHieght:420,
+      selected:0,
+      total:0,
+      currentPage:0,
+      params:{
+        "id": 2025082514111602,
+        "content": {
+          "pageNumber":1,
+          "pageSize":20,
+          "where": {
+            "condition": "",
+            "standards": "",
+            "tradefield": "",
+            "sa_brandid": "",
+            "itemclassid": ""
+          }
+        }
+      }
+    }
+  },
+  components:{
+    tablelayout,
+    uploadAllData,
+    selectClass
+  },
+  mounted() {
+
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).addProductTable.tablecols
+  },
+  methods: {
+    onShow(){
+      this.drawer = true
+      this.productsData()
+    },
+    onClose(){
+      this.drawer = false
+      this.form.itemid=''
+    },
+    async productsData(){
+      const res = await this.$api.requested(this.params)
+      console.log(res)
+      this.productsList = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    checkboxCallBack(val){
+      console.log(val)
+      this.multipleSelection = val;
+      this.selected = val.length
+
+    },
+    /*拉取数据*/
+    handlePullApi (pullApi) {
+      pullApi.content = JSON.parse(JSON.stringify(this.params.content))
+      pullApi.id = this.params.id
+    },
+    /*上传数据*/
+    handleUploadApi (uploadApi,data) {
+      uploadApi.id = 20220926102003
+      let arr = data.map(e=>{
+        return {
+          plm_technicalinfo_codeid:this.plm_technicalinfo_codeid,
+          itemid:e.itemid
+        }
+      })
+      uploadApi.content = {
+        "plm_technicalinfo_codeid":this.plm_technicalinfo_codeid,
+        "itemids":arr
+      }
+    },
+    async onSubmit(){
+      console.log(this.multipleSelection)
+      let arr = this.multipleSelection.map(item=>item.itemid)
+      const res = await this.$api.requested({
+        "id": "2025082514084802",
+        "content": {
+          "plm_technicalinfo_codeid":this.plm_technicalinfo_codeid,
+          "itemids":arr
+        }
+      })
+      this.tool.showMessage(res, () => {
+        this.drawer = false
+        this.$emit('addSuccess')
+      })
+    },
+    onSuccess () {
+      this.$emit('addSuccess')
+      this.drawer = false
+    },
+    searchActive(data) {
+      this.params.content.where.condition = data
+      this.productsData()
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.params.content.pageSize = val
+      this.productsData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.params.content.pageNumber = val
+      this.productsData()
+    },
+    clickAreaBase (item) {
+      this.params.content.where.standards = item
+      this.productsData()
+    },
+    brandChange(id) {
+      console.log(id);
+      this.brandId = id
+      this.$refs.class.clickClass(false)
+      // this.productsData()
+    },
+    onClassChange (n) {
+      this.params.content.where.itemclassid = n.itemclassid
+      this.productsData()
+    },
+    Search(data) {
+      this.params.content.where.condition = data
+      this.params.content.pageNumber = 1
+      this.productsData()
+    },
+    clearSearch() {
+      this.params.content.where.condition = ''
+      this.params.content.pageNumber = 1
+      this.productsData()
+    },
+    clickField (item) {
+      this.params.content.where.tradefield = item.tradefield
+      this.productsData()
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 70 - 0
src/HDrpManagement/codeManage/modules/relation.vue

@@ -0,0 +1,70 @@
+<template>
+  <div >
+    <div class="container normal-panel normal-margin">
+      <add :plm_technicalinfo_codeid="this.$route.query.id" @addSuccess="onSuccess" class="inline-16"></add>
+      <el-button type="primary" @click="onDeletes" size="small" :disabled="selectList.length == 0">{{$t(`批量删除`)}}</el-button>
+    </div>
+    <div class="container normal-panel " style="padding-top: 0px">
+      <relation_list ref="list" :id="this.$route.query.id" :checkbox="true" @selectionChange="selectionChange">
+        <template v-slot:del="scope">
+          <relationDel v-if="tool.checkAuth($route.name,'delete')" :data="scope.data" :type="'text'" @deleteSuccess="onSuccess"></relationDel>
+        </template>
+      </relation_list>
+    </div>
+  </div>
+</template>
+
+<script>
+import relation_list from './relationList'
+import add from './add'
+import relationDel from './relationDel'
+export default {
+  name: "relation",
+  data() {
+    return {
+      selectList:[]
+    }
+  },
+  components:{
+    relation_list,
+    add,
+    relationDel
+  },
+  methods:{
+    onSuccess(){
+      this.$refs.list.listData(this.$refs.list.params.content.pageNumber = 1)
+    },
+    selectionChange(data){
+      this.selectList = []
+      this.selectList = data.map(item=>item.plm_technicalinfo_code_itemid)
+    },
+    onDeletes(){
+      this.$confirm(this.$t('是否确认批量删除关联商品')+'?', this.$t('提示'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: 'warning'
+      }).then(async () => {
+        const res = await this.$api.requested({
+          "id": "2025082514092302",
+          "content": {
+            "plm_technicalinfo_code_itemids": this.selectList
+          },
+        })
+        this.tool.showMessage(res,()=>{
+          this.selectList = []
+          this.onSuccess()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: this.$t('已取消删除')
+        });
+      });
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 33 - 0
src/HDrpManagement/codeManage/modules/relationDel.vue

@@ -0,0 +1,33 @@
+<template>
+  <div class="inline-16">
+    <el-popconfirm :confirm-button-text="$t('确定')" :cancel-button-text="$t('取消')"
+        :title="$t(`确定删除此商品吗`)+'?'"
+        @confirm="deleteRow()">
+      <el-button slot="reference" size="small" type="text">{{$t('删 除')}}</el-button>
+    </el-popconfirm>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "relationDel",
+  props:['data'],
+  methods:{
+    async deleteRow() {
+      const res = await this.$api.requested({
+        "id": "2025082514092302",
+        "content": {
+          "plm_technicalinfo_code_itemids":[this.data.plm_technicalinfo_code_itemid]
+        }
+      })
+      this.tool.showMessage(res, () => {
+        this.$emit('deleteSuccess')
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 121 - 0
src/HDrpManagement/codeManage/modules/relationList.vue

@@ -0,0 +1,121 @@
+<template>
+  <div>
+    <search :placeholder="placeholder" @searchActive="searchActive"></search>
+    <table-new-layout :layout="tablecols" :data="list" :checkbox="checkbox" :opwidth="200" :custom="true" :width="true" :height="list.length <= 5?'300px':tableHieght" @selectionChange="selectionChange">
+      <template v-slot:customcol="scope">
+        <div v-if="scope.column.columnname === 'isonsale' " :style="{color:scope.column.data[scope.column.columnname] === 1?tool.getStatusColor('上架',true):tool.getStatusColor('下架',true)}">
+          <span v-if="scope.column.data[scope.column.columnname] === 0"
+          >{{$t(`下架`)}}
+          </span>
+          <span v-if="scope.column.data[scope.column.columnname] === 1"
+          >{{$t(`上架`)}}
+          </span>
+        </div>
+        <p v-else-if="scope.column.columnname === 'status'">
+          <span :style="tool.getStatusColor(scope.column.data[[scope.column.columnname]])">{{$t(scope.column.data[[scope.column.columnname]])}}</span>
+        </p>
+        <p v-else-if="scope.column.columnname === 'itemclass'">
+          <span v-if="JSON.stringify(scope.column.data.itemclass) !== '[]' && scope.column.data.itemclass">
+             <span v-for="item in scope.column.data.itemclass" :key="item.index">
+               <el-tag style="margin-right: 10px;margin-top: 5px;margin-bottom: 5px" type="success">{{$t(item.itemclassfullname)}}</el-tag>
+            </span>
+          </span>
+          <span v-else>
+            --
+          </span>
+        </p>
+        <div v-else-if="scope.column.columnname === 'nominalpressure'">
+          {{tool.nominalPressureSet(scope.column.data.nominalpressure)}}
+        </div>
+        <div v-else>{{scope.column.columnname === 'operation' || scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname] : '--'}}</div>
+      </template>
+      <template v-slot:opreation="scope">
+        <div>
+          <slot name="del" :data="scope.data"></slot>
+        </div>
+      </template>
+    </table-new-layout>
+    <div style="margin-top:16px;text-align:right">
+      <el-pagination
+          background
+          small
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-size="params.content.pageSize"
+          layout="total, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import search from './search'
+export default {
+  name: "relationList",
+  props:["id","checkbox"],
+  data(){
+    return {
+      placeholder:this.$t('商品名称'),
+      tableHieght:'calc(100vh - 210px)',
+      list:[],
+      tablecols:[],
+      total:0,
+      currentPage:0,
+      params:{
+        "id": "2025082514100702",
+        "content": {
+          "plm_technicalinfo_codeid":this.id,
+          "pageSize":20,
+          "pageNumber":1,
+          "where":{
+            "condition":"",
+          }
+        }
+      }
+    }
+  },
+  components:{
+    search
+  },
+  mounted() {
+    this.listData()
+  },
+  methods:{
+    async listData(){
+      const res = await this.$api.requested(this.params)
+      this.list = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+      console.log(this.currentPage);
+
+      console.log(res)
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.params.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.params.content.pageNumber = val
+      this.listData()
+    },
+    searchActive(data){
+      this.params.content.where.condition = data
+      this.listData()
+    },
+    selectionChange(list){
+      this.$emit('selectionChange',list)
+    }
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).relationProductTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 48 - 0
src/HDrpManagement/codeManage/modules/search.vue

@@ -0,0 +1,48 @@
+<template>
+  <div class="container border-bottom">
+    <span>{{$t(`搜索`)}}: </span>
+    <el-input
+        with="200"
+        type="text"
+        v-model="search"
+        :placeholder="placeholder"
+        size="small"
+        clearable
+        @searchActive="queryClick"
+        @keyup.enter.native="queryClick()"
+        @clear="queryClick"
+    >
+      <i slot="prefix" class="el-icon-search"  @click="queryClick()"></i>
+    </el-input>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "search",
+  props:["placeholder"],
+  data() {
+    return {
+      search:'',
+    }
+  },
+  methods: {
+    queryClick(){
+      this.$emit('searchActive',this.search)
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+  .el-input {
+    width: 200px;
+    margin-right: 16px;
+  }
+  /deep/.el-input__prefix {
+    display: flex;
+    align-items: center;
+  }
+
+</style>

+ 13 - 0
src/HDrpManagement/prodectFileData/components/codeToFile.vue

@@ -0,0 +1,13 @@
+<template>
+  <div>{{'展示数据1111'}}</div>
+</template>
+
+<script>
+export default {
+  name: "codeToFile"
+}
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 1
src/HManagement/archives_sc/components/Rpanel.vue

@@ -34,6 +34,7 @@ export default {
       this.$router.push({path:this.detailPath.path,query:{id:this.id}})
     },
     closeDrawer () {
+      this.$emit('closeDrawer')
       this.$router.back()
     }
   },
@@ -55,4 +56,4 @@ export default {
   color:#666;
   height:100vh;
 }
-</style>
+</style>

+ 1 - 1
src/router/HDrpManagement.js

@@ -248,7 +248,7 @@ const HDrpManagement = [
           ast_nav: true,
           keeproute: true,
         },
-        component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/prodectFileData/modules/relation')
+        component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/codeManage/modules/relation')
       }
     ]
   },{

+ 1 - 1
src/router/index.js

@@ -24,7 +24,6 @@ let routes = [
     name: 'login',
     component: () => import(/* webpackChunkName: "about" */ '@/views/login/login.vue')
   },
-
   // {
   //   path: '/accounts',
   //   name: 'accounts',
@@ -161,6 +160,7 @@ let routes = [
   },
 ];
 
+
 routes[2].children = [...routes[2].children,...HManagement,...SManagement,...HDrpManagement,...SDrpManagement,...WebsiteManagement,...OptionSystem]
 
 const router = new VueRouter({