qukaidi 3 年 前
コミット
d1b7eca3b0

+ 21 - 19
src/views/workManagement/handoverSheet/detail.vue

@@ -9,8 +9,7 @@
         <el-button type="primary" size="small" class="el-button--small-yh" @click.stop="openEdit" v-if="disabled">编 辑
         </el-button>
         <el-button v-if="
-          form.id &&
-          loginUser === form.handingUser &&
+          form.id  &&
           form.confirmStatus !== 1
         " type="primary" size="small" class="el-button--small-yh" :loading="btnLoading" @click="submitConfirm"
           :disabled="!form.id || disabled">提交确认</el-button>
@@ -362,8 +361,8 @@ export default {
           this.form = res.data.data;
           this.dataList = this.form.itemList ? this.form.itemList : [];
           delete this.form.itemList;
-          this.oldForm = { ...this.form };
-          this.oldDataList = [...this.dataList];
+          this.oldForm = this.deepClone({ ...this.form });
+          this.oldDataList = this.deepClone([...this.dataList]);
           this.checkDisabled = this.form.status > 0 ? true : false;
           this.confirmDisabled = this.form.confirmStatus === 1 ? true : false;
           if (this.form.status > 0 || this.form.confirmStatus === 1) {
@@ -620,21 +619,24 @@ export default {
     },
     // 提交确认
     submitConfirm() {
-      this.$confirm("提交确认?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        this.btnLoading = true;
-        submitConfirm({ id: this.form.id })
-          .then(res => {
-            this.$message.success("提交成功");
-            this.queryData(this.form.id);
-          })
-          .finally(() => {
-            this.btnLoading = false;
-          });
-      });
+      if (this.verification()) {
+        this.$confirm("提交确认?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.btnLoading = true;
+          submitConfirm({ id: this.form.id })
+            .then(res => {
+              this.$message.success("提交成功");
+              this.queryData(this.form.id);
+            })
+            .finally(() => {
+              this.btnLoading = false;
+            });
+        });
+      }
+
     },
     externalChange(row) {
       // if (row == 1) {

+ 1 - 1
src/views/workManagement/main-items/detailsPage.vue

@@ -1034,7 +1034,7 @@ export default {
       const params = {
         ...this.form,
         ...this.formTwo,
-        itemList: this.data,
+        itemList: this.data.filter((e,index)=>index==this.pgIndex),
         filesList: this.upLoadData
       }
       dispatch(params).then(res => {