2
3
王宇昕 5 лет назад
Родитель
Сommit
efd60cb4f6

+ 2 - 2
src/dashoo.cn/frontend_web/nuxt.config.js

@@ -172,9 +172,9 @@ module.exports = {
 
   axios: {
     // baseURL: '//192.168.1.44:10091/api/' // 本机开发使用
-     // baseURL: '//localhost:10091/api/' // 本机开发使用
+     baseURL: '//localhost:10091/api/' // 本机开发使用
     // baseURL: '//192.168.1.41:10091/api/' // 本机开发使用
-    baseURL: '//192.168.124.13:10091/api/' // 本机开发使用
+    // baseURL: '//192.168.124.13:10091/api/' // 本机开发使用
 
     /* --------Nuxt Start发版用 START-------------- */
     // baseURL: '/api/'

+ 16 - 7
src/dashoo.cn/frontend_web/package-lock.json

@@ -601,12 +601,11 @@
       "dev": true
     },
     "axios": {
-      "version": "0.16.2",
-      "resolved": "https://registry.npmjs.org/axios/-/axios-0.16.2.tgz",
-      "integrity": "sha1-uk+S8XFn37q0CYN4VFS5rBScPG0=",
+      "version": "0.20.0",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-0.20.0.tgz",
+      "integrity": "sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA==",
       "requires": {
-        "follow-redirects": "^1.2.3",
-        "is-buffer": "^1.1.5"
+        "follow-redirects": "^1.10.0"
       }
     },
     "babel-cli": {
@@ -5649,8 +5648,7 @@
     },
     "js-yaml": {
       "version": "3.7.0",
-      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz",
-      "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=",
+      "resolved": "",
       "requires": {
         "argparse": "^1.0.7",
         "esprima": "^2.6.0"
@@ -11077,6 +11075,17 @@
         "mkdirp": "~0.5.1",
         "sax": "~1.2.1",
         "whet.extend": "~0.9.9"
+      },
+      "dependencies": {
+        "js-yaml": {
+          "version": "3.7.0",
+          "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz",
+          "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=",
+          "requires": {
+            "argparse": "^1.0.7",
+            "esprima": "^2.6.0"
+          }
+        }
       }
     },
     "table": {

+ 1 - 1
src/dashoo.cn/frontend_web/package.json

@@ -18,7 +18,7 @@
   },
   "dependencies": {
     "@nuxtjs/axios": "^4.4.0",
-    "axios": "^0.16.2",
+    "axios": "^0.20.0",
     "chart.js": "^2.7.0",
     "cross-env": "^5.1.1",
     "echarts": "^3.8.5",

+ 1 - 1
src/dashoo.cn/frontend_web/src/assets/styles/common.css

@@ -18,4 +18,4 @@
 }
 .advancedsearchFormClass /deep/ .el-form-item{
   height: 40px;
-}
+}

+ 13 - 2
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-basis-year-check/index.vue

@@ -12,7 +12,7 @@
           <i class="icon icon-table2"></i> 合同表
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">导入</el-button>
+          <!-- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">导入</el-button> -->
           <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出</el-button>
         </span>
         <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
@@ -120,11 +120,22 @@
           </template>
         </el-table-column> -->
 
-        <el-table-column sortable show-overflow-tooltip prop="Conclusion" label="评价结果" header-align="center" >
+        <el-table-column sortable show-overflow-tooltip prop="Conclusion" label="评价结果" header-align="center" width="110">
           <template slot-scope="scope">
             {{evaluateFun(scope.row.Conclusion)}}
           </template>
         </el-table-column>
+        <el-table-column sortable show-overflow-tooltip prop="Result1" label="业绩评价结果" header-align="center" width="150">
+          <template slot-scope="scope">
+            {{scope.row.Result1}}
+          </template>
+        </el-table-column>
+        <el-table-column sortable show-overflow-tooltip prop="Result2" label="基本条件评价结果" header-align="center" width="160">
+          <template slot-scope="scope">
+            {{scope.row.Result2}}
+          </template>
+        </el-table-column>
+
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
                      :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-basis-year/index.vue

