Browse Source

Merge remote-tracking branch 'origin/dev' into dev

lichao 3 years ago
parent
commit
7af6b4f0ca

+ 124 - 0
public/util/commodity.json

@@ -0,0 +1,124 @@
+
+{
+  "calcHeight": 80,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": false,
+  "searchShowBtn": false,
+  "menu": false,
+  "searchMenuSpan": 6,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "viewBtn": true,
+  "dialogClickModal": false,
+  "column": [
+    {
+      "label": "商品编码",
+      "prop": "code",
+      "search": true,
+      "minWidth": 100,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "商品名称",
+      "prop": "cname",
+      "slot": true,
+      "minWidth": 100,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "商品类别",
+      "prop": "goodsTypeId",
+      "dicData": [],
+      "type": "tree",
+      "hide": true,
+      "addDisabled": false,
+      "multiple": true,
+      "props": {
+        "label": "title"
+      },
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "click"
+      }]
+    },
+    {
+      "label": "规格编码",
+      "prop": "typeno",
+      "search": true
+    },
+    {
+      "label": "品牌",
+      "prop": "brand",
+      "slot": true
+    },
+    {
+      "label": "花纹",
+      "prop": "brandItem",
+      "slot": true
+    },
+    {
+      "label": "规格尺寸",
+      "prop": "specs",
+      "slot": true
+    },
+    {
+      "label": "产品类别",
+      "prop": "category",
+      "slot": true
+    },
+    {
+      "label": "产品分类",
+      "prop": "categoryitem",
+      "slot": true
+    },
+    {
+      "label": "供应商",
+      "prop": "providers",
+      "slot": true
+    },
+    {
+      "label": "计量单位",
+      "prop": "unit",
+      "slot": true
+    },
+    {
+      "label": "包装单位",
+      "prop": "packgeunit",
+      "slot": true
+    },
+    {
+      "label": "商品图片",
+      "prop": "url",
+      "type": "upload",
+      "listType": "picture-img",
+      "dataType": "string",
+      "action": "/api/blade-resource/oss/endpoint/put-file",
+      "propsHttp": {
+        "res": "data",
+        "url": "link"
+      },
+      "hide": true,
+      "span": 24
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "slot": true
+    }
+  ]
+}

+ 23 - 0
src/api/saveColumn.js

@@ -0,0 +1,23 @@
+import request from '@/router/axios';
+
+export const saveColumn = (data) => {
+  return request({
+    url: '/api/blade-client/tablemessage/save',
+    method: 'post',
+    data: data
+  })
+}
+export const getColumn = (query) => {
+  return request({
+    url: '/api/blade-client/tablemessage/detail',
+    method: 'get',
+    params: query
+  })
+}
+
+export const getJson = (url) => {
+  return request({
+    url: url,
+    method: 'get',
+  })
+}

+ 15 - 20
src/components/examineApprove/config/startDialog.json

@@ -7,22 +7,17 @@
   "tip": false,
   "searchShow": true,
   "searchMenuPosition": "right",
-  "searchMenuSpan": 6,
+  "searchMenuSpan": 12,
+  "searchLabelWidth": 120,
   "tree": true,
-  "selection": true,
+  "selection": false,
   "addBtn": false,
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menuWidth": 150,
+  "menuWidth": 220,
   "column":[
-    {
-      "label": "租户编号",
-      "prop": "tenantId",
-      "search": true,
-      "index": 1,
-      "width":150
-    },{
+   {
       "label": "流程分类",
       "prop": "category",
       "search": true,
@@ -34,29 +29,29 @@
       },
       "dataType":"number",
       "slot": true,
-      "index": 2,
-      "width":120
+      "index": 1,
+      "width":180
     },{
       "label": "流程标识",
       "prop": "key",
-      "index": 4,
-      "width":120
+      "index": 2,
+      "width":150
     },{
       "label": "流程名称",
       "prop": "name",
       "search": true,
-      "index": 5,
-      "width":140
+      "index": 3,
+      "width":150
     },{
       "label": "状态",
       "prop": "suspensionState",
-      "index": 6,
-      "width":120
+      "index": 4,
+      "width":150
     },{
       "label": "部署时间",
       "prop": "deploymentTime",
-      "index": 7,
-      "width":150
+      "index": 5,
+      "width":200
     }
   ]
 }

