|
@@ -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) {
|