|
|
@@ -357,41 +357,41 @@
|
|
|
import oilsupplierApi from '@/api/oilsupplier/annualaudit'
|
|
|
import util from '../../../utils/util'
|
|
|
export default {
|
|
|
- computed:{
|
|
|
+ computed: {
|
|
|
...mapGetters({
|
|
|
authUser: 'authUser'
|
|
|
}),
|
|
|
- tableFun:function(){
|
|
|
- return function(name,item){
|
|
|
- if(name == 'ContractClass'){
|
|
|
+ tableFun: function () {
|
|
|
+ return function (name, item) {
|
|
|
+ if (name === 'ContractClass') {
|
|
|
var items = String(item)
|
|
|
- switch(items){
|
|
|
+ switch (items) {
|
|
|
case '01':
|
|
|
return '供应商'
|
|
|
- break;
|
|
|
+ break;
|
|
|
case '02':
|
|
|
return '承包商'
|
|
|
- break;
|
|
|
+ break;
|
|
|
case '03':
|
|
|
return '服务商'
|
|
|
- break;
|
|
|
+ break;
|
|
|
default:
|
|
|
- return '--'
|
|
|
+ return '--'
|
|
|
}
|
|
|
- }else if(name == 'Status'){
|
|
|
+ } else if (name === 'Status') {
|
|
|
var items = Number(item)
|
|
|
- switch(items){
|
|
|
+ switch (items) {
|
|
|
case 1:
|
|
|
return '未履行'
|
|
|
- break;
|
|
|
+ break;
|
|
|
case 2:
|
|
|
return '履行中'
|
|
|
- break;
|
|
|
+ break;
|
|
|
case 3:
|
|
|
return '已完结'
|
|
|
- break;
|
|
|
+ break;
|
|
|
default:
|
|
|
- return '--'
|
|
|
+ return '--'
|
|
|
}
|
|
|
} else if (name === 'OpenDate' || name === 'EndDate' || name === 'PlanFinishDate' || name === 'SubmitDate') {
|
|
|
let timeString = this.timeStyle(item)
|
|
|
@@ -401,39 +401,39 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- SupplierNameDataFun:function(){
|
|
|
- return function(name,k){
|
|
|
- var list = this.SupplierNameData.filter(function(x, index) {
|
|
|
- return x.SupplierName.indexOf(name)!=-1;
|
|
|
- });
|
|
|
- if(list.length == 1){
|
|
|
+ SupplierNameDataFun: function () {
|
|
|
+ return function (name, k) {
|
|
|
+ var list = this.SupplierNameData.filter(function (x, index) {
|
|
|
+ return x.SupplierName.indexOf(name) != -1
|
|
|
+ })
|
|
|
+ if (list.length == 1) {
|
|
|
this.tableDataList.tableData[k].SupplierName = list[0].SupplierName
|
|
|
this.tableDataList.tableData[k].SupplierId = list[0].Id
|
|
|
}
|
|
|
- if(list.length == 0){
|
|
|
+ if (list.length == 0) {
|
|
|
return this.SupplierNameData
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return list
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
name: 'oilcontract',
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
- uploadTrueClickLoading:false,
|
|
|
- rules:{
|
|
|
- name: [
|
|
|
- { required: true, message: '请输入名称', trigger: 'change' },
|
|
|
- ],
|
|
|
- ContractClass: [
|
|
|
- { required: true, message: '请输入名称', trigger: 'change' },
|
|
|
- ],
|
|
|
+ uploadTrueClickLoading: false,
|
|
|
+ rules: {
|
|
|
+ name: [
|
|
|
+ { required: true, message: '请输入名称', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ ContractClass: [
|
|
|
+ { required: true, message: '请输入名称', trigger: 'change' }
|
|
|
+ ]
|
|
|
},
|
|
|
- ContractSelectName:'',
|
|
|
+ ContractSelectName: '',
|
|
|
options: [],
|
|
|
- SupplierNameData:[],
|
|
|
- dialogVisibleContract:false,
|
|
|
+ SupplierNameData: [],
|
|
|
+ dialogVisibleContract: false,
|
|
|
uploadshow: false,
|
|
|
Excelurl: '',
|
|
|
importDialogVisible: false,
|
|
|
@@ -441,29 +441,29 @@
|
|
|
showimportvisible: false,
|
|
|
|
|
|
|
|
|
- evaluateBoolean:false,
|
|
|
- deleteBoolean:false,
|
|
|
+ evaluateBoolean: false,
|
|
|
+ deleteBoolean: false,
|
|
|
// 控制删除框
|
|
|
- deleteConfirmFlagIndex:null,
|
|
|
+ deleteConfirmFlagIndex: null,
|
|
|
|
|
|
dialogVisible: false,
|
|
|
- //列表数据
|
|
|
+ // 列表数据
|
|
|
entityList: [],
|
|
|
- //分页参数
|
|
|
+ // 分页参数
|
|
|
size: 10,
|
|
|
currentPage: 1,
|
|
|
currentItemCount: 0,
|
|
|
- //列表排序
|
|
|
+ // 列表排序
|
|
|
Column: {
|
|
|
Order: '',
|
|
|
Prop: ''
|
|
|
},
|
|
|
- //查询时间new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()
|
|
|
+ // 查询时间new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()
|
|
|
CreateOn: [],
|
|
|
- //查询项
|
|
|
+ // 查询项
|
|
|
searchFormReset: {},
|
|
|
- tableDataList:{
|
|
|
- tableData:[],
|
|
|
+ tableDataList: {
|
|
|
+ tableData: []
|
|
|
},
|
|
|
|
|
|
searchForm: {
|
|
|
@@ -500,7 +500,7 @@
|
|
|
CreateBy: '',
|
|
|
ModifiedOn: '',
|
|
|
ModifiedUserId: '',
|
|
|
- ModifiedBy: '',
|
|
|
+ ModifiedBy: ''
|
|
|
},
|
|
|
formData: {
|
|
|
Id: '',
|
|
|
@@ -537,32 +537,32 @@
|
|
|
// ModifiedOn: '',
|
|
|
// ModifiedUserId: '',
|
|
|
// ModifiedBy: '',
|
|
|
- //缺少
|
|
|
+ // 缺少
|
|
|
SubPackage: 0,
|
|
|
ContractClass: '',
|
|
|
- ContractSonClass:'',
|
|
|
- SmallClass:'',
|
|
|
- SignedDate:'',
|
|
|
- People:'',
|
|
|
- Number:'',
|
|
|
- ChooseWay:'',
|
|
|
- ContractMark:'',
|
|
|
- Currency:'',
|
|
|
- BudgetAmount:'',
|
|
|
- PerformAmount:'',
|
|
|
- IsInternal:'',
|
|
|
- IsForeign:'',
|
|
|
- IsDeal:'',
|
|
|
- MoneyFlows:'',
|
|
|
- MoneyChannel:'',
|
|
|
- MoneyChannelSon:'',
|
|
|
- MoneyChannelSmall:'',
|
|
|
- SingUnit:'',
|
|
|
- Place:'',
|
|
|
- DisputeResolution:'',
|
|
|
- SubmitDate:'',
|
|
|
- SealName:'',
|
|
|
- PoNumber:'',
|
|
|
+ ContractSonClass: '',
|
|
|
+ SmallClass: '',
|
|
|
+ SignedDate: '',
|
|
|
+ People: '',
|
|
|
+ Number: '',
|
|
|
+ ChooseWay: '',
|
|
|
+ ContractMark: '',
|
|
|
+ Currency: '',
|
|
|
+ BudgetAmount: '',
|
|
|
+ PerformAmount: '',
|
|
|
+ IsInternal: '',
|
|
|
+ IsForeign: '',
|
|
|
+ IsDeal: '',
|
|
|
+ MoneyFlows: '',
|
|
|
+ MoneyChannel: '',
|
|
|
+ MoneyChannelSon: '',
|
|
|
+ MoneyChannelSmall: '',
|
|
|
+ SingUnit: '',
|
|
|
+ Place: '',
|
|
|
+ DisputeResolution: '',
|
|
|
+ SubmitDate: '',
|
|
|
+ SealName: '',
|
|
|
+ PoNumber: ''
|
|
|
},
|
|
|
tableColumns: [
|
|
|
// {
|
|
|
@@ -572,205 +572,203 @@
|
|
|
// sort: true
|
|
|
// },
|
|
|
{
|
|
|
- prop: "SupplierName",
|
|
|
+ prop: 'SupplierName',
|
|
|
label: '企业名称',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "ProjectName",
|
|
|
+ prop: 'ProjectName',
|
|
|
label: '项目名称',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
{
|
|
|
- prop: "Status",
|
|
|
+ prop: 'Status',
|
|
|
label: '合同状态',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
{
|
|
|
- prop: "ContractClass",
|
|
|
+ prop: 'ContractClass',
|
|
|
label: '项目类别',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "ContractNo",
|
|
|
+ prop: 'ContractNo',
|
|
|
label: '合同编号',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "ProjectPlace",
|
|
|
+ prop: 'ProjectPlace',
|
|
|
label: '工程地点',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "ProjectOwner",
|
|
|
+ prop: 'ProjectOwner',
|
|
|
label: '项目负责人',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "Telephone",
|
|
|
+ prop: 'Telephone',
|
|
|
label: '联系人电话',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "ProjectTypeName",
|
|
|
+ prop: 'ProjectTypeName',
|
|
|
label: '项目类别名称',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "ContractMode",
|
|
|
+ prop: 'ContractMode',
|
|
|
label: '合同模式',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "Amount",
|
|
|
+ prop: 'Amount',
|
|
|
label: '合同总金额(万元)',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "ContractPeriod",
|
|
|
+ prop: 'ContractPeriod',
|
|
|
label: '合同总工期(天)',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "OpenDate",
|
|
|
+ prop: 'OpenDate',
|
|
|
label: '开工日期',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "PlanFinishDate",
|
|
|
+ prop: 'PlanFinishDate',
|
|
|
label: '计划竣工时间',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "ConstructionUnit",
|
|
|
+ prop: 'ConstructionUnit',
|
|
|
label: '建设单位',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "ConstructionOwner",
|
|
|
+ prop: 'ConstructionOwner',
|
|
|
label: '建设负责人',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "ConstructionTelphone",
|
|
|
+ prop: 'ConstructionTelphone',
|
|
|
label: '手机号',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "BuildUnit",
|
|
|
+ prop: 'BuildUnit',
|
|
|
label: '施工单位',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "BuildOwner",
|
|
|
+ prop: 'BuildOwner',
|
|
|
label: '施工负责人',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "BuildTelphone",
|
|
|
+ prop: 'BuildTelphone',
|
|
|
label: '手机号',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "SuperviseUnit",
|
|
|
+ prop: 'SuperviseUnit',
|
|
|
label: '监理单位',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "SuperviseOwner",
|
|
|
+ prop: 'SuperviseOwner',
|
|
|
label: '监理负责人',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "SuperviseTelphone",
|
|
|
+ prop: 'SuperviseTelphone',
|
|
|
label: '手机号',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "QualityUnit",
|
|
|
+ prop: 'QualityUnit',
|
|
|
label: '质量监督单位',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "QualityOwner",
|
|
|
+ prop: 'QualityOwner',
|
|
|
label: '质量监督负责人',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "QualityTelphone",
|
|
|
+ prop: 'QualityTelphone',
|
|
|
label: '手机号',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: "Remark",
|
|
|
+ prop: 'Remark',
|
|
|
label: '备注',
|
|
|
width: 100,
|
|
|
sort: true
|
|
|
- }],
|
|
|
+ }]
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
- created() {
|
|
|
- //查询条件初始值备份
|
|
|
+ created () {
|
|
|
+ // 查询条件初始值备份
|
|
|
Object.assign(this.searchFormReset, this.searchForm);
|
|
|
- //查询列表
|
|
|
- this.initDatas();
|
|
|
- //this.getDictOptions()
|
|
|
+ // 查询列表
|
|
|
+ this.initDatas()
|
|
|
+ // this.getDictOptions()
|
|
|
// 状态判断
|
|
|
this.statusFun()
|
|
|
|
|
|
this.contractSelete()
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
timeStyle (item) {
|
|
|
@@ -779,28 +777,28 @@
|
|
|
}
|
|
|
return util.formatDate('year', item)
|
|
|
},
|
|
|
- onSelectContractClass(e){
|
|
|
- var that = this;
|
|
|
- setTimeout(function() {
|
|
|
- that.$set(that.tableDataList.tableData[e],'SupplierName', that.$refs.supplierIdSelect.selectedLabel)
|
|
|
+ onSelectContractClass (e) {
|
|
|
+ var that = this
|
|
|
+ setTimeout(function () {
|
|
|
+ that.$set(that.tableDataList.tableData[e], 'SupplierName', that.$refs.supplierIdSelect.selectedLabel)
|
|
|
// that.tableDataList.tableData[e].SupplierName = that.$refs.supplierIdSelect.selectedLabel
|
|
|
- }, 200);
|
|
|
+ }, 200)
|
|
|
console.log(that.tableDataList.tableData)
|
|
|
},
|
|
|
- contractSelete(){
|
|
|
+ contractSelete () {
|
|
|
oilsupplierApi.getSupListCode(this.$axios).then(res => {
|
|
|
- console.log('企业名称数据',res)
|
|
|
+ console.log('企业名称数据', res)
|
|
|
this.SupplierNameData = res.data.items
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- uploadTrueClick(){
|
|
|
+ uploadTrueClick () {
|
|
|
this.$refs['ruleForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.uploadTrueClickLoading = true
|
|
|
- this.tableDataList.tableData.map((item,index) => {
|
|
|
- this.tableDataList.tableData[index].IsDeal = this.tableDataList.tableData[index].IsDeal=='是'?1:0
|
|
|
+ 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):''
|
|
|
@@ -809,15 +807,15 @@
|
|
|
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 = {
|
|
|
- Items:this.tableDataList.tableData
|
|
|
+ Items: this.tableDataList.tableData
|
|
|
}
|
|
|
- data = JSON.parse(JSON.stringify( data ))
|
|
|
+ data = JSON.parse(JSON.stringify(data))
|
|
|
api.saveImportExcel(data, this.$axios).then(res => {
|
|
|
- if(res.data.code==0){
|
|
|
+ if (res.data.code==0) {
|
|
|
this.dialogVisibleContract = false
|
|
|
this.$message({type: 'success', message: String(res.data.message)})
|
|
|
this.clearSearch()
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.$message({type: 'error', message: String(res.data.message)})
|
|
|
}
|
|
|
this.uploadTrueClickLoading = false
|