Kaynağa Gözat

1.停复役功能修改

javababay 2 yıl önce
ebeveyn
işleme
05ac1f5b73

+ 76 - 64
src/views/energyOperationSupport/components/MaintenanceStopService/MaintenanceApplication.vue

@@ -10,7 +10,7 @@
           label-width="100px"
         >
           <el-row>
-            <el-col :span="6">
+            <el-col :span="7">
               <el-form-item label="申报日期">
                 <el-date-picker
                   v-model="filterForm.data.declaretime"
@@ -22,6 +22,8 @@
                   start-placeholder="开始日期"
                   end-placeholder="结束日期"
                   size="mini"
+                  unlink-panels
+                  :picker-options="pickerOptions"
                 >
                 </el-date-picker>
               </el-form-item>
@@ -29,8 +31,9 @@
             <el-col :span="4">
               <el-form-item label="申请单位">
                 <el-input
+                  disabled
                   clearable
-                  v-model="filterForm.data.applyer"
+                  v-model="filterForm.data.applayer"
                   placeholder=""
                   style="width: 100%"
                 ></el-input>
@@ -301,6 +304,14 @@
             :show-overflow-tooltip="true"
           >
           </el-table-column>
+          <el-table-column
+            sortable
+            prop="filename"
+            label="附件"
+            width="240px"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
           <el-table-column
             class-name="gn-TableDownloadExcel-none"
             label="操作"
@@ -544,11 +555,7 @@
       :show-close="!loading"
     >
       <div>
-        <el-form
-          size="mini"
-          ref="dialog_form_arr"
-          label-width="0px"
-        >
+        <el-form size="mini" ref="dialog_form_arr" label-width="0px">
           <el-table
             stripe
             id="singleTable"
@@ -593,6 +600,7 @@
                   type="primary"
                   @click="delFilevalue(scope.row)"
                   :loading="loading"
+                  :disabled="buttondispaly"
                   >点击删除
                 </el-button>
               </template>
