|
@@ -252,7 +252,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
- title="合同信息"
|
|
|
|
|
|
|
+ title="合同导入"
|
|
|
:visible.sync="dialogVisibleContract"
|
|
:visible.sync="dialogVisibleContract"
|
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
|
width="70%">
|
|
width="70%">
|
|
@@ -296,7 +296,7 @@
|
|
|
<el-table-column prop="People" min-width="110" label="相对人" align="center" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="People" min-width="110" label="相对人" align="center" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="Number" min-width="110" label="报审序号" align="center" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="Number" min-width="110" label="报审序号" align="center" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="ChooseWay" min-width="110" label="选商方式" align="center" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="ChooseWay" min-width="110" label="选商方式" align="center" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="Amount" min-width="110" label="合同总金额(万元)" align="center" show-overflow-tooltip></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="Amount" min-width="110" label="标的金额" align="center" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="BudgetAmount" min-width="110" label="预算金额" align="center" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="BudgetAmount" min-width="110" label="预算金额" align="center" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="ContractMark" min-width="110" label="合同标的" align="center" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="ContractMark" min-width="110" label="合同标的" align="center" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="Currency" min-width="110" label="币种" align="center" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="Currency" min-width="110" label="币种" align="center" show-overflow-tooltip></el-table-column>
|
|
@@ -332,7 +332,7 @@
|
|
|
<el-form label-width="100px">
|
|
<el-form label-width="100px">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
- <el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"
|
|
|
|
|
|
|
+ <el-upload limit="1" style="margin-top: 10px;" action="" ref="refuploadattach"
|
|
|
:http-request="uploadrequest" :before-remove="beforeRemove">
|
|
:http-request="uploadrequest" :before-remove="beforeRemove">
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
@@ -399,7 +399,6 @@
|
|
|
},
|
|
},
|
|
|
SupplierNameDataFun:function(){
|
|
SupplierNameDataFun:function(){
|
|
|
return function(name,k){
|
|
return function(name,k){
|
|
|
- // var list = []
|
|
|
|
|
var list = this.SupplierNameData.filter(function(x, index) {
|
|
var list = this.SupplierNameData.filter(function(x, index) {
|
|
|
return x.SupplierName.indexOf(name)!=-1;
|
|
return x.SupplierName.indexOf(name)!=-1;
|
|
|
});
|
|
});
|
|
@@ -791,27 +790,31 @@
|
|
|
this.$refs['ruleForm'].validate((valid) => {
|
|
this.$refs['ruleForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
this.uploadTrueClickLoading = true
|
|
this.uploadTrueClickLoading = true
|
|
|
|
|
+ this.tableDataList.tableData.map((item,index) => {
|
|
|
|
|
+ this.tableDataList.tableData[index].IsDeal = this.tableDataList.tableData[index].IsDeal=='是'?1:0
|
|
|
|
|
+ this.tableDataList.tableData[index].IsForeign = this.tableDataList.tableData[index].IsForeign=='是'?1:0
|
|
|
|
|
+ this.tableDataList.tableData[index].IsInternal = this.tableDataList.tableData[index].IsInternal=='是'?1:0
|
|
|
|
|
+ this.tableDataList.tableData[index].EndDate = this.tableDataList.tableData[index].EndDate!=''&&this.tableDataList.tableData[index].EndDate!=undefined?new Date(this.tableDataList.tableData[index].EndDate):''
|
|
|
|
|
+ this.tableDataList.tableData[index].SignedDate = this.tableDataList.tableData[index].SignedDate!=''&&this.tableDataList.tableData[index].SignedDate!=undefined?new Date(this.tableDataList.tableData[index].SignedDate):''
|
|
|
|
|
+ this.tableDataList.tableData[index].SubmitDate = this.tableDataList.tableData[index].SubmitDate!=''&&this.tableDataList.tableData[index].SubmitDate!=undefined?new Date(this.tableDataList.tableData[index].SubmitDate):''
|
|
|
|
|
+ this.tableDataList.tableData[index].StartDate = this.tableDataList.tableData[index].StartDate!=''&&this.tableDataList.tableData[index].StartDate!=undefined?new Date(this.tableDataList.tableData[index].StartDate):''
|
|
|
|
|
+ })
|
|
|
var data = {
|
|
var data = {
|
|
|
Items:this.tableDataList.tableData
|
|
Items:this.tableDataList.tableData
|
|
|
}
|
|
}
|
|
|
- console.log('传之前的数据',data)
|
|
|
|
|
- data.Items[0].ContractClass = '02'
|
|
|
|
|
- data.Items[0].SupplierId = 2
|
|
|
|
|
- data.Items[0].SupplierName = '北京三川世纪能源科技股份公司'
|
|
|
|
|
- var list = {
|
|
|
|
|
- Items:[
|
|
|
|
|
- {
|
|
|
|
|
- ContractClass : '02',
|
|
|
|
|
- SupplierId : 2,
|
|
|
|
|
- SupplierName : '北京三川世纪能源科技股份公司'
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
- }
|
|
|
|
|
- api.saveImportExcel(list, this.$axios).then(res => {
|
|
|
|
|
|
|
+ data = JSON.parse(JSON.stringify( data ))
|
|
|
|
|
+ api.saveImportExcel(data, this.$axios).then(res => {
|
|
|
|
|
+ if(res.data.code==0){
|
|
|
|
|
+ this.dialogVisibleContract = false
|
|
|
|
|
+ this.$message({type: 'success', message: String(res.data.message)})
|
|
|
|
|
+ this.clearSearch()
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$message({type: 'error', message: String(res.data.message)})
|
|
|
|
|
+ }
|
|
|
this.uploadTrueClickLoading = false
|
|
this.uploadTrueClickLoading = false
|
|
|
- console.log('保存合同',res.data)
|
|
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
this.uploadTrueClickLoading = false
|
|
this.uploadTrueClickLoading = false
|
|
|
|
|
+ this.$message({type: 'warning', message: '导入失败'})
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
this.$message({type: 'warning', message: '请填写完整才能导入哦'})
|
|
this.$message({type: 'warning', message: '请填写完整才能导入哦'})
|
|
@@ -832,11 +835,6 @@
|
|
|
api.importExcel(params, this.$axios).then(res => {
|
|
api.importExcel(params, this.$axios).then(res => {
|
|
|
this.importloading = false
|
|
this.importloading = false
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
- this.$message({
|
|
|
|
|
- type: 'success',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
- })
|
|
|
|
|
- // this.initDatas()
|
|
|
|
|
this.dialogVisibleContract = true
|
|
this.dialogVisibleContract = true
|
|
|
for(var key in res.data.item){
|
|
for(var key in res.data.item){
|
|
|
console.log(key,res.data.item[key])
|
|
console.log(key,res.data.item[key])
|
|
@@ -844,7 +842,6 @@
|
|
|
|
|
|
|
|
this.tableDataList.tableData.push(res.data.item[key])
|
|
this.tableDataList.tableData.push(res.data.item[key])
|
|
|
}
|
|
}
|
|
|
- console.log(22222222222222,this.tableDataList.tableData)
|
|
|
|
|
} else if (res.data.code === -1) {
|
|
} else if (res.data.code === -1) {
|
|
|
this.errorDialogVisible = true
|
|
this.errorDialogVisible = true
|
|
|
this.textarea = res.data.message
|
|
this.textarea = res.data.message
|
|
@@ -1041,6 +1038,7 @@
|
|
|
this.uploadshow = true
|
|
this.uploadshow = true
|
|
|
},
|
|
},
|
|
|
beforeRemove(){
|
|
beforeRemove(){
|
|
|
|
|
+ this.Excelurl = ''
|
|
|
return true
|
|
return true
|
|
|
},
|
|
},
|
|
|
uploadrequest (option) {
|
|
uploadrequest (option) {
|
|
@@ -1055,6 +1053,7 @@
|
|
|
} else {
|
|
} else {
|
|
|
option.action = `http://${res.data.publicUrl}/${res.data.fid}`
|
|
option.action = `http://${res.data.publicUrl}/${res.data.fid}`
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log(option)
|
|
|
uploadajax(option)
|
|
uploadajax(option)
|
|
|
_this.Excelurl = option.action
|
|
_this.Excelurl = option.action
|
|
|
} else {
|
|
} else {
|