Sfoglia il codice sorgente

Merge branch 'redUrgent' into testToMerge

qymljy 6 mesi fa
parent
commit
f9570e0b48

+ 7 - 2
src/HDrpManagement/dispatch/details/index.vue

@@ -18,8 +18,11 @@
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
       </div>
+      <div slot="customOperationBef">
+        <printMaterials v-if="tool.checkAuth($route.name,'printMaterials')" :disabled="mainData.status != '复核' && mainData.status != '关闭' "></printMaterials>
+      </div>
       <div slot="customOperation">
-        <Edit class="inline-16" style="margin-left: -10px" v-if="tool.checkAuth($route.name,'update') && mainData.status == '新建'" :data="mainData" @onSuccess="onSuccess" />
+        <Edit class="inline-16"  v-if="tool.checkAuth($route.name,'update') && mainData.status == '新建'" :data="mainData" @onSuccess="onSuccess" />
         <el-button class="inline-16" :type="mainData.status !== '复核'?'':'primary'" size="mini"  v-if="tool.checkAuth($route.name,'createBill') && (mainData.status == '新建' || mainData.status == '提交' || mainData.status == '复核')" :disabled="mainData.status !== '复核'" @click="addLogistics">{{$t(`生成物流单`)}}</el-button>
 <!--        <confirmSelection class="inline-16" v-if="tool.checkAuth($route.name,'submit') && mainData.status == '新建'" btnTitle="提交" :disabled="mainData.status !== '新建'" btnType="primary" content="是否确定提交发货单" confirmButtonText="确定" cancelButtonText="取消" paramId="2024120915192102" idName="sa_dispatchid" @onSuccess="onSuccess"></confirmSelection>-->
         <dialogTemplate ref="submitRef" v-if="tool.checkAuth($route.name,'submit') && mainData.status == '新建'" class="inline-16" btnTitle="提交" :disabled="mainData.status !== '新建'" btnType="primary" :mainAData="mainAreaData" content="是否确定提交发货单" paramId="2024120915192102" idName="sa_dispatchid" @onSuccess="onSuccess" @submitSuccess="submitSuccess"></dialogTemplate>
@@ -66,6 +69,7 @@ import erpInfo from '../modules/erpInfo.vue'
 import defaultInfo from '../modules/defaultInfo.vue'
 import dialogTemplate from "@/components/dialogTemplate/index";
 import dialogTemplateNew from '@/components/dialogTemplate/index1'