@@ -12,7 +12,7 @@
           <i class="icon icon-table2"></i> 合同表
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">导入</el-button>
+          <!-- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">导入</el-button> -->
           <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出</el-button>
         </span>
         <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">

+ 16 - 6
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-goods-year-check/index.vue

@@ -12,7 +12,7 @@
           <i class="icon icon-table2"></i> 合同表
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">导入</el-button>
+          <!-- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">导入</el-button> -->
           <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出</el-button>
           <!-- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="onChangeSelect">{{selectBoolean?'取消':'一键处理'}}</el-button>
           <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" v-if="selectBoolean" @click="onChangeSelectSubmit">处理</el-button> -->
@@ -74,17 +74,27 @@
         <el-table-column sortable show-overflow-tooltip prop="Year" header-align="center" width="130" label="年度"></el-table-column>
         <el-table-column sortable show-overflow-tooltip prop="SumScore" header-align="center" label="评价得分(100分)" width="120"></el-table-column>
         <el-table-column sortable show-overflow-tooltip label="评价内容及得分" header-align="center">
-          <el-table-column sortable show-overflow-tooltip prop="SumScore1" header-align="center" label="产品质量(30分)" width="120"></el-table-column>
-          <el-table-column sortable show-overflow-tooltip prop="SumScore2" header-align="center" label="合同履约(20分)" width="120"></el-table-column>
-          <el-table-column sortable show-overflow-tooltip prop="SumScore3" header-align="center" label="售后服务(15分)" width="120"></el-table-column>
-          <el-table-column sortable show-overflow-tooltip prop="SumScore4" header-align="center" label="诚信经营(15分)" width="120"></el-table-column>
-          <el-table-column sortable show-overflow-tooltip prop="SumScore5" header-align="center" label="协同响应(20分)" width="120"></el-table-column>
+          <el-table-column sortable show-overflow-tooltip prop="SumScore1" header-align="center" label="产品质量(30分)" width="140"></el-table-column>
+          <el-table-column sortable show-overflow-tooltip prop="SumScore2" header-align="center" label="合同履约(20分)" width="140"></el-table-column>
+          <el-table-column sortable show-overflow-tooltip prop="SumScore3" header-align="center" label="售后服务(15分)" width="140"></el-table-column>
+          <el-table-column sortable show-overflow-tooltip prop="SumScore4" header-align="center" label="诚信经营(15分)" width="140"></el-table-column>
+          <el-table-column sortable show-overflow-tooltip prop="SumScore5" header-align="center" label="协同响应(20分)" width="140"></el-table-column>
         </el-table-column>
         <el-table-column sortable show-overflow-tooltip prop="Conclusion" label="评价结果" header-align="center" >
           <template slot-scope="scope">
             {{evaluateFun(scope.row.Conclusion)}}
           </template>
         </el-table-column>
+        <el-table-column sortable show-overflow-tooltip prop="Result1" label="业绩评价结果" header-align="center" width="150">
+          <template slot-scope="scope">
+            {{scope.row.Result1}}
+          </template>
+        </el-table-column>
+        <el-table-column sortable show-overflow-tooltip prop="Result2" label="基本条件评价结果" header-align="center" width="160">
+          <template slot-scope="scope">
+            {{scope.row.Result2}}
+          </template>
+        </el-table-column>
 
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-goods-year/index.vue

@@ -12,7 +12,7 @@
           <i class="icon icon-table2"></i> 合同表
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">导入</el-button>
+          <!-- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">导入</el-button> -->
           <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出</el-button>
         </span>
         <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">

+ 23 - 11
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-import/_opera/operation.vue