+ 41 - 14
src/components/examineApprove/index.vue

@@ -22,23 +22,46 @@
         </el-button>
       </template>
     </avue-crud>
-    <span slot="footer" class="dialog-footer">
-          <el-button @click="closeFun()">关 闭</el-button>
+    <div style="margin-left: 90%">
+       <span slot="footer" class="dialog-footer" >
+          <el-button type="primary"  @click="closeFun()">关 闭</el-button>
   </span>
+    </div>
     <el-dialog
-      title="配置"
-      :visible.sync="dialogConfiguration"
+      title="请核"
+      :visible.sync="dialogPleaseCheck"
       width="600px"
-      :modal-append-to-body="false"
+      append-to-body
       :close-on-click-modal="false"
       destroy-on-close
     >
       <examine-start
         :processDefinitionId="processDefinitionId"
         :itemId = "itemId"
-        @dialogClose="dialogConfigurationClose"
+        @dialogClose="dialogPleaseCheckClose"
       ></examine-start>
     </el-dialog>
+    <el-dialog title="流程图"
+               append-to-body
+               :visible.sync="flowBox"
+               :fullscreen="true">
+      <iframe
+        :src=flowUrl
+        width="80%"
+        height="700"
+        title="流程图"
+        frameBorder="no"
+        border="0"
+        marginWidth="0"
+        marginHeight="0"
+        scrolling="no"
+        allowTransparency="yes">
+      </iframe>
+      <span slot="footer"
+            class="dialog-footer">
+        <el-button @click="flowBox = false">关 闭</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -69,8 +92,12 @@
           pagerCount: 5,
           total: 0,
         },
-        dialogConfiguration:false,
+        dialogPleaseCheck:false,
         processDefinitionId:'',
+        //流程图
+        flowBox: false,
+        flowUrl: '',
+        itemId:'',
       }
     },
     created() {
@@ -93,16 +120,16 @@
         })
       },
       handleStart(row){
-        this.dialogConfiguration = true;
+        this.dialogPleaseCheck = true;
         this.processDefinitionId = row.id
       },
-      handleImage(){
-
+      handleImage(row) {
+        this.flowUrl = `/api/blade-flow/process/resource-view?processDefinitionId=${row.id}`;
+        this.flowBox = true;
       },
-      dialogConfigurationClose() {
-        this.dialogConfiguration = false;
-        this.onLoad(this.page); //关闭刷新
-        this.$refs.crud.toggleSelection();
+      dialogPleaseCheckClose() {
+        this.dialogPleaseCheck = false;
+        this.closeFun()
       }
     }
   }

+ 2 - 1
src/components/examineApprove/start.vue

@@ -90,7 +90,8 @@
               this.form.itemId = this.itemId
               examineApproveSubmit(this.form).then(res =>{
                 if(res.data.success){
-                  this.$message.success("操作成功!")
+                  this.$message.success("请核成功!")
+                  this.$emit('dialogClose');
                 }
               })
             }

+ 7 - 0
src/enums/column-name.js

@@ -0,0 +1,7 @@
+export const columnName = [{
+  code: 0,
+  name: '出口报价单'
+}, {
+  code: 1,
+  name: '出口采购订单'
+}]

+ 0 - 2
src/main.js

@@ -55,7 +55,6 @@ Vue.use(avueUeditor);
 //自定义标题
 import containerTitle from './components/titleComponent/main.vue';
 Vue.component('containerTitle', containerTitle);
