simple 4 سال پیش
والد
کامیت
eb05d01247

+ 5 - 5
config/index.js

@@ -33,7 +33,7 @@ module.exports = {
     assetsPublicPath: '/',
     proxyTable: {
       "/community": { //基础服务
-        target: "https:/test.hajwy.com/community",
+        target: "https:/pms.hajwy.com/community",
         secure: false,
         changeOrigin: true,
         pathRewrite: {
@@ -41,7 +41,7 @@ module.exports = {
         }
       },
       "/landcrm": { //基础服务
-        target: "https://test.hajwy.com/landcrm",
+        target: "https://pms.hajwy.com/landcrm",
         secure: false,
         changeOrigin: true,
         pathRewrite: {
@@ -49,7 +49,7 @@ module.exports = {
         }
       },
       "/mkf": { //地区、项目获取
-        target: 'https://test.hajwy.com/landcrm',
+        target: 'https://pms.hajwy.com/landcrm',
         secure: false,
         changeOrigin: true,
         pathRewrite: {
@@ -57,7 +57,7 @@ module.exports = {
         }
       },
       "/hajwy": { //采购结算明细对接
-        target: 'https://test.hajwy.com/qpi/rest',
+        target: 'https://pms.hajwy.com/qpi/rest',
         secure: false,
         changeOrigin: true,
         pathRewrite: {
@@ -66,7 +66,7 @@ module.exports = {
       },
       "/purchase": { //采采购管理整体测试
         // target: "http://www.jihengcc.cn:17080/purchase", //采购供应商管理测试
-        target: "https://test.hajwy.com/purchase", //采购供应商管理测试
+        target: "https://pms.hajwy.com/purchase", //采购供应商管理测试
         // target: "http://172.18.1.40:8989/purchase",
         secure: false,
         changeOrigin: true,

+ 1 - 1
src/components/index.vue

@@ -171,7 +171,7 @@ export default {
         if (!jQuery.isEmptyObject(result)) {
           localStorage.areaList = JSON.stringify(result.items);
           if (result.items.length > 0) {
-            getProjectList(localStorage.user_id, result.items[0].areaId).then(
+            getProjectList(localStorage.user_id, "").then(
               result => {
                 if (!jQuery.isEmptyObject(result)) {
                   localStorage.projectList = JSON.stringify(result.items);

+ 13 - 8
src/page/baseInfo/components/supply/supplyEdit.vue

@@ -1482,6 +1482,15 @@ export default {
           this.ssqyList.filter(a => a.areaId == this.form.ssqy[i])[0].areaName
         );
       }
+      let gpClassifyName1 = this.gysflList.filter(
+        a => a.detailId == this.form.gysfl
+      );
+      let gpGradeName1 = this.gyspjList.filter(
+        a => a.detailId == this.form.gyspj
+      );
+      let gpBuyerName1 = this.fgcgyList.filter(
+        a => a.userId == this.form.fgcgy
+      );
       let postData = {
         gpId: this.gpId,
         gpName: this.form.gysmc,
@@ -1489,18 +1498,14 @@ export default {
         gpLinker: this.form.gyslxr,
         gpLinkTell: this.form.gyslxdh,
         gpClassifyId: this.form.gysfl,
-        gpClassifyName: this.gysflList.filter(
-          a => a.detailId == this.form.gysfl
-        )[0].detailName,
+        gpClassifyName:
+          gpClassifyName1.length > 0 ? gpClassifyName1[0].detailName : "",
         gpGradeId: this.form.gyspj,
-        gpGradeName: this.gyspjList.filter(
-          a => a.detailId == this.form.gyspj
-        )[0].detailName,
+        gpGradeName: gpGradeName1.length > 0 ? gpGradeName1[0].detailName : "",
         gpRegionId: this.form.ssqy.join(","),
         gpRegionName: arr.join(","),
         gpBuyerId: this.form.fgcgy,
-        gpBuyerName: this.fgcgyList.filter(a => a.userId == this.form.fgcgy)[0]
-          .userName,
+        gpBuyerName: gpBuyerName1 > 0 ? gpBuyerName1[0].userName : "",
         gpEnabledState: this.form.qyzt,
         gpEstablishTime: this.form.clsj,
         gpCorporateRepresentative: this.form.frdb,

+ 1 - 1
src/page/purchase/components/order/orderMxAdd.vue

@@ -291,7 +291,7 @@ export default {
               price: Number(resArr[item].price),
               purchaseNum: Number(this.tableSelect[item].noBilledAmount),
               plannedArrivalTime: this.tableSelect[item].arriveTime,
-              isNumControl: 1,
+              isNumControl: 0,
               isTimeControl: 1,
               checkNum: null,
               applySurplusNum: this.tableSelect[item].noBilledAmount,

+ 2 - 1
src/page/purchase/components/plan/planAdd.vue

@@ -8,7 +8,7 @@
           <Button v-if="form.spzt != '0'" @click="toSpjl">查看审批记录</Button>
           <Button
             @click="addSgjh"
-            v-if="form.spzt != '1' && (form.status = '1' || form.status == '2')"
+            v-if="form.spzt == '0' && (form.status = '1' || form.status == '2')"
           >保存</Button>
           <Button
             @click="submitSgjh"
@@ -1055,6 +1055,7 @@ export default {
       if (val && val.length && val.length === 1) {
         const [{ areaId, areaName }] = val;
         this.form.ssqy = `${areaId},${areaName}`;
+        this.ssqyChange();
       }
     },
     ssxmList(val) {

+ 1 - 1
src/page/purchase/components/plan/planMxAdd.vue

@@ -88,7 +88,7 @@
           <span class="mustSpan">*</span>
         </Col>
         <Col span="6" class-name="tables">
-          <Select clearable v-model="addForm.jldw" style="width: 95%" :transfer="true">
+          <Select clearable filterable v-model="addForm.jldw" style="width: 95%" :transfer="true">
             <Option v-for="item in jldwList" :value="item.value" :key="item.value">{{ item.label }}</Option>
           </Select>
         </Col>

+ 27 - 1
src/page/purchase/purchaseBalance.vue

@@ -323,7 +323,9 @@ export default {
       });
     },
     goDetail(row) {
-      this.editRow(row);
+      if (this.buttonShow.edit) {
+        this.editRow(row);
+      }
       // window.open(
       //   `https://test.hajwy.com/purchase-web/#/viewPurchaseSett?id=${row.settlementId}`
       // );
@@ -347,6 +349,12 @@ export default {
     glxmChange(val) {},
     //导出明细
     exportData() {
+      let allArea = [];
+      let allProject = [];
+      let areaList = JSON.parse(localStorage.getItem("areaList"));
+      let projectList = JSON.parse(localStorage.getItem("projectList"));
+      areaList.forEach(a => allArea.push(a.areaId));
+      projectList.forEach(a => allProject.push(a.projectId));
       let postData = {
         areaIds: this.searchForm.ssqy,
         projectIds: this.searchForm.glxm,
@@ -359,10 +367,22 @@ export default {
         warehouseEntry: this.searchForm.rkd,
         settlementCode: this.searchForm.jsbh
       };
+      if (!this.searchForm.ssqy) {
+        postData.areaIds = allArea.join(",");
+      }
+      if (!this.searchForm.glxm) {
+        postData.projectIds = allProject.join(",");
+      }
       exportPurchaseSettlementDetailVO(postData).then(res => {});
     },
     //列表方法
     getTableData() {
+      let allArea = [];
+      let allProject = [];
+      let areaList = JSON.parse(localStorage.getItem("areaList"));
+      let projectList = JSON.parse(localStorage.getItem("projectList"));
+      areaList.forEach(a => allArea.push(a.areaId));
+      projectList.forEach(a => allProject.push(a.projectId));
       let postData = {
         page: this.pageNum,
         pageSize: 10,
@@ -377,6 +397,12 @@ export default {
         warehouseEntry: this.searchForm.rkd,
         settlementCode: this.searchForm.jsbh
       };
+      if (!this.searchForm.ssqy) {
+        postData.areaIds = allArea.join(",");
+      }
+      if (!this.searchForm.glxm) {
+        postData.projectIds = allProject.join(",");
+      }
       this.tableLoading = true;
       queryPurchaseSettlementList(postData).then(res => {
         this.tableLoading = false;

+ 29 - 3
src/page/purchase/purchaseOrder.vue

@@ -184,8 +184,8 @@ export default {
       },
       //   查询参数
       searchForm: {
-        ssqy: [], //所属区域
-        glxm: [], //关联项目
+        ssqy: "", //所属区域
+        glxm: "", //关联项目
         glcgjh: "", //关联采购计划
         cgr: "", //采购人
         xdsj: [], //下单时间
@@ -336,7 +336,9 @@ export default {
       });
     },
     goDetail(row) {
-      this.editRow(row);
+      if (this.buttonShow.edit) {
+        this.editRow(row);
+      }
       // window.open(
       //   `https://test.hajwy.com/purchase-web/#/viewPurchaseOrder?id=${row.orderId}`
       // );
@@ -363,6 +365,12 @@ export default {
       this.getTableData();
     },
     exportData() {
+      let allArea = [];
+      let allProject = [];
+      let areaList = JSON.parse(localStorage.getItem("areaList"));
+      let projectList = JSON.parse(localStorage.getItem("projectList"));
+      areaList.forEach(a => allArea.push(a.areaId));
+      projectList.forEach(a => allProject.push(a.projectId));
       let postData = {
         areaIds: `${this.searchForm.ssqy}`,
         projectIds: `${this.searchForm.glxm}`,
@@ -377,10 +385,22 @@ export default {
         orderState: this.searchForm.ddzt,
         queryText: this.searchForm.title
       };
+      if (!this.searchForm.ssqy) {
+        postData.areaIds = allArea.join(",");
+      }
+      if (!this.searchForm.glxm) {
+        postData.projectIds = allProject.join(",");
+      }
       exportPurchaseOrder(postData);
     },
     //列表方法
     getTableData() {
+      let allArea = [];
+      let allProject = [];
+      let areaList = JSON.parse(localStorage.getItem("areaList"));
+      let projectList = JSON.parse(localStorage.getItem("projectList"));
+      areaList.forEach(a => allArea.push(a.areaId));
+      projectList.forEach(a => allProject.push(a.projectId));
       let postData = {
         page: this.pageNum,
         pageSize: 10,
@@ -397,6 +417,12 @@ export default {
         orderState: this.searchForm.ddzt,
         queryText: this.searchForm.title
       };
+      if (!this.searchForm.ssqy) {
+        postData.areaIds = allArea.join(",");
+      }
+      if (!this.searchForm.glxm) {
+        postData.projectIds = allProject.join(",");
+      }
       this.tableLoading = true;
       getPurchaseOrder(postData).then(res => {
         this.tableLoading = false;

+ 31 - 2
src/page/purchase/purchasePlan.vue

@@ -235,13 +235,13 @@ export default {
           title: "计划单据号",
           key: "code",
           tooltip: "true",
-          width: 100
+          width: 200
         },
         {
           title: "标题",
           key: "title",
           tooltip: "true",
-          width: 100
+          width: 300
         },
         {
           title: "状态",
@@ -372,6 +372,11 @@ export default {
     },
     goDetail(row, index) {
       if (row.applyStatus != "3") {
+        if (!this.buttonShow.edit) {
+          return false;
+        } else {
+          this.editRow(row);
+        }
         this.editRow(row);
       } else {
         let routeUrl = this.$router.resolve({
@@ -404,6 +409,12 @@ export default {
     glxmChange(val) {},
     //申购计划导出
     exportData() {
+      let allArea = [];
+      let allProject = [];
+      let areaList = JSON.parse(localStorage.getItem("areaList"));
+      let projectList = JSON.parse(localStorage.getItem("projectList"));
+      areaList.forEach(a => allArea.push(a.areaId));
+      projectList.forEach(a => allProject.push(a.projectId));
       let postData = {
         type: this.searchForm.jhlx,
         applyMonth: this.searchForm.jhyf,
@@ -417,6 +428,12 @@ export default {
         areaIds: this.searchForm.ssqy,
         projectIds: this.searchForm.glxm
       };
+      if (!this.searchForm.ssqy) {
+        postData.areaIds = allArea.join(",");
+      }
+      if (!this.searchForm.glxm) {
+        postData.projectIds = allProject.join(",");
+      }
       if (this.searchForm.zdrq.length > 0) {
         postData.createStartTime = this.searchForm.zdrq[0];
         postData.createEndTime = this.searchForm.zdrq[1];
@@ -431,6 +448,12 @@ export default {
     },
     //列表页方法
     getTableData() {
+      let allArea = [];
+      let allProject = [];
+      let areaList = JSON.parse(localStorage.getItem("areaList"));
+      let projectList = JSON.parse(localStorage.getItem("projectList"));
+      areaList.forEach(a => allArea.push(a.areaId));
+      projectList.forEach(a => allProject.push(a.projectId));
       let postData = {
         type: this.searchForm.jhlx,
         applyMonth: this.searchForm.jhyf,
@@ -442,6 +465,12 @@ export default {
         areaIds: this.searchForm.ssqy,
         projectIds: this.searchForm.glxm
       };
+      if (!this.searchForm.ssqy) {
+        postData.areaIds = allArea.join(",");
+      }
+      if (!this.searchForm.glxm) {
+        postData.projectIds = allProject.join(",");
+      }
       if (this.searchForm.zdrq.length > 0) {
         postData.createStartTime = this.searchForm.zdrq[0];
         postData.createEndTime = this.searchForm.zdrq[1];

+ 27 - 2
src/page/purchase/purchasePool.vue

@@ -274,7 +274,7 @@ export default {
           title: "申购计划",
           key: "code",
           tooltip: "true",
-          width: 100
+          width: 200
         },
         {
           title: "计划月份",
@@ -422,6 +422,12 @@ export default {
     },
     // 导出excel
     async handleExcelClick() {
+      let allArea = [];
+      let allProject = [];
+      let areaList = JSON.parse(localStorage.getItem("areaList"));
+      let projectList = JSON.parse(localStorage.getItem("projectList"));
+      areaList.forEach(a => allArea.push(a.areaId));
+      projectList.forEach(a => allProject.push(a.projectId));
       let postData = {
         firstClassId: this.searchForm.yjfl,
         secondClassId: this.searchForm.ejfl,
@@ -431,6 +437,12 @@ export default {
         projectIds: this.searchForm.ssxm
         // storehouseId: this.searchForm.ck
       };
+      if (!this.searchForm.ssqy) {
+        postData.areaIds = allArea.join(",");
+      }
+      if (!this.searchForm.ssmx) {
+        postData.projectIds = allProject.join(",");
+      }
       let res = await exportPurchasePool(postData);
       console.log(res);
     },
@@ -569,7 +581,7 @@ export default {
               price: Number(this.tableSelect[i].referencePrice),
               purchaseNum: Number(this.tableSelect[i].noBilledAmount),
               plannedArrivalTime: dateArr,
-              isNumControl: 1,
+              isNumControl: 0,
               isTimeControl: 1,
               applySurplusNum: this.tableSelect[i].noBilledAmount,
               warehousedNum: 0,
@@ -622,6 +634,12 @@ export default {
     },
     //列表方法
     getTableData() {
+      let allArea = [];
+      let allProject = [];
+      let areaList = JSON.parse(localStorage.getItem("areaList"));
+      let projectList = JSON.parse(localStorage.getItem("projectList"));
+      areaList.forEach(a => allArea.push(a.areaId));
+      projectList.forEach(a => allProject.push(a.projectId));
       let postData = {
         page: this.pageNum,
         pageSize: 10,
@@ -633,6 +651,12 @@ export default {
         projectIds: this.searchForm.ssxm
         // storehouseId: this.searchForm.ck
       };
+      if (!this.searchForm.ssqy) {
+        postData.areaIds = allArea.join(",");
+      }
+      if (!this.searchForm.ssxm) {
+        postData.projectIds = allProject.join(",");
+      }
       this.tableLoading = true;
       queryPurchasePoolList(postData).then(res => {
         this.tableLoading = false;
@@ -646,6 +670,7 @@ export default {
       this.pageNum = val;
       this.getTableData();
     },
+    // 跨页多选逻辑  利用findIndex((a) => a.id = id) 获取对应数据的index(-1为无此元素)  然后利用splice去除数组元素
     tableOnSelect(selection, row) {
       this.tableSelect = selection;
     },