@@ -189,22 +189,33 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="履行金额" prop="PerformAmount">
-              <el-input v-model="formData.PerformAmount" placeholder="请输入"  style="width: 100%"></el-input>
+              <el-input v-model="formData.PerformAmount" placeholder="请输入"   style="width: 100%">
+                <template slot="append">(万元)</template>
+              </el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="是否内部合同" prop="IsInternal">
-              <el-input v-model="formData.IsInternal" placeholder="请输入"  style="width: 100%"></el-input>
+              <el-select placeholder="请选择" v-model="formData.IsInternal" style="width: 100%">
+                <el-option :key="1" label="是" :value="1"></el-option>
+                <el-option :key="0" label="否" :value="0"></el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="是否涉外合同" prop="IsForeign">
-              <el-input v-model="formData.IsForeign" placeholder="请输入"  style="width: 100%"></el-input>
+              <el-select placeholder="请选择" v-model="formData.IsForeign" style="width: 100%">
+                <el-option :key="1" label="是" :value="1"></el-option>
+                <el-option :key="0" label="否" :value="0"></el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="是否关联交易" prop="IsDeal">
-              <el-input v-model="formData.IsDeal" placeholder="请输入"  style="width: 100%"></el-input>
+              <el-select placeholder="请选择" v-model="formData.IsDeal" style="width: 100%">
+                <el-option :key="1" label="是" :value="1"></el-option>
+                <el-option :key="0" label="否" :value="0"></el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -493,7 +504,7 @@
             { validator: PlanFinishDateVar, trigger: 'change' }
           ],
           Amount:[
-            {  message: '请输入', trigger: 'blur' },
+            { required: true, message: '请输入', trigger: 'blur' },
             {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/,  message: '输入格式不正确', trigger: 'blur'},
           ],
           ContractPeriod:[
@@ -527,15 +538,16 @@
           ],
           PerformAmount:[
             { required: true, message: '请输入', trigger: 'blur' },
+            {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/,  message: '输入格式不正确', trigger: 'blur'},
           ],
           IsInternal:[
-            { required: true, message: '请输入', trigger: 'blur' },
+            { required: true, message: '请输入', trigger: 'change' },
           ],
           IsForeign:[
-            { required: true, message: '请输入', trigger: 'blur' },
+            { required: true, message: '请输入', trigger: 'change' },
           ],
           IsDeal:[
-            { required: true, message: '请输入', trigger: 'blur' },
+            { required: true, message: '请输入', trigger: 'change' },
           ],
           MoneyFlows:[
             { required: true, message: '请输入', trigger: 'blur' },
@@ -626,9 +638,9 @@
           Currency:'',
           BudgetAmount:'',
           PerformAmount:'',
-          IsInternal:'',
-          IsForeign:'',
-          IsDeal:'',
+          IsInternal:0,
+          IsForeign:0,
+          IsDeal:0,
           MoneyFlows:'',
           MoneyChannel:'',
           MoneyChannelSon:'',

+ 24 - 25
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-import/index.vue

@@ -252,7 +252,7 @@
 
 
     <el-dialog
-      title="合同信息"
+      title="合同导入"
       :visible.sync="dialogVisibleContract"
       :close-on-click-modal="false"
       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="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="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="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>
@@ -332,7 +332,7 @@
       <el-form label-width="100px">
         <el-row>
           <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">
               <el-button size="small" type="primary">点击上传</el-button>
             </el-upload>
@@ -399,7 +399,6 @@
       },
       SupplierNameDataFun:function(){
         return function(name,k){
-          // var list = []
           var list = this.SupplierNameData.filter(function(x, index) {
             return x.SupplierName.indexOf(name)!=-1;
           });
@@ -791,27 +790,31 @@
         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[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 = {
               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
-              console.log('保存合同',res.data)
             }).catch(err => {
               this.uploadTrueClickLoading = false
+              this.$message({type: 'warning', message: '导入失败'})
             })
           } else {
             this.$message({type: 'warning', message: '请填写完整才能导入哦'})
@@ -832,11 +835,6 @@
         api.importExcel(params, this.$axios).then(res => {
           this.importloading = false
           if (res.data.code === 0) {
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            })
-            // this.initDatas()
             this.dialogVisibleContract = true
             for(var key in res.data.item){
               console.log(key,res.data.item[key])
@@ -844,7 +842,6 @@
 
               this.tableDataList.tableData.push(res.data.item[key])
             }
-            console.log(22222222222222,this.tableDataList.tableData)
           } else if (res.data.code === -1) {
             this.errorDialogVisible = true
             this.textarea = res.data.message
@@ -1041,6 +1038,7 @@
         this.uploadshow = true
       },
       beforeRemove(){
+        this.Excelurl = ''
         return true
       },
       uploadrequest (option) {
@@ -1055,6 +1053,7 @@
                 } else {
                   option.action = `http://${res.data.publicUrl}/${res.data.fid}`
                 }
+                console.log(option)
                 uploadajax(option)
                 _this.Excelurl = option.action
               } else {

+ 15 - 5
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-service-year-check/index.vue

@@ -15,7 +15,7 @@
           <!-- <router-link :to="'/oilcontract/contract-basis-year-single/add/operation'">
             <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">添加</el-button>
           </router-link> -->
-          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">导入</el-button>
+          <!-- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">导入</el-button> -->
           <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出</el-button>
           <!-- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="onChangeSelect">{{selectBoolean?'取消':'一键处理'}}</el-button>
           <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" v-if="selectBoolean" @click="onChangeSelectSubmit">处理</el-button> -->
@@ -84,16 +84,26 @@
         <el-table-column sortable show-overflow-tooltip prop="SumScore" header-align="center" label="评价得分" width="120"></el-table-column>
 
         <el-table-column sortable show-overflow-tooltip label="评价内容及得分" align="center">
-          <el-table-column sortable show-overflow-tooltip prop="SumScore1" align="center" label="项目管理(40分)" width="120"></el-table-column>
-          <el-table-column sortable show-overflow-tooltip prop="SumScore2" align="center" label="HSE管理(30分)" width="120"></el-table-column>
-          <el-table-column sortable show-overflow-tooltip prop="SumScore3" align="center" label="合同履行(15分)" width="120"></el-table-column>
-          <el-table-column sortable show-overflow-tooltip prop="SumScore4" align="center" label="企业诚信(15分)" width="120"></el-table-column>
+          <el-table-column sortable show-overflow-tooltip prop="SumScore1" align="center" label="项目管理(40分)" width="140"></el-table-column>
+          <el-table-column sortable show-overflow-tooltip prop="SumScore2" align="center" label="HSE管理(30分)" width="140"></el-table-column>
+          <el-table-column sortable show-overflow-tooltip prop="SumScore3" align="center" label="合同履行(15分)" width="140"></el-table-column>
+          <el-table-column sortable show-overflow-tooltip prop="SumScore4" align="center" label="企业诚信(15分)" width="140"></el-table-column>
         </el-table-column>
         <el-table-column sortable show-overflow-tooltip prop="Conclusion" label="评价结果" align="center" >
           <template slot-scope="scope">
             {{evaluateFun(scope.row.Conclusion)}}
           </template>
         </el-table-column>
+        <el-table-column sortable show-overflow-tooltip prop="Result1" label="业绩评价结果" header-align="center" width="150">
+          <template slot-scope="scope">
+            {{scope.row.Result1}}
+          </template>
+        </el-table-column>
+        <el-table-column sortable show-overflow-tooltip prop="Result2" label="基本条件评价结果" header-align="center" width="160">
+          <template slot-scope="scope">
+            {{scope.row.Result2}}
+          </template>
+        </el-table-column>
 
 
         <!--<el-table-column prop="CreateOn" sortable min-width="150" label="生成时间" align="center" show-overflow-tooltip>

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-service-year/index.vue

@@ -12,7 +12,7 @@
           <i class="icon icon-table2"></i> 合同表
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">导入</el-button>
+          <!-- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">导入</el-button> -->
           <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出</el-button>
         </span>
         <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">