-
 // 加载相关url地址
 Object.keys(urls).forEach(key => {
   Vue.prototype[key] = urls[key];
@@ -70,7 +69,6 @@ iconfontVersion.forEach(ele => {
 });
 
 Vue.config.productionTip = false;
-
 new Vue({
   router,
   store,

+ 43 - 0
src/views/basicData/commodityType/configuration/specification.json

@@ -0,0 +1,43 @@
+
+{
+  "border": true,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "align": "center",
+  "menuWidth": 130,
+  "column": [
+    {
+      "label": "规格名称",
+      "prop": "cname",
+      "minWidth": 100,
+      "cell": true
+    },
+    {
+      "label": "材质",
+      "prop": "texture",
+      "minWidth": 100,
+      "cell": true
+    },
+    {
+      "label": "颜色",
+      "prop": "colour",
+      "minWidth": 100,
+      "cell": true
+    },
+    {
+      "label": "描述",
+      "prop": "describe",
+      "minWidth": 100,
+      "cell": true
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "minWidth": 100,
+      "cell": true
+    }
+  ]
+}

File diff suppressed because it is too large
+ 445 - 265
src/views/basicData/commodityType/detailsPageEdit.vue


+ 66 - 6
src/views/basicData/productInformation/index.vue

@@ -25,6 +25,15 @@
                    @size-change="sizeChange"
                    @refresh-change="refreshChange"
                    @on-load="onLoad">
+          <template slot="menuLeft">
+            <el-button
+              type="primary"
+              size="small"
+              icon="el-icon-bottom"
+              @click="commodityImport()"
+            >导入
+            </el-button>
+          </template>
           <template slot-scope="scope" slot="menu">
             <el-button
                 type="text"
@@ -49,6 +58,18 @@
             </el-button>
           </template>
         </avue-crud>
+        <el-dialog title="导入产品"
+                   append-to-body
+                   :visible.sync="excelBox"
+                   width="555px">
+          <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+            <template slot="excelTemplate">
+              <el-button type="primary" @click="derivation">
+                点击下载<i class="el-icon-download el-icon--right"></i>
+              </el-button>
+            </template>
+          </avue-form>
+        </el-dialog>
       </basic-container>
     </el-col>
   </el-row>
@@ -126,9 +147,53 @@ export default {
       platformData: [],
       platformForm: {},
       excelForm: {},
+      excelOption: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: '模板上传',
+            prop: 'excelFile',
+            type: 'upload',
+            drag: true,
+            loadText: '模板上传中,请稍等',
+            span: 24,
+            propsHttp: {
+              res: 'data',
+            },
+            tip: '请上传 .xls,.xlsx 标准格式文件',
+            action: "",
+          },
+          {
+            label: '模板下载',
+            prop: 'excelTemplate',
+            formslot: true,
+            span: 24,
+          }
+        ]
+      }
     };
   },
   methods: {
+    //导入
+    commodityImport(){
+      if(this.treeDeptId === ''){
+        this.$message.warning("请选择产品类型")
+      }else{
+        this.excelBox = !this.excelBox
+        const column = this.findObject(this.excelOption.column, "excelFile");
+        column.action = "/api/blade-client/goodsdesc/import-desc?typeId="+this.treeDeptId+"";
+      }
+    },
+    derivation() {
+      window.open(`/api/blade-client/goodsdesc/export-template?${this.website.tokenHeader}=${getToken()}`);
+    },
+    uploadAfter(res, done, loading, column) {
+      window.console.log(column);
+      this.excelBox = false;
+      this.refreshChange();
+      done();
+    },
     nodeClick(data) {
       this.treeDeptId = data.id;
       this.page.currentPage = 1;
@@ -259,12 +324,6 @@ export default {
     handleImport() {
       this.excelBox = true;
     },
-    uploadAfter(res, done, loading, column) {
-      window.console.log(column);
-      this.excelBox = false;
-      this.refreshChange();
-      done();
-    },
     handleTemplate() {
       window.open(`/api/blade-user/export-template?${this.website.tokenHeader}=${getToken()}`);
     },
@@ -307,6 +366,7 @@ export default {
       getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
         const data = res.data.data;
         this.data = data.records;
+        this.page.total = res.data.data.total
         this.loading = false;
         this.selectionClear();
       });

+ 15 - 15
src/views/exportTrade/customerInquiry/config/mainList.json

@@ -14,14 +14,14 @@
       "prop": "sysNo",
       "search": true,
       "index": 1,
-      "minWidth": 60,
+      "width": 60,
       "overHidden": true
     }, {
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
       "index": 2,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     },
     {
@@ -29,7 +29,7 @@
       "prop": "orderStatus",
       "search": true,
       "index": 4,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true,
       "type": "select",
       "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
@@ -41,27 +41,27 @@
       "label": "联系人",
       "prop": "corpAttn",
       "index": 5,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "电话",
       "prop": "corpTel",
       "index": 6,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "起运港",
       "prop": "portOfLoad",
       "search": true,
       "index": 7,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "目的港",
       "prop": "portOfDestination",
       "search": true,
       "index": 8,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true,
       "type": "select",
       "filterable":true,
@@ -74,20 +74,20 @@
       "label": "运输方式",
       "prop": "transport",
       "index": 9,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "价格条款",
       "prop": "priceTerms",
       "index": 10,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "订单日期",
       "prop": "businesDate",
       "search": true,
       "index": 12,
-      "minWidth": 100,
+      "width": 100,
       "type": "date",
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd 00:00:00",
@@ -96,7 +96,7 @@
       "label": "有效日期",
       "prop": "dateValidity",
       "index": 13,
-      "minWidth": 80,
+      "width": 80,
       "type": "date",
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd 00:00:00",
@@ -105,25 +105,25 @@
       "label": "收款方式",
       "prop": "paymentType",
       "index": 14,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "币别",
       "prop": "currency",
       "index": 15,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "汇率",
       "prop": "exchangeRate",
       "index": 16,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "备注",
       "prop": "orderRemark",
       "index": 20,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }
   ]

