|
@@ -10,6 +10,9 @@
|
|
|
>返回列表
|
|
|
</el-button>
|
|
|
</div>
|
|
|
+ <el-button type="info" class="sell-customer-btn" @click="saveSell"
|
|
|
+ >生成采购单</el-button
|
|
|
+ >
|
|
|
<el-button type="success" class="copy-customer-btn" disabled>
|
|
|
复制新单
|
|
|
</el-button>
|
|
@@ -422,7 +425,8 @@ import {
|
|
|
deliverGoods,
|
|
|
getPorts,
|
|
|
getSysNo,
|
|
|
- getSpecification
|
|
|
+ getSpecification,
|
|
|
+ saveSell
|
|
|
} from "@/api/basicData/salesContract";
|
|
|
import _ from "lodash";
|
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
@@ -805,6 +809,22 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ saveSell() {
|
|
|
+ if (!this.form.id) {
|
|
|
+ return this.$message.error("此单据没有提交记录,请先提交");
|
|
|
+ }
|
|
|
+ this.$confirm("是否生成采购单?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ saveSell(this.form.id).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.$message.success("生成成功");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
getcorpId(row) {
|
|
|
this.data[row.index].corpId = row.id;
|
|
|
},
|
|
@@ -1188,6 +1208,11 @@ export default {
|
|
|
font-size: 20px;
|
|
|
margin-right: 8px;
|
|
|
}
|
|
|
+.sell-customer-btn {
|
|
|
+ position: fixed;
|
|
|
+ right: 244px;
|
|
|
+ top: 115px;
|
|
|
+}
|
|
|
.copy-customer-btn {
|
|
|
position: fixed;
|
|
|
right: 140px;
|