@@ -665,7 +673,7 @@ export default {
           billstatus: "", //审核状态
           equipmentname: "", //检修类型
           chargeman: "", //申请人
-          applayer: "一烧结", //申请单位
+          applayer: "", //申请单位
           reasoncontent: "", //申请内容
           bz: "", //备注
           signtime: "", //审批时间
@@ -788,9 +796,6 @@ export default {
               declaretime: [
                 { required: true, message: "该项不能为空", trigger: "change" },
               ],
-              applyer: [
-                { required: true, message: "该项不能为空", trigger: "change" },
-              ],
               equipmentname: [
                 { required: true, message: "该项不能为空", trigger: "change" },
               ],
@@ -809,7 +814,6 @@ export default {
   },
   created() {
     this.activeMenu = window.localStorage.getItem("activeMenu");
-    this.getselect();
   },
   mounted() {
     let that = this;
@@ -834,9 +838,14 @@ export default {
     that.store.dispatch("getUserInfo").then((res) => {
       that.userInfo.data = res.data;
     });
+        // 接收路由参数
+    if (that.$route.query.applayer) {
+      that.filterForm.data.applayer = that.$route.query.applayer;
+    }
     that.getselect();
     that.getNodeData();
     that.getNodeDataa();
+
   },
   methods: {
     // 附件删除
@@ -952,6 +961,11 @@ export default {
             });
           }
           that.tableDatavalue = arr;
+          let filenames = "";
+          for (let itema of arr) {
+            filenames += itema.fileName + ";";
+          }
+          console.log("sdasdaa");
           that.dialog.editorBox.showtype = true;
           that.tableLoading = false;
         } else {
@@ -971,53 +985,59 @@ export default {
     getNodeDataa() {
       let that = this;
       let node = "4";
+      let name = that.filterForm.data.applayer;
       let url = "pass/ems/v1/tprocessinfors/getmeuns/";
-      that.axios.get(url + "?" + "node=" + node).then(function (res) {
-        if (res.code === "0") {
-          let arr = [];
-          let obj = {};
-          for (let item of res.data) {
-            arr.push({
-              id: item.id,
-              name: item.name,
-            });
-            obj[item.id] = {
-              name: item.name,
-              node: item.node,
-            };
+      that.axios
+        .get(url + "?" + "node=" + node + "&" + "name=" + name)
+        .then(function (res) {
+          if (res.code === "0") {
+            let arr = [];
+            let obj = {};
+            for (let item of res.data) {
+              arr.push({
+                id: item.id,
+                name: item.name,
+              });
+              obj[item.id] = {
+                name: item.name,
+                node: item.node,
+              };
+            }
+            that.nameObj.equipment.arr = arr;
+            that.nameObj.equipment.obj = obj;
+          } else {
+            that.$message.error(res.message);
           }
-          that.nameObj.equipment.arr = arr;
-          that.nameObj.equipment.obj = obj;
-        } else {
-          that.$message.error(res.message);
-        }
-      });
+        });
     },
     // 获取工序列表
     getNodeData() {
       let that = this;
       let node = "3";
+      let name = that.filterForm.data.applayer;
       let url = "pass/ems/v1/tprocessinfors/getmeuns/";
-      that.axios.get(url + "?" + "node=" + node).then(function (res) {
-        if (res.code === "0") {
-          let arr = [];
-          let obj = {};
-          for (let item of res.data) {
-            arr.push({
-              id: item.id,
-              name: item.name,
-            });
-            obj[item.id] = {
-              name: item.name,
-              node: item.node,
-            };
+      that.axios
+        .get(url + "?" + "node=" + node + "&" + "name=" + name)
+        .then(function (res) {
+          if (res.code === "0") {
+            let arr = [];
+            let obj = {};
+            for (let item of res.data) {
+              arr.push({
+                id: item.id,
+                name: item.name,
+              });
+              obj[item.id] = {
+                name: item.name,
+                node: item.node,
+              };
+            }
+            that.nameObj.devicename.arr = arr;
+            that.nameObj.devicename.obj = obj;
+          } else {
+            that.$message.error(res.message);
           }
-          that.nameObj.devicename.arr = arr;
-          that.nameObj.devicename.obj = obj;
-        } else {
-          that.$message.error(res.message);
-        }
-      });
+        });
     },
     //  计算树区域高度
     getRoleHeight(dom) {
@@ -1096,7 +1116,7 @@ export default {
     },
     but_add() {
       let that = this;
-      that.dialog.editorBox.files = [];
+      that.fileList = [];
       for (let key in that.dialog.editorBox.form.data) {
         that.dialog.editorBox.form.data[key] = "";
       }
@@ -1266,7 +1286,7 @@ export default {
           this.buttondispalya = true;
         }
       }
-      console.log("val" + val);
+      console.log("1111val" + val);
       this.multipleSelection = val;
     },
     //点击行触发,选中或不选中复选框
@@ -1320,7 +1340,7 @@ export default {
         billstatus: "编辑中",
         declareid: that.dialog.editorBox.form.data.declareid,
         chargetime: that.dialog.editorBox.form.data.chargetime,
-        applayer: "一烧结",
+        applayer: that.filterForm.data.applayer,
         equipmentname: that.dialog.editorBox.form.data.equipmentname,
         chargeman: that.dialog.editorBox.form.data.chargeman,
         reasoncontent: that.dialog.editorBox.form.data.reasoncontent,
@@ -1349,12 +1369,7 @@ export default {
           let filename = "";
           for (let item of that.fileList) {
             fileData.append("file", item.raw);
-            if (item.operation !== "del" && item.name) {
-              filename += item.name + ";";
-            }
           }
-          fileData.set("filename", filename);
-          fileData.set("del", del);
           that.axios
             .put(url, fileData, {
               headers: { "Content-Type": "multipart/form-data" },
@@ -1382,9 +1397,9 @@ export default {
       let that = this;
       let SubmitData = {
         billstatus: "编辑中",
-        declareid: "SJ_" + that.dialog.editorBox.form.data.declareid,
+        declareid: that.dialog.editorBox.form.data.declareid,
         chargetime: that.dialog.editorBox.form.data.chargetime,
-        applayer: "一烧结",
+        applayer: that.filterForm.data.applayer,
         equipmentname: that.dialog.editorBox.form.data.equipmentname,
         chargeman: that.dialog.editorBox.form.data.chargeman,
         reasoncontent: that.dialog.editorBox.form.data.reasoncontent,
@@ -1417,9 +1432,6 @@ export default {
             if (item.operation === "del" && item.name) {
               del += item.name + ";";
             }
-            if (item.operation !== "del" && item.name) {
-              filename += item.name + ";";
-            }
           }
           fileData.set("filename", filename);
           fileData.set("del", del);
@@ -1449,7 +1461,7 @@ export default {
     but_edita(row) {
       let that = this;
       that.dialog.editorBox.type = "PUT";
-      that.dialog.editorBox.files = [];
+      that.fileList = [];
       for (let key in that.dialog.editorBox.form.data) {
         if (typeof row[key] !== "undefined") {
           that.dialog.editorBox.form.data[key] = row[key];

+ 11 - 2
src/views/energyOperationSupport/components/MaintenanceStopService/approval.vue

@@ -21,6 +21,8 @@
                   range-separator="至"
                   start-placeholder="开始日期"
                   end-placeholder="结束日期"
+                  unlink-panels
+                  :picker-options="pickerOptions"
                 >
                 </el-date-picker>
               </el-form-item>
@@ -29,7 +31,7 @@
               <el-form-item label="申请单位">
                 <el-input
                   clearable
-                  v-model="filterForm.data.applyer"
+                  v-model="filterForm.data.applayer"
                   placeholder=""
                   style="width: 100%"
                 ></el-input>
@@ -239,6 +241,13 @@
             min-width="100px"
             :show-overflow-tooltip="true"
           ></el-table-column>
+          <el-table-column
+            sortable
+            prop="filename"
+            label="附件"
+            min-width="100px"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
           <el-table-column
             sortable
             prop="bz"
@@ -594,7 +603,7 @@ export default {
           billstatus: "", //审核状态
           equipmentname: "", //检修类型
           chargeman: "", //申请人
-          applayer: "一烧结", //申请单位
+          applayer: "", //申请单位
           reasoncontent: "", //申请内容
           bz: "", //备注
           signtime: "", //审批时间

+ 39 - 8
src/views/energyOperationSupport/components/MaintenanceStopService/submitted.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 检修停复役检修审批 -->
+  <!-- 检修停复役检修报工烧结 -->
   <div class="submitted">
     <div class="box">
       <div class="box-top">
@@ -22,6 +22,8 @@
                   start-placeholder="开始日期"
                   end-placeholder="结束日期"
                   size="mini"
+                  unlink-panels
+                  :picker-options="pickerOptions"
                 >
                 </el-date-picker>
               </el-form-item>
@@ -29,8 +31,9 @@
             <el-col :span="4">
               <el-form-item label="申请单位">
                 <el-input
+                  disabled
                   clearable
-                  v-model="filterForm.data.applyer"
+                  v-model="filterForm.data.applayer"
                   placeholder=""
                   style="width: 100%"
                 ></el-input>
@@ -220,6 +223,13 @@
             label="审批时间"
             min-width="100px"
             :show-overflow-tooltip="true"
+          ></el-table-column>
+             <el-table-column
+            sortable
+            prop="filename"
+            label="附件"
+            min-width="100px"
+            :show-overflow-tooltip="true"
           ></el-table-column>
           <el-table-column
             sortable
@@ -358,6 +368,13 @@
             label="审批时间"
             min-width="100px"
             :show-overflow-tooltip="true"
+          ></el-table-column>
+             <el-table-column
+            sortable
+            prop="filename"
+            label="附件"
+            min-width="100px"
+            :show-overflow-tooltip="true"
           ></el-table-column>
           <el-table-column
             class-name="gn-TableDownloadExcel-none"
@@ -459,6 +476,14 @@
             min-width="100px"
             :show-overflow-tooltip="true"
           ></el-table-column>
+           <el-table-column
+            sortable
+            prop="construfile"
+            label="报工附件"
+            min-width="100px"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          
           <el-table-column
             class-name="gn-TableDownloadExcel-none"
             label="操作"
@@ -612,7 +637,7 @@
                   action=""
                   :on-change="fileRemoveHandle4"
                   multiple
-                  :limit="5"
+                  :limit="10"
                   :file-list="fileList"
                   :auto-upload="false"
                 >
@@ -1138,7 +1163,7 @@ export default {
           billstatus: "", //审核状态
           equipmentname: "", //检修类型
           chargeman: "", //申请人
-          applayer: "一烧结", //申请单位
+          applayer: "" ,//申请单位
           reasoncontent: "", //申请内容
           bz: "", //备注
           signtime: "", //审批时间
@@ -1306,7 +1331,6 @@ export default {
   },
   created() {
     this.activeMenu = window.localStorage.getItem("activeMenu");
-    this.getselect();
   },
   mounted() {
     let that = this;
@@ -1331,7 +1355,12 @@ export default {
     that.store.dispatch("getUserInfo").then((res) => {
       that.userInfo.data = res.data;
     });
+    // 接收路由参数
+    if (that.$route.query.applayer) {
+      that.filterForm.data.applayer = that.$route.query.applayer;
+    }
     that.getselect();
+
   },
   methods: {
     reject() {
@@ -1844,6 +1873,7 @@ export default {
                 that.$message.error(res.message);
               }
               that.getselect1();
+              that.fileList = [];
               that.loading = false;
             })
             .then(() => {
@@ -1852,7 +1882,7 @@ export default {
                 .then(function (res) {
                   if (res.code === "0") {
                     that.$message({
-                      message: "",
+                      message: "提报成功",
                       type: "success",
                     });
                     that.getselect();
@@ -1877,7 +1907,7 @@ export default {
         billstatus: "编辑中",
         declareid: that.dialog.editorBox.form.data.declareid,
         chargetime: that.dialog.editorBox.form.data.chargetime,
-        applayer: "一烧结",
+        applayer: that.filterForm.data.applayer,
         equipmentname: that.dialog.editorBox.form.data.equipmentname,
         chargeman: that.dialog.editorBox.form.data.chargeman,
         reasoncontent: that.dialog.editorBox.form.data.reasoncontent,
@@ -1940,7 +1970,8 @@ export default {
     but_edita(row) {
       let that = this;
       that.dialog.editorBox.show = true;
-      that.dialog.editorBox.form.dataa.bz = that.userInfo.data.userName;
+      (that.fileList = []),
+        (that.dialog.editorBox.form.dataa.bz = that.userInfo.data.userName);
       for (let key in that.dialog.editorBox.form.data) {
         if (typeof row[key] !== "undefined") {
           that.dialog.editorBox.form.data[key] = row[key];