+import printMaterials from "../modules/printMaterials";
   export default {
     name: "detail",
     data() {
@@ -96,7 +100,8 @@ import dialogTemplateNew from '@/components/dialogTemplate/index1'
       defaultInfo,
       erpInfo,
       dialogTemplate,
-      dialogTemplateNew
+      dialogTemplateNew,
+      printMaterials
     },
     methods:{
       async queryMainData(id) {

+ 206 - 0
src/HDrpManagement/dispatch/modules/printMaterials.vue

@@ -0,0 +1,206 @@
+<template>
+  <div>
+    <el-dropdown @command="addBtn" :disabled="disabled">
+      <el-button :type="disabled?'':'primary'" size="mini" :disabled="disabled">
+        {{$t(`打印资料`)}}<i class="el-icon-arrow-down el-icon--right"></i>
+      </el-button>
+      <el-dropdown-menu slot="dropdown">
+        <el-dropdown-item command="质保书">{{$t(`质保书`)}}</el-dropdown-item>
+        <el-dropdown-item command="合格证">{{$t(`合格证`)}}</el-dropdown-item>
+        <el-dropdown-item command="检验报告">{{$t(`检验报告`)}}</el-dropdown-item>
+      </el-dropdown-menu>
+    </el-dropdown>
+    <el-drawer
+        :visible.sync="drawer"
+        :with-header="false"
+        direction="rtl"
+        size="50%"
+        append-to-body>
+      <div class="detail__panel container">
+        <p class="normal-title" style="margin-bottom:16px">{{$t(drawerTitle)}}</p>
+        <el-table
+            v-loading="loading"
+            :data="list"
+            :height="heightTable"
+            border
+            style="width: 100%">
+          <el-table-column
+              prop="name"
+              :label="$t(`报表名称`)">
+          </el-table-column>
+          <el-table-column
+              prop="operation"
+              :label="$t(`操作`)"
+              width="150px">
+            <template slot-scope="scope">
+              <el-button @click="printBtn(scope.row)" type="text" size="mini">{{$t('打 印')}}</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div style="margin-top:10px;text-align:right" v-if="nowSelect == '检验报告'">
+          <el-pagination
+              background
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="param.content.pageNumber"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="20"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="total">
+          </el-pagination>
+        </div>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "printMaterials",
+  props:{
+    disabled:Boolean
+  },
+  data(){
+    return {
+      drawer:false,
+      list:[],
+      nowSelect:"",
+      sys_reportid:'',
+      idName:'',
+      drawerTitle:'',
+      param:{
+        "id": 20221115104703,
+        "content": {
+          "sa_orderid": 0,
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        },
+      },
+      total:0,
+      currentPage:0,
+      heightTable:260 + 'px',
+      loading:false
+    }
+  },
+  methods:{
+    addBtn(type){
+      if (type == '质保书'){
+        this.list = [
+          {
+            name:'质保书'
+          }
+        ]
+        this.nowSelect = type
+        this.idName = 'sa_dispatchid'
+        this.dataid = this.$route.query.id
+        this.drawerTitle = '打印质保书'
+        this.drawer = true
+      }else if (type == '检验报告'){
+        this.nowSelect = type
+        this.idName = 'sa_dispatch_itemsid'
+        this.drawerTitle = '打印检验报告'
+        this.param.content.pageNUmber = 1
+        this.drawer = true
+        this.loading = true
+        this.heightTable = 'calc(100vh - 160px)'
+        this.listData()
+      }else if (type == '合格证'){
+        this.nowSelect = type
+        this.idName = 'sa_dispatchid'
+        this.drawerTitle = '打印合格证'
+        this.dataid = this.$route.query.id
+      }
+      this.queryReportId(type)
+    },
+    async queryReportId(type){
+      const res = await this.$api.requested({
+        "id": "2025101715070202",
+        "content": {
+        },
+      })
+      if (res.code == 0){
+        this.tool.showMessage(res,()=>{})
+      }else {
+        res.data.forEach(item=>{
+          if (item.name == type){
+            this.sys_reportid = item.sys_reportid
+          }
+        })
+        if (this.nowSelect == '合格证'){
+          this.isPrint()
+        }
+      }
+    },
+    async listData(){
+      this.param.content.sa_dispatchid = this.$route.query.id
+      const res = await this.$api.requested(this.param)
+      let tableData = res.data.map(item=>{
+        return {
+          name:item.itemno + ' ' + item.itemname + '_检验报告',
+          sa_dispatch_itemsid:item.sa_dispatch_itemsid
+        }
+      })
+      this.list = tableData
+      this.total = res.total
+      this.currentPage = res.pageNumber
+      this.loading = false
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    /*判断是否可以打印合格证*/
+    async isPrint(){
+      const res = await this.$api.requested({
+        "id": "2025101713160202",
+        "content": {
+          "sa_dispatchid":this.$route.query.id
+        },
+      })
+      if (res.code == 0){
+        this.tool.showMessage(res,()=>{
+        })
+      }else {
+        this.printBtn()
+      }
+    },
+    async printBtn (data) {
+      if (this.nowSelect == '检验报告'){
+        this.dataid = data.sa_dispatch_itemsid
+      }
+      let res = await this.$api.requested({
+        "id":20221213094501,
+        "content": {
+          sys_reportid:this.sys_reportid,
+          dataid:this.dataid
+        }
+      })
+      this.tool.showMessage(res,() => {
+        window.open(this.tool.getBaseUrl() + res.data + `&${this.idName}=${this.dataid}`)
+        // window.open('http://61.164.207.46:8000' + res.data + `&${this.idName}=${this.dataid}`)
+      })
+    },
+  }
+}
+</script>
+
+<style scoped>
+.box p {
+  line-height: 40px;
+  text-align: center;
+}
+.box p:hover {
+  background: #EBF1FE;
+  color: #6191F8;
+  cursor: pointer;
+}
+</style>

+ 6 - 1
src/HDrpManagement/logistics/details/index.vue

@@ -15,6 +15,9 @@
           @onEditSuccess="queryMainData($route.query.id)">
         <div slot="tags">
         </div>
+        <template slot="customOperationBef">
+          <print  v-if="tool.checkAuth($route.name,'exportPacking')"></print>
+        </template>
         <div slot="customOperation" >
           <Edit class="inline-16" v-if="tool.checkAuth($route.name,'update')" :data="mainData" @onSuccess="queryMainData(),$refs.dispatch.listData()"/>
           <el-button type="primary" size="mini"  v-if="tool.checkAuth($route.name,'confirmRec') && mainData.status =='审核'" :disabled="mainData.status == '收货'" @click="onConfimRec">{{$t(`确认收货`)}}</el-button>
@@ -51,6 +54,7 @@
   import boxlist from './tabs/logisticsBox/logisticsBox.vue'
   import courierRecords from './tabs/courierRecords.vue'
   import erpInfo from './tabs/erpInfo.vue'
+  import print from '../modules/print'
   export default {
     name: "detail",
     data() {
@@ -69,7 +73,8 @@
       boxlist,
       courierRecords,
       Edit,
-      erpInfo
+      erpInfo,
+      print
     },
     methods:{
       async queryMainData(id) {

+ 151 - 0
src/HDrpManagement/logistics/modules/print.vue

@@ -0,0 +1,151 @@
+<template>
+  <div>
+    <el-button type="primary" size="mini" @click="addBtn">
+      {{$t(`导出装箱单`)}}
+    </el-button>
+    <el-drawer
+        :visible.sync="drawer"
+        :with-header="false"
+        direction="rtl"
+        size="50%"
+        append-to-body>
+      <div class="detail__panel container">
+        <p class="normal-title" style="margin-bottom:16px">{{$t(drawerTitle)}}</p>
+        <el-table
+            v-loading="loading"
+            :data="list"
+            :height="heightTable"
+            border
+            style="width: 100%">
+          <el-table-column
+              prop="name"
+              :label="$t(`报表名称`)">
+          </el-table-column>
+          <el-table-column
+              prop="operation"
+              :label="$t(`操作`)"
+              width="150px">
+            <template slot-scope="scope">
+              <el-button @click="printBtn(scope.row)" type="text" size="mini">{{$t('打 印')}}</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div style="margin-top:10px;text-align:right" >
+          <el-pagination
+              background
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="param.content.pageNumber"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="20"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="total">
+          </el-pagination>
+        </div>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "print",
+  data() {
+    return {
+      drawer:false,
+      list:[],
+      drawerTitle:'',
+      param:{
+        "id": 20230109155204,
+        "content": {
+          "sa_logisticsid":'',
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        },
+      },
+      total:0,
+      currentPage:0,
+      heightTable:260 + 'px',
+      loading:false
+    }
+  },
+  methods:{
+    addBtn(){
+      this.idName = 'sa_logistics_boxid'
+      this.drawerTitle = '打印装箱单'
+      this.param.content.pageNUmber = 1
+      this.drawer = true
+      this.loading = true
+      this.heightTable = 'calc(100vh - 160px)'
+      this.listData()
+      this.queryReportId()
+    },
+    async queryReportId(){
+      const res = await this.$api.requested({
+        "id": "20221213094401",
+        "content": {
+          "isExport":0,
+          "pageNumber":1,
+          "pageSize":100,
+          "systemappid": 163,
+          "where":{
+            "condition":'装箱单-HY'
+          }
+        },
+      })
+      if (res.code == 0){
+        this.tool.showMessage(res,()=>{})
+      }else {
+        res.data.forEach(item=>{
+          this.sys_reportid = item.sys_reportid
+        })
+      }
+    },
+    async listData(){
+      this.param.content.sa_logisticsid = this.$route.query.id
+      const res = await this.$api.requested(this.param)
+      let tableData = res.data.map(item=>{
+        return {
+          name:'箱码' + item.boxnum + '_装箱单',
+          sa_logistics_boxid:item.sa_logistics_boxid
+        }
+      })
+      this.list = tableData
+      this.total = res.total
+      this.currentPage = res.pageNumber
+      this.loading = false
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    async printBtn (data) {
+      this.dataid = data.sa_logistics_boxid
+      let res = await this.$api.requested({
+        "id":20221213094501,
+        "content": {
+          sys_reportid:this.sys_reportid,
+          dataid:this.dataid
+        }
+      })
+      this.tool.showMessage(res,() => {
+        // window.open(this.tool.getBaseUrl() + res.data + `&${this.idName}=${this.dataid}`)
+        window.open('http://61.164.207.46:8000' + res.data + `&${this.idName}=${this.dataid}`)
+      })
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 110 - 0
src/HDrpManagement/productInspectionMag/detail/index.vue

@@ -0,0 +1,110 @@
+<template>
+  <basicDetails
+      ref="details"
+      :titleText="mainData.itemname"
+      :editData="mainData"
+      :mainAreaData="mainAreaData"
+      turnPageId="2025101415105002"
+      idname="itemid"
+      ownertable="plm_item"
+      :tabs="['检验明细']"
+      @pageChange="pageChange"
+  >
+    <template slot="customOperation">
+      <edit v-if="tool.checkAuth($route.name,'update') && mainData.jystatus == '新建'" class="inline-16" @onSuccess="queryMainData" :data="mainData" ></edit>
+      <confirmBtn class="inline-16" :id="$route.query.id" message="确定审核该产品吗?" btn_title="审核" param-id="2025101415115502" @onSuccess="queryMainData" v-if="mainData.jystatus == '新建'"></confirmBtn>
+      <confirmBtn class="inline-16" :id="$route.query.id" message="确定反审核该产品吗?" btn_title="反审核" param-id="2025101415122902" @onSuccess="queryMainData" v-if="mainData.jystatus == '审核'"></confirmBtn>
+    </template>
+    <div slot="slot0" class="normal-panel" >
+      <checkInfo :disabled="mainData.jystatus == '审核'"></checkInfo>
+    </div>
+  </basicDetails>
+</template>
+
+<script>
+import checkInfo from '../modules/checkInfo'
+import edit from '../modules/edit'
+import confirmBtn from '@/components/confirmBtn/index'
+export default {
+  name: "index",
+  data(){
+    return {
+      mainData:{},
+      mainAreaData:{}
+    }
+  },
+  components:{checkInfo,edit,confirmBtn},
+  methods:{
+    async queryMainData(id){
+      const res = await this.$api.requested({
+        "content": {
+          "itemid": id?id:this.$route.query.id
+        },
+        "id": 2025101415231302,
+      })
+      this.mainData = Object.assign({},this.mainData,res.data)
+      this.changeDataStructure()
+    },
+    changeDataStructure(){
+      let that = this
+      this.mainAreaData = [
+        {
+          label:'产品编码',
+          value:this.mainData.itemno
+        },
+        {
+          label:'erp品号',
+          value:this.mainData.erpitemno
+        },
+        {
+          label:'erp品名',
+          value:this.mainData.erpitemname
+        },
+        {
+          label:'型号',
+          value:this.mainData.model
+        },
+        {
+          label:'规格',
+          value:this.mainData.spec
+        },
+        {
+          label:'公称通径',
+          value:this.mainData.caliber
+        },
+        {
+          label:'公称压力',
+          value:this.mainData.nominalpressurestr
+        },
+        {
+          label:'适用温度',
+          value:this.mainData.temperature
+        },
+        {
+          label:'适用介质',
+          value:this.mainData.medium
+        },
+        {
+          label:'状态',
+          value:this.mainData.jystatus,
+          style:function () {
+            let style = that.tool.getStatusColor(that.mainData.jystatus)
+            return style
+          }
+        },
+      ]
+    },
+    // 监听切换数据,上一页,下一页
+    pageChange (id,rowindex) {
+      this.queryMainData(id)
+    },
+  },
+  mounted() {
+    this.queryMainData()
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 115 - 0
src/HDrpManagement/productInspectionMag/index.vue

@@ -0,0 +1,115 @@
+<template>
+  <div>
+    <basicLayout
+        style="padding-top:0 !important"
+        ref="basicLayout"
+        table-name="productInspectionTable"
+        id-name="itemid"
+        :apiId="{query:2025101415105002,del:''}"
+        :detailPath="{path:'/productInspectionMagDetail'}">
+      <template #titleRight>
+        <importFile title="导入明细" paramID="2025101509114902" @onSuccess="importSuccess"
+                    :bindData="{ownertable:'plm_item',ownerid:$route.query.id,usetype:'default'}"
+                    :errorUrl="errorUrl"
+                    @clearUrl="errorUrl = null"></importFile>
+      </template>
+      <template #custom>
+        <div class="mt-10">
+          <label  class="search__label" >{{$t(`状态`)}}:</label>
+          <el-select class="inline-24" v-model="selectParam.status" :placeholder="$t(`请选择状态`)" @change="selectChange" size="small" clearable>
+            <el-option
+                v-for="item in statusData"
+                :key="item.value"
+                :label="$t(item.value)"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
+        <div class="mt-10">
+          <label class="search__label" >{{$t(`审核时间`)}}:</label>
+          <el-date-picker
+              style="margin-right: 24px !important;"
+              size="small"
+              @change="selectChange"
+              value-format="yyyy-MM-dd"
+              v-model="dateSelect"
+              type="daterange"
+              :range-separator="$t(`至`)"
+              :start-placeholder="$t(`开始日期`)"
+              :end-placeholder="$t(`结束日期`)"
+              clearable>
+          </el-date-picker>
+        </div>
+      </template>
+      <template v-slot:tbList="scope">
+        <div v-if="scope.data.column.columnname === 'jystatus'">
+          <span :style="tool.getStatusColor(scope.data.column.data[[scope.data.column.columnname]])">{{$t(scope.data.column.data[[scope.data.column.columnname]])}}</span>
+        </div>
+        <div v-else>{{scope.data.column.data[[scope.data.column.columnname]]?$t(scope.data.column.data[[scope.data.column.columnname]]):'--'}}</div>
+      </template>
+    </basicLayout>
+  </div>
+</template>
+
+<script>
+import importFile from '@/components/import/importNoIcon'
+export default {
+  name: "index",
+  components:{importFile},
+  data() {
+    return {
+      statusData:[
+        {
+          value:'新建',
+          label:'新建'
+        },
+        {
+          value:'审核',
+          label:'审核'
+        }
+      ],
+      dateSelect:'',
+      selectParam:{
+        begindate: "",
+        enddate: "",
+        status: ""
+      },
+      errorUrl:null,
+    }
+  },
+  methods:{
+    selectChange(){
+      if (this.dateSelect !== '' && this.dateSelect !== null){
+        this.selectParam.begindate = this.dateSelect[0]
+        this.selectParam.enddate = this.dateSelect[1]
+      }else {
+        this.selectParam.begindate = ''
+        this.selectParam.enddate = ''
+      }
+      this.$refs.basicLayout.param.content.pageNumber = 1
+      this.$refs.basicLayout.param.content.where = this.selectParam
+      this.$refs.basicLayout.listData()
+    },
+    async importSuccess(id){
+      const res = await this.$api.requested({
+        "id": 2025101509132002,
+        "content": {
+          "attachmentid":id
+        }
+      })
+      if (res.data !== '成功') {
+        this.errorUrl = res.msg
+        res.msg = this.$t('失败')
+      }
+      /*res.msg = '失败'*/
+      this.tool.showMessage(res,() => {
+        this.$refs.basicLayout.listData()
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 245 - 0
src/HDrpManagement/productInspectionMag/modules/checkInfo.vue

@@ -0,0 +1,245 @@
+<template>
+  <div>
+    <div>
+      <el-input  style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+      </el-input>
+      <el-button type="primary" size="small" @click="addClick"  :disabled="isAdd || disabled">{{$t(`添加`)}}</el-button>
+    </div>
+    <table-detail :layout="tablecols" :data="list" :opwidth="200" :custom="true" style="margin-top: 10px">
+      <template v-slot:customcol="scope">
+        <div v-if="scope.column.columnname == 'sequence'">
+          <div v-if="isAdd && nowIndex == scope.column.data.rowindex">
+            <el-input
+                v-model="scope.column.data.sequence"
+            ></el-input>
+          </div>
+          <div v-else>
+            {{tool.qtyShow(scope.column.data[scope.column.columnname])}}
+          </div>
+        </div>
+        <div v-else-if="scope.column.columnname == 'optionname'">
+          <div v-if="isAdd && nowIndex == scope.column.data.rowindex">
+            <el-select
+                v-model="scope.column.data[scope.column.columnname]"
+                size="small"
+                :placeholder="$t('请选择检验项目')"
+                @change="selectChange"
+                style="width: 100%"
+            >
+              <el-option
+                  v-for="item in optionnameList"
+                  :key="item.value"
+                  :label="$t(item.value)"
+                  :value="item.value"
+              >
+              </el-option>
+            </el-select>
+            <div v-if="!scope.column.data[scope.column.columnname] && isSave" style="color: red">{{$t('请选择检验项目')}}</div>
+          </div>
+          <div v-else>
+            {{scope.column.data[scope.column.columnname]}}
+          </div>
+        </div>
+        <div v-else-if="scope.column.columnname == 'ask'">
+          <div v-if="isAdd && nowIndex == scope.column.data.rowindex">
+            <el-select
+                v-model="scope.column.data[scope.column.columnname]"
+                size="small"
+                :placeholder="$t('请选择技术要求')"
+                style="width: 100%"
+            >
+              <el-option
+                  v-for="item in askList"
+                  :key="item.index"
+                  :label="$t(item)"
+                  :value="item"
+              >
+              </el-option>
+            </el-select>
+            <div v-if="!scope.column.data[scope.column.columnname] && isSave" style="color: red">{{$t('请选择技术要求')}}</div>
+          </div>
+          <div v-else>
+            {{scope.column.data[scope.column.columnname]}}
+          </div>
+        </div>
+        <div v-else-if="scope.column.columnname == 'answer'">
+          <div v-if="isAdd && nowIndex == scope.column.data.rowindex">
+            <el-select
+                v-model="scope.column.data[scope.column.columnname]"
+                size="small"
+                :placeholder="$t('请选择结论')"
+                style="width: 100%"
+            >
+              <el-option
+                  v-for="item in answerList"
+                  :key="item"
+                  :label="$t(item)"
+                  :value="item"
+              >
+              </el-option>
+            </el-select>
+            <div v-if="!scope.column.data[scope.column.columnname] && isSave" style="color: red">{{$t('请选择结论')}}</div>
+          </div>
+          <div v-else>
+            {{scope.column.data[scope.column.columnname]}}
+          </div>
+        </div>
+        <div v-else-if="scope.column.columnname == 'operation'">
+          <el-button type="text" size="small" v-if="isAdd && nowIndex == scope.column.data.rowindex" @click="onSave(scope.column.data)" style="color: #e6a23c" :disabled="disabled">{{$t(`保存`)}}</el-button>
+          <el-button type="text" size="small" class="inline-16" v-else @click="onEdit(scope.column.data)" :disabled="disabled">{{$t(`编辑`)}}</el-button>
+          <el-button size="small" type="text" v-if="nowIndex != scope.column.data.rowindex" style="color: #f56c6c" :disabled="disabled" @click="delInfo(scope.column.data)">{{$t(`删除`)}}</el-button>
+        </div>
+        <div v-else>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname] : '--'}}</div>
+      </template>
+    </table-detail>
+    <div  class="container normal-panel" style="text-align:right">
+      <el-pagination
+          background
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[20, 50, 100, 200]"
+          :page-size="20"
+          layout="total,sizes, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "checkInfo",
+  props:['disabled'],
+  data() {
+    return {
+      param:{
+        content: {
+          itemid: this.$route.query.id,
+          pageNumber: 1,
+          pageSize: 20,
+          where:{
+            condition:''
+          }
+        },
+        id: 2025101415222702,
+      },
+      tablecols:[],
+      list:[],
+      total:0,
+      currentPage:0,
+      isAdd:false,
+      optionnameList:[],
+      askList:[],
+      answerList:['合格','不合格'],
+      nowIndex:0,
+      isOptionname:'',
+      isAsk:'',
+      isAnswer:'',
+      isSave:false
+    }
+  },
+  methods:{
+    addClick(){
+      this.queryType()
+      this.isAdd = true
+      this.list.push({
+        "plm_item_jymxid": 0,
+        "itemid": this.$route.query.id,
+        "optionname": "",
+        "ask": "",
+        "answer": "",
+        "sequence": this.list.length + 1,
+        "rowindex":this.list.length + 1
+      })
+      this.nowIndex = this.list[this.list.length -1].rowindex
+      console.log(this.nowIndex)
+    },
+    async queryType(){
+      const res = await this.$store.dispatch("optiontypeselect", "inspectionitems")
+      this.optionnameList = res.data
+    },
+    async delInfo(data){
+      const res = await this.$api.requested({
+        "content": {
+          "plm_item_jymxid": data.plm_item_jymxid
+        },
+        "id": 2025101415212502,
+      })
+      if (res.code == 0){
+        this.tool.showMessage(res,()=>{})
+      }else {
+        this.param.content.pageNUmber = 1
+        this.listData()
+      }
+    },
+    async listData(){
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.currentPage = res.pageNumber
+      this.total = res.total
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    async onSave(data){
+      this.isSave = true
+      if (data.optionname != '' && data.ask != '' && data.answer != ''){
+        const res = await this.$api.requested({
+          "content": {
+            "plm_item_jymxid": data.plm_item_jymxid,
+            "itemid": this.$route.query.id,
+            "optionname": data.optionname,
+            "ask": data.ask,
+            "answer": data.answer,
+            "sequence": data.sequence
+          },
+          "id": 2025101415205302,
+        })
+        if (res.code == 0){
+          this.tool.showMessage(res,()=>{})
+        }else {
+          this.param.content.pageNUmber = 1
+          this.isAdd = false
+          this.nowIndex = ''
+          this.listData()
+          this.isSave = false
+        }
+      }else {
+
+      }
+
+    },
+    onEdit(data){
+      this.queryType()
+      this.nowIndex = data.rowindex
+      this.isAdd = true
+    },
+    selectChange(val){
+      this.list[this.nowIndex - 1].ask = ''
+      this.optionnameList.forEach(item=>{
+        if (val == item.value){
+          this.askList = item.subvalues
+        }
+      })
+    }
+  },
+  mounted() {
+    this.listData()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).checkInfoTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 151 - 0
src/HDrpManagement/productInspectionMag/modules/edit.vue

@@ -0,0 +1,151 @@
+<template>
+  <div>
+    <el-button type="primary" size="mini" @click="onShow">{{$t(`编辑`)}}</el-button>
+    <el-drawer
+        :title="$t('编辑')"
+        :visible.sync="dialogFormVisible"
+        :wrapperClosable="false"
+        size="700px"
+        direction="rtl"
+        append-to-body
+        :show-close="false"
+        @close="onClose"
+    >
+      <div class="drawer__panel">
+        <el-row :gutter="10">
+          <el-form
+              :model="form"
+              :rules="rules"
+              ref="form"
+              :label-width="tool.onlyZh('125px')"
+              label-position="right"
+              size="mini"
+          >
+            <el-col :span="24">
+              <el-form-item :label="$t('适用温度') + ':'" prop="temperature">
+                <el-input
+                    v-model="form.temperature"
+                    :placeholder="$t('请填写适用温度')"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('适用介质') + ':'" prop="medium">
+                <el-select
+                    v-model="form.medium"
+                    multiple
+                    :placeholder="$t('请选择适用介质')"
+                    style="width: 100%"
+                >
+                  <el-option
+                      v-for="item in mediumOption"
+                      :key="item.value"
+                      :label="$t(item.value)"
+                      :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button
+            size="small"
+            @click="onClose"
+            class="normal-btn-width inline-16"
+        >{{ $t("取消") }}</el-button
+        >
+        <el-button
+            size="small"
+            type="warning"
+            :loading="loading"
+            @click="onSave"
+            class="normal-btn-width"
+        >{{ $t("保存") }}</el-button
+        >
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "edit",
+  props:['data'],
+  data(){
+    return {
+      dialogFormVisible:false,
+      form:{
+        "itemid": '',
+        "temperature":"10℃-50℃",
+        "medium":[]
+      },
+      rules:{
+        temperature: [
+          {
+            required: true,
+            message: this.$t("请填写适用温度"),
+            trigger: "blur",
+          },
+        ],
+        medium: [
+          {
+            required: true,
+            message: this.$t("请选择适用介质"),
+            trigger: "blur",
+          },
+        ],
+      },
+      loading:false,
+      mediumOption:[]
+    }
+  },
+  methods:{
+    onClose(){
+      this.dialogFormVisible = false
+    },
+    onShow(){
+      this.dialogFormVisible = true
+      this.mediumList()
+      this.form.medium = this.data.medium?this.data.medium.split(','):[]
+      this.form.temperature = this.data.temperature
+    },
+    onSave(){
+      this.form.itemid = this.$route.query.id
+      this.$refs.form.validate(async(valid)=>{
+        if (!valid) return false
+        let newMedium = ''
+        this.form.medium.forEach((item,index)=>{
+          if (index == 0){
+            newMedium = item
+          }else {
+            newMedium = newMedium + ',' + item
+          }
+        })
+        this.form.medium = newMedium
+        this.loading = true
+        const res = await this.$api.requested({
+          id:2025101415125402,
+          content:this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.loading = false
+          this.dialogFormVisible = false
+          this.$emit('onSuccess')
+        })
+      })
+    },
+    async mediumList(){
+      const res = await this.$store.dispatch("optiontypeselect", "medium")
+      this.mediumOption = res.data
+
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 40 - 0
src/components/confirmBtn/index.vue

@@ -0,0 +1,40 @@
+<template>
+  <div>
+    <el-button type="primary" size="mini" @click="open">{{$t(btn_title)}}</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "index",
+  props:['btn_title','confirmButtonText','cancelButtonText','id','paramId','message'],
+  methods:{
+    open() {
+      this.$confirm(this.$t(this.message), this.$t('提示'), {
+        confirmButtonText: this.confirmButtonText?this.$t(this.confirmButtonText):this.$t('确定'),
+        cancelButtonText: this.cancelButtonText?cancelButtonText:this.$t('取消'),
+        type: 'warning'
+      }).then(async() => {
+        const res = await this.$api.requested({
+          "content": {
+            "itemid": this.id
+          },
+          "id": this.paramId,
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: this.$t('已取消')
+        });
+      });
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 214 - 0
src/components/import/importNoIcon.vue

@@ -0,0 +1,214 @@
+<template>
+  <div>
+    <!-- 按钮类型 -->
+    <el-button type="success" size="small" @click="onShow(0)" >{{$t(title)}}</el-button>
+    <el-dialog :title="$t('文件上传')" class="import-panel" :visible.sync="dialogUploadVisible" width="500px" append-to-body :close-on-click-modal="false" :show-close="false" @close="clearFiles">
+      <div slot="title"></div>
+      <div style="background:#f1f2f3" class="my-tabs" >
+        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+          <!-- <el-tab-pane :label="$t('导入经销商线索')" name="first"></el-tab-pane> -->
+          <el-tab-pane :label="$t(`导入`)" name="second"></el-tab-pane>
+        </el-tabs>
+      </div>
+      <div style="padding:20px">
+        <el-upload
+            style="width:100%"
+            ref="my-upload"
+            class="upload-demo normal-margin"
+            :accept="accept"
+            action="#"
+            :auto-upload="false"
+            :show-file-list="false"
+            :on-change="handleChange"
+            drag
+            multiple>
+          <i class="el-icon-upload"></i>
+          <div class="el-upload__text">{{$t('将文件拖到此处,或') + ' '}}<em>{{$t('点击上传')}}</em></div>
+        </el-upload>
+        <div class="progress_panel" v-for="file in filelist" :key="file.uid">
+          <img v-if="file.type === 'DOC' || file.type === 'DOCX'" width="30" src="@/assets/file_icons/word.png"
+               alt="">
+          <img v-else-if="file.type === 'PDF'" width="30" src="@/assets/file_icons/PDF.png" alt="">
+          <img v-else-if="file.type === 'MP4' || file.type === 'AVI'" width="30" src="@/assets/file_icons/video.png"
+               alt="">
+          <img v-else-if="file.type === 'XLS' || file.type === 'XLSX'" width="30" src="@/assets/file_icons/excel.png"
+               alt="">
+          <img v-else-if="file.type === 'PNG' || file.type === 'JPG'|| file.type === 'JPEG'" width="30"
+               src="@/assets/file_icons/image.png" alt="">
+          <img v-else-if="file.type === 'PPT' || file.type === 'PPTX'" width="30" src="@/assets/file_icons/PPT.png"
+               alt="">
+          <img v-else width="30" src="@/assets/file_icons/unknow.png" alt="">
+          <div>
+            <p v-if="file.progress === 100" style="float:right"><span style="color:#67C23A">●</span>{{$t('上传成功')}}</p>
+            <p>{{file.raw?file.raw.name:$t('暂无上传文件')}}</p>
+            <el-progress :percentage="file.progress" :show-text="false"></el-progress>
+          </div>
+        </div>
+        <slot name="errorFile"></slot>
+        <p class="tips">• + {{$t('为保证数据导入顺利,推荐您下载并使用' + ' ')}}<a :href="modelurl">《{{$t('Excel标准模板')}}》</a></p>
+        <p class="tips">• {{$t('文件中数据不能超过5000行')}}</p>
+        <a :href="errorUrl" class="tips" style="color:red" v-if="errorUrl">•{{$t(`下载错误数据`)}}</a>
+        <div class="dialog-footer">
+          <el-button size="small" @click="cancel" class="normal-btn-width">{{$t('取 消')}}</el-button>
+          <el-button size="small" type="warning" @click="dialogUploadVisible = false" class="normal-btn-width btn-warning">{{$t('确 定')}}</el-button>
+        </div>
+      </div>
+
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  /*
+   folderid:文件夹id; 必填
+   btntype:展示上传按钮的类型;
+   accept:限制上传文件类型;
+   bindData:附件上传成功后对应需要绑定的数据信息
+ */
+  name: "importFileNew",
+  props:['btntype','accept','bindData','errorUrl','title','paramID'],
+  data () {
+    return {
+      dialogUploadVisible: false,
+      params: {
+        "classname": "system.attachment.huawei.OBS",
+        "method": "getFileName",
+        "content": {
+          "filename": '',
+          "filetype": '',
+          "parentid": ""//归属文件夹ID
+        }
+      },
+      file: {},
+      filelist: [],
+      CampaignList:[],
+      activeName:'last',
+      modelurl:'',
+      campaignid:'',
+      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
+    }
+  },
+  mounted () {
+
+    // this.listData()
+  },
+  methods: {
+    onShow () {
+      this.dialogUploadVisible = true
+      this.getModelUrl()
+    },
+    cancel () {
+      this.dialogUploadVisible = false
+      this.campaignid = ''
+      this.$refs['my-upload'].clearFiles()
+      this.filelist = []
+    },
+    handleChange (file, filelist) {
+      this.filelist = filelist
+      var index = file.raw.name.lastIndexOf(".");
+      var ext = file.name.substr(index + 1);
+      this.params.content.filename = file.raw.name
+      this.params.content.filetype = ext
+      this.getUploadUrl(file, ext)
+    },
+    handleClick () {
+      this.getModelUrl()
+    },
+    // 获取导入模板
+    async getModelUrl () {
+      const res = await this.$api.requested({
+        "id":this.paramID,
+        "content": {
+        }
+      })
+      this.modelurl = res.data
+
+    },
+    // 获取华为云上传地址
+    async getUploadUrl (file, ext) {
+      this.params.content.parentid = this.folderid
+      const res = await this.$api.requested(this.params)
+      let url = res.data.uploadurl
+      let obsfilename = res.data.serialfilename
+
+      this.upoladFileToServer(url, file, ext, obsfilename)
+    },
+    // 上传到华为云
+    async upoladFileToServer (url, file, ext, obsfilename) {
+      let THIS = this
+      let config = {
+        headers: ext === 'pdf' ? { 'Content-Type': 'application/pdf' } : { 'Content-Type': 'application/octet-stream' },
+        onUploadProgress: function (progressEvent) {
+          let percent = progressEvent.loaded / progressEvent.total * 100
+          THIS.filelist.forEach(e => {
+            if (e.uid === file.uid) {
+              THIS.$set(e, 'type', ext.toUpperCase());
+              THIS.$set(e, 'progress', percent);
+            }
+          })
+        },
+      }
+      const res = await this.$upload.hw_upload(url, file.raw, config)
+      this.createFileRecord(obsfilename)
+    },
+
+    // 上传成功以后生成附件记录
+    async createFileRecord (obsfilename) {
+      let obj = {
+        "serialfilename": obsfilename
+      }
+      obj = Object.assign({},obj,this.bindData)
+      let param = {
+        "classname": "system.attachment.huawei.OBS",
+        "method": "uploadSuccess",
+        "content":obj
+      }
+
+      const res = await this.$api.requested(param)
+      this.$emit('onSuccess',res.data.attachmentids[0])
+    },
+
+    clearFiles () {
+      this.$refs['my-upload'].clearFiles()
+      this.filelist = []
+      this.dialogUploadVisible = false
+      this.$emit('clearUrl')
+    },
+  }
+}
+</script>
+<style>
+.import-panel .el-dialog__header,.import-panel .el-dialog__body{
+  padding: 0 !important;
+}
+.upload-demo > div {
+  width: 100% !important;
+}
+.upload-demo .el-upload-dragger {
+  width: 100% !important;
+}
+</style>
+<style scoped>
+.progress_panel {
+  display: flex;
+  align-items: center;
+  padding: 10px;
+  margin: 10px 0;
+  border-radius: 5px;
+  transition: linear 0.2s all;
+}
+.progress_panel:hover {
+  box-shadow: 0px 0px 5px #ccc;
+}
+.progress_panel > div {
+  flex: 1;
+  padding: 0 10px;
+}
+.progress_panel > div > p {
+  line-height: 30px;
+}
+.tips{
+  line-height: 30px;
+}
+</style>

+ 1 - 1
src/components/normal-basic-layout/reportCenter/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button :type="position == 'detail' ? 'primary' : 'text'" :size="size || 'mini'" @click="drawer=true"  class="inline-16">{{ btnName ? $t(btnName) : $t('导 出') }}</el-button>
+    <el-button :type="position == 'detail' ? 'primary' : 'text'" :size="size || 'mini'" @click="drawer=true"  >{{ btnName ? $t(btnName) : $t('导 出') }}</el-button>
     <el-drawer
     :visible.sync="drawer"
     :with-header="false"

+ 21 - 0
src/router/HDrpManagement.js

@@ -191,6 +191,27 @@ const HDrpManagement = [
         component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/ProductMag/detail/index')
       }
     ]
+  },{
+    path: '/productInspectionMag',
+    name: 'productInspectionMag',
+    meta: {
+      title: '产品检验管理',
+      ast_nav: true,
+      keeproute: true,
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/productInspectionMag/index'),
+    children: [
+      {
+        path: '/productInspectionMagDetail',
+        name: 'productInspectionMag',
+        meta: {
+          title: '商品管理详情',
+          ast_nav: true,
+          keeproute: true,
+        },
+        component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/productInspectionMag/detail/index')
+      }
+    ]
   }, {
     path: '/valveSelection',
     name: 'valveSelection',