|
@@ -98,6 +98,7 @@
|
|
|
<el-button v-if="tab1.contractManagement.isContractAdd && parseInt(tab1.detailsSpareParts.detailsList.pastureId) == parseInt(isGroupAdministrator) || parseInt(isEmployeid) == 0" class="filter-item" type="primary" icon="el-icon-edit" :disabled="tab1.detailsSpareParts.detailsList.statued=='终止' || tab1.detailsSpareParts.detailsList.statued=='已过期' || tab1.detailsSpareParts.detailsList.statued=='新增未通过'" @click="handleTab1Create2">新增</el-button>
|
|
|
<el-button v-if="tab1.contractManagement.isContractChange && parseInt(tab1.detailsSpareParts.detailsList.pastureId) == parseInt(isGroupAdministrator) || parseInt(isEmployeid) == 0" class="filter-item" type="primary" icon="el-icon-edit" :disabled="tab1.detailsSpareParts.detailsList.statued=='终止' || tab1.detailsSpareParts.detailsList.statued=='已过期' || tab1.detailsSpareParts.detailsList.statued=='新增未通过'" @click="handleTab1Change2">变更</el-button>
|
|
|
<el-button v-if="tab1.contractManagement.isContractExport" class="filter-item" type="primary" icon="el-icon-edit" @click="handleTab1Export2">导出</el-button>
|
|
|
+ <el-button v-if="tab1.contractManagement.isContractUplaod" class="filter-item" type="success" icon="el-icon-upload2" @click="sapUpload">SAP上传</el-button>
|
|
|
</div>
|
|
|
<el-table
|
|
|
:key="tab1.detailsSpareParts.tableKey"
|
|
@@ -991,7 +992,7 @@
|
|
|
|
|
|
<script>
|
|
|
// 引入
|
|
|
-import { GetDataByName, GetDataByNames, checkButtons, ExecDataByConfig, UpdateDataRelation, PostDataByName, failproccess } from '@/api/common'
|
|
|
+import { GetDataByName, GetDataByNames, checkButtons, ExecDataByConfig, UpdateDataRelation, PostDataByName, failproccess,postJson } from '@/api/common'
|
|
|
import waves from '@/directive/waves'
|
|
|
import { parseTime, json2excel, sortChange } from '@/utils/index.js'
|
|
|
import Pagination from '@/components/Pagination'
|
|
@@ -1055,6 +1056,7 @@ export default {
|
|
|
radioAll: '全部',
|
|
|
isContractAdd: [],
|
|
|
isContractExport: [],
|
|
|
+ isContractUplaod: [],
|
|
|
isContractSee: [],
|
|
|
isContractChange: [],
|
|
|
isDisabled: false,
|
|
@@ -1376,6 +1378,10 @@ export default {
|
|
|
const ContractExport = 'customs:contract:export'
|
|
|
const isContractExport = checkButtons(this.$store.state.user.buttons, ContractExport)
|
|
|
this.tab1.contractManagement.isContractExport = isContractExport
|
|
|
+ // SAP上传
|
|
|
+ const ContractUplaod = 'customs:contract:sapupload'
|
|
|
+ const isContractUplaod = checkButtons(this.$store.state.user.buttons, ContractUplaod)
|
|
|
+ this.tab1.contractManagement.isContractUplaod = isContractUplaod
|
|
|
// 变更
|
|
|
const ContractChange = 'customs:contract:change'
|
|
|
const isContractChange = checkButtons(this.$store.state.user.buttons, ContractChange)
|
|
@@ -2922,6 +2928,30 @@ export default {
|
|
|
json2excel(ExcelDatas, '合同明细', true, 'xlsx')
|
|
|
})
|
|
|
})
|
|
|
+ },
|
|
|
+ sapUpload(){
|
|
|
+ if(this.selectList.length == 0){
|
|
|
+ this.$notify({ title: '失败', message: '请勾选数据!' , type: 'error', duration: 2000 })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let url = 'authdata/contract/push'
|
|
|
+ let ids = []
|
|
|
+ this.selectList.forEach((i)=>{
|
|
|
+ ids.push(i.id)
|
|
|
+ console.log(i,'===')
|
|
|
+ })
|
|
|
+ let data = {
|
|
|
+ pastureId:parseInt(Cookies.get('pastureid')),
|
|
|
+ providerId:this.tab1.detailsSpareParts.detailsList.providerId,
|
|
|
+ contractIdList:ids
|
|
|
+ }
|
|
|
+ postJson(url,data).then(response => {
|
|
|
+ if (response.msg !== 'fail') {
|
|
|
+ this.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
|
|
|
+ } else {
|
|
|
+ this.$notify({ title: '上传失败', message: response.data, type: 'warning', duration: 2000 })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2930,4 +2960,12 @@ export default {
|
|
|
/deep/ .el-badge__content.is-fixed{
|
|
|
z-index: 1;
|
|
|
}
|
|
|
+ .el-notification__content {
|
|
|
+ white-space: pre-line !important;
|
|
|
+ }
|
|
|
+</style>
|
|
|
+<style lang="scss">
|
|
|
+ .el-notification__content {
|
|
|
+ white-space: pre-line !important;
|
|
|
+ }
|
|
|
</style>
|