Commit 2a5f00c2 by zhangquan

修复bug

1 parent f2d02bf9
...@@ -68,7 +68,8 @@ const copyTemplateApi = params => { ...@@ -68,7 +68,8 @@ const copyTemplateApi = params => {
url: CUR_BASE_URL, url: CUR_BASE_URL,
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true,
returnAll: true
}) })
} }
...@@ -79,7 +80,8 @@ const copyBaseTemplateApi = params => { ...@@ -79,7 +80,8 @@ const copyBaseTemplateApi = params => {
url: CUR_BASE_URL, url: CUR_BASE_URL,
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true,
returnAll: true
}) })
} }
...@@ -90,7 +92,8 @@ const babchCopyTemplateApi = params => { ...@@ -90,7 +92,8 @@ const babchCopyTemplateApi = params => {
url: CUR_BASE_URL, url: CUR_BASE_URL,
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true,
returnAll: true
}) })
} }
......
...@@ -77,6 +77,7 @@ export default { ...@@ -77,6 +77,7 @@ export default {
label: '合同编号', label: '合同编号',
name: 'id', name: 'id',
type: 'input', type: 'input',
maxlength: 9,
isClear: true, isClear: true,
isHide: this.changeContractObj.isBase == 1 isHide: this.changeContractObj.isBase == 1
}, },
...@@ -84,6 +85,7 @@ export default { ...@@ -84,6 +85,7 @@ export default {
label: '合同名称', label: '合同名称',
name: 'templateName', name: 'templateName',
type: 'input', type: 'input',
maxlength: 20,
isClear: true, isClear: true,
isHide: this.changeContractObj.isBase != 1 isHide: this.changeContractObj.isBase != 1
} }
...@@ -154,7 +156,12 @@ export default { ...@@ -154,7 +156,12 @@ export default {
this.$refs.contractTableRef.refreshTable() this.$refs.contractTableRef.refreshTable()
}, },
handleConfirm() { handleConfirm() {
if (!this.curId) return this.$message.error('请选择变更模板的合同') if (!this.curId)
return this.$message({
message: '请选择变更模板的合同',
type: 'error',
customClass: 'msgHierarchy'
})
let params = {} let params = {}
let API = 'babchCopyTemplateApi' //默认为商品合同批量更换接口 let API = 'babchCopyTemplateApi' //默认为商品合同批量更换接口
if (this.changeContractObj.isBase == 1) { if (this.changeContractObj.isBase == 1) {
...@@ -187,9 +194,15 @@ export default { ...@@ -187,9 +194,15 @@ export default {
}) })
this.$apis.contractManager[API](params) this.$apis.contractManager[API](params)
.then(res => { .then(res => {
if (res) { if (res.data) {
this.$message.success('变更模板成功') this.$message.success('变更模板成功')
this.handleClose() this.handleClose()
} else {
this.$message({
message: res.message,
type: 'error',
customClass: 'msgHierarchy'
})
} }
}) })
.finally(end => { .finally(end => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!