simple 5 vuotta sitten
vanhempi
commit
e987c1e774

+ 7 - 2
src/page/purchase/components/balance/balanceAdd.vue

@@ -191,7 +191,7 @@
             </div>
           </Col>
           <!-- <Col span="4" class-name="tables"></Col>
-          <Col span="4" class-name="tables"></Col> -->
+          <Col span="4" class-name="tables"></Col>-->
         </Row>
         <Row class="uplCont" type="flex" justify="center" style="align-items: stretch">
           <Col span="4" class-name="upl">附件</Col>
@@ -293,6 +293,7 @@ export default {
       spinShow: true,
       contentShow: true,
       mrzhShow: false,
+      gysGo: true,
       uploadHeaders: {
         token: localStorage.token,
         userId: localStorage.user_id
@@ -542,8 +543,11 @@ export default {
     },
     //编辑结算详情
     editJs() {
+      let arr = [];
       for (let i in this.tableData) {
-        this.tableData[i].totalPrice = this.tableData[i].totalPrice.toFixed(2);
+        this.tableData[i].totalPrice = Number(
+          this.tableData[i].totalPrice
+        ).toFixed(2);
       }
       let postData = {
         settlementId: this.settlementId,
@@ -695,6 +699,7 @@ export default {
     cancel() {
       this.spinShow = false;
       this.balanceType = "add";
+      this.gysGo = true;
       this.form = {
         jssqbh: "", //结算申请编号
         bt: "", //标题

+ 1 - 1
src/page/purchase/components/balance/balanceMxAdd.vue

@@ -147,7 +147,7 @@ export default {
         },
         {
           title: "仓管员",
-          key: "warehouseKeeper",
+          key: "warehouseKeeperId",
           tooltip: "true"
         }
       ],

+ 8 - 1
src/page/purchase/components/order/orderAdd.vue

@@ -570,7 +570,9 @@ export default {
   },
   methods: {
     goDetail(id) {
-      window.open(`https://test.hajwy.com/purchase-web/#/viewPurchaseApply?id=${id}`);
+      window.open(
+        `https://test.hajwy.com/purchase-web/#/viewPurchaseApply?id=${id}`
+      );
       // this.$router.push(`/viewPurchaseApply?code=${code}`)
     },
     //批量设置弹窗
@@ -1015,6 +1017,11 @@ export default {
     },
     //取消采购明细
     cancelRow(row, index) {
+      if (this.form.cgr != localStorage.user_name) {
+        this.$Message.error(
+          "当前登录人与该订单采购人非同一人,无法取消该明细!"
+        );
+      }
       editPurchaseOrderDetailState(row.id).then(res => {
         if (res.status == 200) {
           this.$Message.success("取消采购订单明细成功!");

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

@@ -537,7 +537,7 @@ export default {
       }
     },
     //查询申购计划详情
-    getSgjh(id) {
+    getSgjh(id, arr) {
       this.id = id;
       let postData = {
         id: id
@@ -689,7 +689,11 @@ export default {
               this.ckList = res.data;
             }
           });
-          this.tableData = res.data.detailList;
+          if (arr) {
+            this.tableData = arr;
+          } else {
+            this.tableData = res.data.detailList;
+          }
         }
       });
     },
@@ -865,6 +869,10 @@ export default {
       this.tableData.splice(index, 1);
     },
     cancelRow(row, index) {
+      if (this.form.sqr != localStorage.user_name) {
+        this.$Message.error("非计划申请人不允许取消申购计划明细!");
+        return false;
+      }
       editPurchaseApplyDetailState(row.id).then(res => {
         if (res.status == 200) {
           this.$Message.success("取消申购计划明细成功!");

+ 1 - 1
src/page/purchase/components/pool/poolAdd.vue

@@ -59,7 +59,7 @@
                 :key="item.projectId"
               >{{ item.projectName }}</Option>
             </Select>
-            <span v-else>s{{ form.glxm.split(',')[1] }}</span>
+            <span v-else>{{ form.glxm.split(',')[1] }}</span>
           </Col>
           <Col span="4" class-name="tables">单据类型</Col>
           <Col span="4" class-name="tables">

+ 2 - 2
src/page/purchase/purchaseBalance.vue

@@ -287,8 +287,8 @@ export default {
   },
   methods: {
     goDetail(row){
-      // window.open(`https://test.hajwy.com/purchase-web/#/viewPurchaseSett?id=${row.settlementId}`)
-      window.open(`/#/viewPurchaseSett?id=${row.settlementId}`)
+      window.open(`https://test.hajwy.com/purchase-web/#/viewPurchaseSett?id=${row.settlementId}`)
+      // window.open(`/#/viewPurchaseSett?id=${row.settlementId}`)
 
 
     },

+ 6 - 9
src/page/purchase/purchaseOrder.vue

@@ -109,11 +109,7 @@
               v-if="row.approvalState == '1' || row.approvalState == '4'"
               @click="submitRow(row.orderId)"
             >提交</a>
-            <a
-              href="javascript:;"
-              v-if="row.approvalState == '1'"
-              @click="deleteRow(row)"
-            >删除</a>
+            <a href="javascript:;" v-if="row.approvalState == '1'" @click="deleteRow(row)">删除</a>
             <a
               href="javascript:;"
               v-if="row.orderState != '6' || row.approvalState != '4'"
@@ -286,10 +282,11 @@ export default {
     });
   },
   methods: {
-    goDetail(row){
-      // window.open(`https://test.hajwy.com/purchase-web/#/viewPurchaseOrder?id=${row.orderId}`)
-      window.open(`/#/viewPurchaseOrder?id=${row.orderId}`)
-
+    goDetail(row) {
+      window.open(
+        `https://test.hajwy.com/purchase-web/#/viewPurchaseOrder?id=${row.orderId}`
+      );
+      // window.open(`/#/viewPurchaseOrder?id=${row.orderId}`)
     },
     resizePage() {
       this.resizeHeight = window.innerHeight - 282;

+ 46 - 14
src/page/purchase/purchasePlan.vue

@@ -111,13 +111,9 @@
         </template>
         <template slot-scope="{ row, index }" slot="action">
           <div>
-            <a href="javascript:;" @click="editRow(row)">编辑</a>
+            <a href="javascript:;" @click="editRow(row)" v-if="row.applyStatus != '3'">编辑</a>
             <!-- <a href="javascript:;">复制</a> -->
-            <a
-              href="javascript:;"
-              v-if="row.applyStatus == '0' || row.applyStatus == '3'"
-              @click="deleteRow(row)"
-            >删除</a>
+            <a href="javascript:;" v-if="row.applyStatus == '0'" @click="deleteRow(row)">删除</a>
             <a
               href="javascript:;"
               v-if="row.applyStatus == '2' || row.applyStatus == '3'"
@@ -154,7 +150,8 @@ import {
   getJobList,
   exportPurchaseInfo,
   submitPurchaseApply,
-  queryPurchaseApplyInfo
+  queryPurchaseApplyInfo,
+  addPurchaseApply
 } from "@/service/getData";
 import planAdd from "./components/plan/planAdd";
 import PlanPrint from "./components/plan/planPrint";
@@ -321,8 +318,10 @@ export default {
   },
   methods: {
     goDetail(row, index) {
-      // window.open(`https://test.hajwy.com/purchase-web/#/viewPurchaseApply?id=${row.id}`);
-      window.open(`/#/viewPurchaseApply?id=${row.id}`);
+      window.open(
+        `https://test.hajwy.com/purchase-web/#/viewPurchaseApply?id=${row.id}`
+      );
+      // window.open(`/#/viewPurchaseApply?id=${row.id}`);
     },
     resizePage() {
       this.resizeHeight = window.innerHeight - 282;
@@ -430,11 +429,44 @@ export default {
     },
     //行复制
     copyRow(row) {
-      this.$Message.error("功能正在实现中。");
-      // let postData = {
-      //   id: row.id
-      // };
-      // queryPurchaseApplyInfo().then(res => {});
+      let postData = {
+        id: row.id
+      };
+      queryPurchaseApplyInfo(postData).then(res => {
+        if (res.status == 200) {
+          let data = res.data;
+          let postData = {
+            areaId: data.areaId,
+            areaName: data.areaName,
+            projectId: data.projectId,
+            projectName: data.projectName,
+            type: data.type,
+            applyMonth: `${new Date().getFullYear()}年${new Date().getMonth() +
+              1}月`,
+            purchaserId: data.purchaserId,
+            purchaserName: data.purchaserName,
+            applicantId: localStorage.user_id,
+            applicantName: localStorage.user_name,
+            attachmentList: data.filesList,
+            remark: data.remark
+          };
+          let arr = [];
+          for (let i in data.detailList) {
+            data.detailList[i].arriveTime = "";
+          }
+          arr = data.detailList;
+          addPurchaseApply(postData).then(res => {
+            if (res.status == 200) {
+              this.$Message.success("复制申购计划成功!");
+              this.addShow = true;
+              this.$refs.add.planType = "edit";
+              this.$refs.add.getSgjh(res.data.id, arr);
+            }
+          });
+        } else {
+          this.$Message.error(res.message);
+        }
+      });
     },
     //行提交
     submitRow(row) {

+ 5 - 3
src/page/purchase/purchasePool.vue

@@ -174,7 +174,7 @@ export default {
         djlx: "",
         cgr: localStorage.user_name,
         cgrlxfs: "",
-        xdrq: new Date(),
+        xdrq: ``,
         jhsj: "",
         shr: "",
         shrlxfs: "",
@@ -383,7 +383,7 @@ export default {
         djlx: "",
         cgr: localStorage.user_name,
         cgrlxfs: "",
-        xdrq: new Date(),
+        xdrq: "",
         jhsj: "",
         shr: "",
         shrlxfs: "",
@@ -460,7 +460,7 @@ export default {
               plannedArrivalTime: dateArr,
               isNumControl: 2,
               isTimeControl: 2,
-              applySurplusNum: this.tableSelect[i].amount,
+              applySurplusNum: this.tableSelect[i].noBilledAmount,
               warehousedNum: 0,
               remark: ""
             });
@@ -490,6 +490,8 @@ export default {
           return false;
         }
       }
+      this.addForm.xdrq = `${new Date().getFullYear()}-${new Date().getMonth() +
+        1}-${new Date().getDate()} ${new Date().getHours()}:${new Date().getMinutes()}:${new Date().getSeconds()}`;
       this.poolModalShow = true;
       // this.contentShow = false;
       // this.$refs.add.getData(area, project, toAddArr);