瀏覽代碼

8.23bug修改

caojunjie 1 年之前
父節點
當前提交
93675e805a

+ 10 - 3
src/views/EquipmentArchives/detailsPage.vue

@@ -104,7 +104,8 @@
       <dictbiz-dialog ref="dictbiz" title="添加单位" code="unit" parentId="1585962784498225154" @closed="getAllWorkDicts">
       </dictbiz-dialog>
 
-      <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="配件系统-采购单" @onClose="onClose()">
+        <!--打印组件-->
+      <report-dialog :switchDialog="switchDialog" :reportId="archivesId" reportName="汽保--信息码" @onClose="onClose()">
       </report-dialog>
 
         <!--图片查看-->
@@ -115,6 +116,10 @@
             append-to-body
             :before-close="imgfalseClose">
             <div>
+                <div>
+                    <el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">打印
+                    </el-button>
+                </div>
                 <img :src="imgtext" alt="">
             </div>
         </el-dialog>
@@ -531,7 +536,8 @@ export default {
 
         dataId: '',
       // 设备id
-      archivesId: ''
+      archivesId: '',
+
     };
   },
   props: {
@@ -861,7 +867,8 @@ export default {
       // 查看图片
       imgurlfun(row){
         this.imgfalse = true
-          this.imgtext = row.url
+          this.archivesId = row.id
+        this.imgtext = row.url
       },
       imgfalseClose(){
         this.imgtext = ''

+ 27 - 2
src/views/EquipmentArchives/index.vue

@@ -4,13 +4,23 @@
       <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
         @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
         @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
-        @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
+        @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch"
+                 @expand-change="expandChange">
         <template slot="menuLeft">
           <el-button type="primary" size="mini" @click.stop="newAdd()">新建档案
           </el-button>
             <el-button type="primary" size="mini" @click.stop="openExport()">导出
             </el-button>
         </template>
+
+          <template slot="expand" slot-scope="{row}">
+              <avue-crud
+                  ref="expandCrud"
+                  :option="optionXiala"
+                  :table-loading="row.loading"
+                  :data="row.orderItemsList"></avue-crud>
+          </template>
+
         <template slot="corpIdSearch">
           <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
@@ -38,8 +48,9 @@
 
 <script>
 import detailsPage from "./detailsPage";
-import { option } from "./js/optionList";
+import { option, optionXiala } from "./js/optionList";
 import {
+    corpequipmentarchivesitemList,
     corpequipmentarchivesList, corpequipmentarchivesRemove
 } from "@/api/basicData/EquipmentArchives";
 import {
@@ -65,6 +76,7 @@ export default {
         pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
       },
       option: {},
+        optionXiala:{},
     };
   },
   components: {
@@ -72,6 +84,7 @@ export default {
   },
   async created() {
     this.option = option
+      this.optionXiala = optionXiala
     this.option.height = window.innerHeight - 210;
   },
   activated() {
@@ -86,6 +99,18 @@ export default {
     }
   },
   methods: {
+      // 表格的下拉
+      expandChange(row, expendList){
+          row.loading = true
+          corpequipmentarchivesitemList({
+              current: 1,
+              size: 20,
+              pid:row.id
+          }).then(res=>{
+              row.orderItemsList = res.data.data.records
+              row.loading = false
+          })
+      },
       // 导出设备
       openExport() {
           let params = JSON.parse(JSON.stringify(this.search))

+ 68 - 0
src/views/EquipmentArchives/js/optionList.js

@@ -18,6 +18,7 @@ export const option = {
   searchIndex: 2,
   showSummary: true,
   summaryText: "合计",
+  expand: true, //是否有展开表格
   sumColumnList: [
     {
       name: "debitAmount",
@@ -137,6 +138,73 @@ export const option = {
     }
   ]
 }
+export const optionXiala = {
+  align: "center",
+  addBtn: false,
+  refreshBtn: false,
+  editBtn: false,
+  delBtn: false,
+  border: true,
+  menuWidth: 120,
+  stripe: true,
+  index: true,
+  header:false,
+  indexSlot: true,
+  showSummary: false,
+  columnBtn:false,
+  column: [
+    {
+      label: "设备名称",
+      prop: "cname",
+      width:'250px',
+      overHidden: true
+    },
+    {
+      label: "设备编号",
+      prop: "code",
+      overHidden: true
+    },
+    {
+      label: "设备描述",
+      prop: "equipmentDescribe",
+      cell: true,
+      overHidden: true
+    },
+    {
+      label: "出厂日期",
+      prop: "exitDate",
+      overHidden: true
+    },
+    {
+      label: "保养日期",
+      prop: "maintenanceDate",
+      overHidden: true
+    },
+    {
+      label: "维修次数",
+      prop: "maintenanceSecond",
+      overHidden: true
+    },
+    {
+      label: "工厂",
+      prop: "factoryName",
+      overHidden: true
+    },
+    {
+      label: "规格",
+      prop: "specs",
+    },
+    {
+      label: "备注",
+      prop: "remarks",
+      cell: true,
+      overHidden: true
+    },
+  ]
+}
+
+
+
 export const optionList = {
   align: "center",
   addBtn: false,

+ 8 - 8
src/views/maintenanceQ/detailsPage.vue

@@ -10,10 +10,10 @@
         <div class="add-customer-btn">
           <!--<el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印-->
           <!--</el-button>-->
-            <el-button v-if="form.dispatchingWorkers == 2" type="warning" size="small" :disabled="option.dispatchWorkers" @click="editCustomer(2)">
+            <el-button v-if="form.dispatchingWorkers == 2" type="warning" size="small" :disabled="option.dispatchWorkers == 2" @click="editCustomer(2)">
                 撤销派工
             </el-button>
-            <el-button v-else type="warning" size="small" :disabled="option.disabled && (form.dispatchingWorkers == 0 || form.dispatchingWorkers == 1)" @click="editCustomer(1)">
+            <el-button v-if="form.dispatchingWorkers == 1" type="warning" size="small" :disabled="option.disabled" @click="editCustomer(1)">
                 派工
             </el-button>
 
@@ -530,12 +530,12 @@ export default {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
-          if (!this.form.corpName) {
-              return this.$message.error('请维护客户描述');
-          }
-            if (!this.form.deviceDescribe) {
-                return this.$message.error('请维护设备描述');
-            }
+          // if (!this.form.corpName) {
+          //     return this.$message.error('请维护客户描述');
+          // }
+          //   if (!this.form.deviceDescribe) {
+          //       return this.$message.error('请维护设备描述');
+          //   }
 
             if(index == 1) {
                 if (!this.form.maintenanceWorkerId) {

+ 2 - 2
src/views/product/detailsPage.vue

@@ -383,7 +383,7 @@ export default {
                     label: "cname",
                     value: "id"
                 },
-                dicData: [],
+                dicUrl: "/api/blade-sales-part/brandDesc/listAll?type=PP",
                 span: 6,
                 change:(val)=>{
                     for(let item of val.column.dicData) {
@@ -535,7 +535,7 @@ export default {
 
     // 获取供应商数据
       this.getListfun()
-      this.getListppfun()
+      // this.getListppfun()
 
     this.getAllWorkDicts()
   },