Browse Source

汽保档案附件

caojunjie 1 year ago
parent
commit
f6cc85a2a5

+ 1 - 16
src/components/upload/index.vue

@@ -379,19 +379,6 @@ export default {
             width: 140,
             overHidden: true,
             cell: true,
-                // change:(res)=>{
-                //     let i = 0
-                //     for(let item of this.data) {
-                //         if(item.version === '0') {
-                //             if (i == 1) {
-                //                 this.$message.warning("主图不能重复选择");
-                //                 this.$set(this.data[res.index],'version','')
-                //                 return
-                //             }
-                //             i++
-                //         }
-                //     }
-                // }
           },
           {
             label: "备注",
@@ -573,14 +560,12 @@ export default {
     },
     //修改触发
     rowCell(row, index) {
-
       if (row.$cellEdit == true) {
         this.$set(row, "$cellEdit", false);
       } else {
         this.$set(row, "$cellEdit", true);
       }
-
-      this.$refs.crud.rowCell(row, index)
+      // this.$refs.crud.rowCell(row, index)
     },
     rowDel(row, index) {
       this.$confirm("确定将选择数据删除?", {

+ 22 - 5
src/views/EquipmentArchives/detailsPage.vue

@@ -93,9 +93,9 @@
         </avue-crud>
       </trade-card>
 
-      <containerTitle title="上传附件"></containerTitle>
+      <containerTitle title="上传附件  (图片文件像素推荐700X700,有且只允许有一张主图,其余均为副图)"></containerTitle>
       <c-upload v-loading="loadingBtn" typeUpload="SBDAFJ"
-                deleteUrl="/api/blade-client/corpequipmentarchivesfiles/remove" :data="maintenanceFiles" display
+                deleteUrl="/blade-client/corpequipmentarchivesfiles/remove" :data="maintenanceFiles" display
                 :enumerationValue="35.1"></c-upload>
       <!--<containerTitle title="上传附件"></containerTitle>-->
       <!--<c-upload v-loading="loadingBtn" typeUpload="CD"-->
@@ -171,7 +171,7 @@
 
 
     <el-dialog
-      title="附件"
+      title="附件  (图片文件像素推荐700X750,有且只允许有一张主图,其余均为副图)"
       :visible.sync="enclosure"
       append-to-body
       width="70%">
@@ -197,6 +197,12 @@
       <el-table :data="maintenanceData" style="width: 100%">
         <el-table-column prop="repairReportDate" label="报修日期"></el-table-column>
         <el-table-column prop="completeDate" label="完成日期"> </el-table-column>
+          <el-table-column prop="sysNo" label="单号">
+              <template slot-scope="{ row }">
+                  <!--<span style="">{{row.sysNo}}</span>-->
+                  <el-link type="primary" @click="maintenanceWorkerNameClick(row.id)">{{ row.sysNo }}123</el-link>
+              </template>
+          </el-table-column>
         <el-table-column prop="maintenanceWorkerName" label="维修工">
           <template v-slot:default="scope">
             <el-link type="primary" @click="maintenanceWorkerNameClick(scope.row.id)">{{scope.row.maintenanceWorkerName}}</el-link>
@@ -579,7 +585,8 @@ export default {
 
       var params = {
         archivesId: this.form.id,
-        deviceId: row.srcId
+        deviceId: row.srcId,
+        status:4
       }
 
       maintenanceList(this.mPcurrent, this.mPageSize, params).then(res => {
@@ -642,10 +649,20 @@ export default {
     },
     //保存
     saveAnnex() {
-
+        let i = 0
       for (const key in this.orderList) {
         this.orderList[key].sort = Number(key) + 1
         this.orderList[key].typeFiles = this.orderList[key].paymentType
+          if (this.orderList[key].typeFiles == '主图') {
+              i++
+          }
+          if (i == 2) {
+              this.$message({
+                  type: "warning",
+                  message: "只允许有一张主图,其余均为副图!"
+              });
+              return
+          }
       }
 
       this.data[this.dataId].filesList = this.orderList;

+ 0 - 1
src/views/EquipmentArchives/index.vue

@@ -105,7 +105,6 @@ export default {
       async expandChange(row, expendList){
           row.loading = true
           // this.dataList[row.$index].loading = true
-          console.log(row,107)
           const {data} = await corpequipmentarchivesitemList({
               current: 1,
               size: 20,

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

@@ -99,7 +99,7 @@
         </avue-crud>
       </trade-card>
 
-      <containerTitle title="上传附件"></containerTitle>
+      <containerTitle title="上传附件  (图片文件像素推荐700X700)"></containerTitle>
       <c-upload v-loading="loadingBtn" typeUpload="CD"
         deleteUrl="/api/blade-sales-part/maintenanceFiles/remove" :data="maintenanceFiles" display
         :enumerationValue="35.1"></c-upload>

+ 6 - 16
src/views/product/detailsPage.vue

@@ -386,12 +386,12 @@ export default {
                 dicUrl: "/api/blade-sales-part/brandDesc/listAll?type=PP",
                 span: 6,
                 change:(val)=>{
-                    for(let item of val.column.dicData) {
-                        if (val.value == item.id) {
-                            this.form.brand = item.cname
-                            break;
-                        }
-                    }
+                    // for(let item of val.column.dicData) {
+                    //     if (val.value == item.id) {
+                    //         this.form.brand = item.cname
+                    //         break;
+                    //     }
+                    // }
                 }
             },
             {
@@ -535,7 +535,6 @@ export default {
 
     // 获取供应商数据
       this.getListfun()
-      // this.getListppfun()
 
     this.getAllWorkDicts()
   },
@@ -547,15 +546,6 @@ export default {
               this.findObject(this.option.column, "corpId").dicData = res.data.data.records
           })
       },
-      // 获取品牌数据
-      getListppfun(){
-          getListpp({
-              current: 1,
-              size: 20,
-          }).then(res=>{
-              this.findObject(this.option.column, "brandId").dicData = res.data.data.records
-          })
-      },
 
     getAllWorkDicts() {
       getGoodstype().then(res => {