+ 32 - 4
src/views/exportTrade/customerInquiry/index.vue

@@ -14,6 +14,7 @@
         @refresh-change="refreshChange"
         @on-load="onLoad"
         :table-loading="loading"
+        @saveColumn="saveColumn"
       >
         <template slot="portOfLoadSearch">
           <port-info v-model="search.portOfLoad" />
@@ -83,10 +84,13 @@
 </template>
 
 <script>
-import option from "./config/mainList.json";
+import mainOption from "./config/mainList.json";
 import { getList, remove } from "@/api/basicData/customerInquiry";
 import detailPage from "./detailsPage.vue";
-
+import { saveColumn, getColumn, getJson } from "@/api/saveColumn";
+import {columnName} from "@/enums/column-name"
+let columnKey=columnName[0].name
+console.log(columnKey)
 export default {
   name: "customerInformation",
   data() {
@@ -100,7 +104,7 @@ export default {
       },
       search: {},
       form: {},
-      option: option,
+      option: {},
       parentId: 0,
       dataList: [],
       page: {
@@ -114,7 +118,19 @@ export default {
     };
   },
   components: { detailPage },
-  created() {
+  async created() {
+    const localData = JSON.parse(localStorage.getItem(columnKey) || null);
+    if (localData != null) {
+      this.option = localData;
+    } else {
+      const res = await getColumn({ fileName: columnKey });
+      console.log(res.data.data);
+      this.option =
+        res.data.data != null
+          ? JSON.parse(res.data.data.jsonMessage)
+          : mainOption;
+      localStorage.setItem(columnKey, JSON.stringify(this.option));
+    }
     let _this = this;
     this.option.column.forEach(e => {
       if (e.prop == "exchangeRate") {
@@ -210,6 +226,18 @@ export default {
     goBack() {
       this.detailData = this.$options.data().detailData;
       this.show = true;
+    },
+    saveColumn(row, column) {
+      saveColumn({
+        fileName: columnKey,
+        jsonMessage: JSON.stringify(this.option)
+      }).then(res => {
+        if (res.data.code == 200) {
+          this.$message.success("保存成功");
+          localStorage.setItem(columnKey, JSON.stringify(this.option));
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      });
     }
   }
 };

+ 2 - 2
src/views/work/process/leave/handle.vue

@@ -128,7 +128,7 @@
           processInstanceId: this.processInstanceId,
           flag: 'ok',
           comment: this.form.comment,
-          itemId : '1458265136067522561'
+          businessId:this.form.id
         };
         completeTask(params).then(res => {
           const data = res.data;
@@ -150,7 +150,7 @@
           taskId: this.taskId,
           processInstanceId: this.processInstanceId,
           comment: this.form.comment,
-          itemId : '1458265136067522561'
+          businessId:this.form.id
         };
         completeTask(params).then(res => {
           const data = res.data;

+ 1 - 1
src/views/workManagement/main-items/configuration/detailsPage.json

@@ -39,7 +39,7 @@
       "label": "任务部门",
       "prop": "deptid",
       "type":"tree",
-      "dicUrl": "/api/blade-system/dept/tree?tenantId=000000",
+      "dicUrl": "/api/blade-system/dept/tree?tenantId=096359",
       "props": {
         "label": "title",
         "value": "value"

+ 84 - 63
src/views/workManagement/main-items/detailsPage.vue

@@ -67,7 +67,7 @@
             <el-button type="info"
                        size="small"
                        :disabled="crudSelection == 0"
-                       @click.stop="openPleaseCheckDialog()">请 核
+                       @click.stop="beforePleaseCheck()">请 核
             </el-button>
           </template>
           <template slot="menuRight">
@@ -83,6 +83,7 @@
               type="text"
               size="small"
               @click="rowCellTwo(row,index)"
+              :disabled="row.strStatus !== '录入'"
             >{{row.$cellEdit?'修改完成':'修改'}}</el-button>
           </template>
           <template slot="userid" slot-scope="{row,index}">
@@ -184,43 +185,23 @@
     </span>
     </el-dialog>
     <el-dialog
-      title="请核"
+      title="流程"
       append-to-body
       class="el-dialogDeep"
-      :visible.sync="pleaseCheckDialog"
+      :visible.sync="processDialog"
       width="60%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
+      :modal-append-to-body='false'
       :close-on-press-escape="false"
       v-dialog-drag
     >
       <examine-approve
         :itemId ="itemId"
-        :closeFun="dialogExamineApproveClose"
+        :closeFun="dialogProcessClose"
       >
       </examine-approve>
     </el-dialog>
-    <el-dialog title="流程图"
-               append-to-body
-               :visible.sync="flowBox"
-               :fullscreen="true">
-      <iframe
-        :src=flowUrl
-        width="80%"
-        height="700"
-        title="流程图"
-        frameBorder="no"
-        border="0"
-        marginWidth="0"
-        marginHeight="0"
-        scrolling="no"
-        allowTransparency="yes">
-      </iframe>
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="flowBox = false">关 闭</el-button>
-      </span>
-    </el-dialog>
   </div>
 </template>
 
@@ -246,8 +227,8 @@
   import { corpsbank } from "@/api/basicData/configuration"
   //事务
   import examineApprove from "@/components/examineApprove/index";
-  import {flowCategory, flowRoute} from "@/util/flow";
-  import {startList} from "@/api/work/work";
+  //对象数组比较
+  import { contrastObj,contrastList } from "@/util/contrastData";
 
 
   export default {
@@ -503,8 +484,9 @@
           total: 0,
           pageSize: 10
         },
+        itemId:'',
         //请核窗口定义
-        pleaseCheckDialog:false,
+        processDialog:false,
         pleaseCheckContact:startOption,
         pleaseCheckLoading:false,
         pleaseCheckData:[],
@@ -513,10 +495,10 @@
           currentPage: 1,
           total: 0
         },
-        //流程图
-        flowBox: false,
-        flowUrl: '',
-        itemId:'',
+        //新旧数据比较
+        oldData:[],
+        oldUpLoadData:[],
+        oldForm:{}
       };
     },
     created() {
@@ -555,19 +537,16 @@
         if(this.id){
           projectDetail(this.id,"0,1,2,3,4,5").then(res =>{
             this.form = res.data.data;
+            this.oldForm = Object.assign({},res.data.data);
             if(res.data.data.corpName){
               this.configuration.dicData = res.data.data.corpName; //给客户名称赋值
             }
             if(res.data.data.filesList){
               this.upLoadData = res.data.data.filesList
+              this.oldUpLoadData = this.deepClone(res.data.data.filesList)
             }
             if(res.data.data.itemList){
-              this.loading = true;
               this.operationDetailList(res.data.data.itemList);
-              this.loading = false;
-              if(pleaseCheck === 10086){
-                this.pleaseCheck();
-              }
             }else{
               this.data = [];
             }
@@ -586,6 +565,7 @@
       },
       operationDetailList(itemList){
         this.data = itemList;
+        this.oldData = this.deepClone(itemList)
         let status = [];
         this.data.forEach(item =>{
           item.status == 0 ? status.push(true) : status.push(false)
@@ -631,24 +611,35 @@
         })
       },
       openPleaseCheckDialog(){
-        this.pleaseCheckDialog = true;
-        this.itemId = this.crudSelection[0].id
+        this.processDialog = true;
+        this.itemId = this.crudSelection[0].id   //记得不能写死
       },
       //请核之前
       beforePleaseCheck(){
         if(this.crudSelection){
-          let resultUserName = [];
+          let id = [];
           let result = [];
           this.crudSelection.forEach(item=>{
             // 新录入状态下  才可提交审核
-            item.createUserName ? resultUserName.push(true) : resultUserName.push(false) //如果没有创建人并且为新录入  提示保存
+            item.id ? id.push(true) : id.push(false) //如果没有id并且为新录入  提示保存
             item.strStatus === "录入" ? result.push(true) : result.push(false) //判断所有的是否为录入状态
           })
-          if(resultUserName.findIndex(item => item != true) == -1){
-            // 如果数组内有一个 为false  则为false
+          if(id.findIndex(item => item != true) == -1){
             if(result.findIndex(item => item != true) == -1){
-              // this.openPleaseCheckDialog()
-              // this.editMainProject(10086);
+              if(contrastObj(this.form,this.oldForm) || contrastList(this.data,this.oldData)){  //判断是否改动过此页面
+                this.$confirm("您已改动此页面,请先保存之后在请核?", "提示", {
+                  confirmButtonText: "保存",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }).then(() => {
+                  this.editMainProject();
+                }).catch(()=>{
+                  return
+                })
+              }else{
+                this.pleaseCheck()
+                // this.openPleaseCheckDialog();
+              }
             }else{
               this.$message({
                 type: "error",
@@ -662,7 +653,7 @@
               cancelButtonText: "取消",
               type: "warning"
             }).then(() => {
-              this.editMainProject(10086);
+              this.editMainProject();
             })
           }
         }
@@ -690,10 +681,7 @@
               filesList:this.upLoadData
             }
             editMianProject(params).then(res =>{
-              if(pleaseCheck === 10086){  //请核
-                this.id =  res.data.data;
-                this.getProjectDetail(pleaseCheck)
-              }else if(pleaseCheck === 10010){  //复制新单新单
+             if(pleaseCheck === 10010){  //复制新单新单
                 this.$router.push({
                   path: "/mainItems_detailsPage",
                   query: {id: ''},
@@ -703,6 +691,16 @@
                 this.data = []
                 this.upLoadData = []
                 this.id = ''
+              }else if(pleaseCheck === 10001){  //返回列表保存数据
+                this.$message({
+                  type: "success",
+                  message: "操作成功!"
+                });
+                this.$router.$avueRouter.closeTag();
+                this.$router.push({
+                  path: '/workManagement/main-items/list',
+                  query: {}
+                });
               }else{
                 this.$message({
                   type: "success",
@@ -717,25 +715,47 @@
       //请核
       pleaseCheck(){
         this.crudSelection.forEach(item =>{
+          let success = false;
           updateItemStatus(this.data[item.$index].id,1).then(res =>{
             if(res.data.success){
-              this.$message({
-                type: "success",
-                message: "请核成功!"
-              });
-              //刷新列表
-              this.getProjectDetail();
+              success = true
             }
           })
+          if(success){
+            this.$message({
+              type: "success",
+              message: "请核成功!"
+            });
+            //刷新列表
+            this.getProjectDetail();
+          }
         })
       },
       //返回主营项目列表
       backToList(){
-        this.$router.$avueRouter.closeTag();
-        this.$router.push({
-          path: '/workManagement/main-items/list',
-          query: {}
-        });
+        if(contrastObj(this.form,this.oldForm) || contrastList(this.data,this.oldData)
+          || contrastList(this.upLoadData,this.oldUpLoadData)
+        ){
+          this.$confirm("是否保存当前页面?", "提示", {
+            confirmButtonText: "保存",
+            cancelButtonText: "取消",
+            type: "warning",
+          }).then(() => {
+            this.editMainProject(10001)
+          }).catch(()=>{
+            this.$router.$avueRouter.closeTag();
+            this.$router.push({
+              path: '/workManagement/main-items/list',
+              query: {}
+            });
+          })
+        }else{
+          this.$router.$avueRouter.closeTag();
+          this.$router.push({
+            path: '/workManagement/main-items/list',
+            query: {}
+          });
+        }
       },
       //点击修改或保存时触发
       rowCellTwo(row,index){
@@ -885,8 +905,9 @@
            this.userDialog = !this.userDialog
          }
       },
-      dialogExamineApproveClose(){
-        this.pleaseCheckDialog = false
+      dialogProcessClose(){
+        this.processDialog = false
+        this.getProjectDetail()
       },
     },
   };

Some files were not shown because too many files changed in this diff