Commit f825ac81 by liangjianmin

feat: 添加合同ID管理,优化获取合同详情逻辑

parent 6e79d3f1
Showing with 6 additions and 6 deletions
...@@ -323,6 +323,7 @@ export default { ...@@ -323,6 +323,7 @@ export default {
langOptions: [], langOptions: [],
selectedLang: '', selectedLang: '',
uploadUrl: NODE_ENVS + '/api/purContract/updateOrderContract', uploadUrl: NODE_ENVS + '/api/purContract/updateOrderContract',
contract_id: '',//合同id
fileData: { fileData: {
token: this.token, token: this.token,
contract_id: 0, contract_id: 0,
...@@ -349,9 +350,8 @@ export default { ...@@ -349,9 +350,8 @@ export default {
} }
}, },
methods: { methods: {
getData(id) { getData() {
this.$http('post', "/api/purchase/purOrderDetail", { id: id }).then(res => { this.$http('post', "/api/purchase/purOrderDetail", { id: this.id }).then(res => {
console.log(res);
if (res.code === 0) { if (res.code === 0) {
this.infos = res.data.purchase_info; this.infos = res.data.purchase_info;
this.tableData = res.data.purchase_item_list || []; this.tableData = res.data.purchase_item_list || [];
...@@ -434,6 +434,7 @@ export default { ...@@ -434,6 +434,7 @@ export default {
}, },
// 签署合同 // 签署合同
showSignDialog(contractItem) { showSignDialog(contractItem) {
this.contract_id = contractItem.contractId;
this.signDialogVisible = true; this.signDialogVisible = true;
}, },
// 关闭签署合同弹窗 // 关闭签署合同弹窗
...@@ -442,15 +443,14 @@ export default { ...@@ -442,15 +443,14 @@ export default {
}, },
// 提交签署合同 // 提交签署合同
submitSignContract() { submitSignContract() {
this.$http('POST', "/api/purContract/signContract", { sku_apply_num_json: JSON.stringify(this.sku_apply_num_json), remark: this.remark }).then(res => { this.$http('POST', "/api/purContract/signContract", { contract_id: this.contract_id }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message({ this.$message({
message: '签署合同成功', message: '签署合同成功',
type: 'success', type: 'success',
onClose: () => { onClose: () => {
this.signDialogVisible = false; this.signDialogVisible = false;
this.remark = ''; this.getData();
this.getList();
} }
}); });
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment