zerp 2 anni fa
parent
commit
a3672a9865
37 ha cambiato i file con 15359 aggiunte e 381 eliminazioni
  1. 7 5
      config/index.js
  2. 1 1
      config/prod.env.js
  3. 164 14
      src/api/bid.js
  4. 18 0
      src/api/record.js
  5. 166 8
      src/api/tender.js
  6. 13 1
      src/filters/index.js
  7. 3 3
      src/views/admin/tenant.vue
  8. 23 0
      src/views/admin/user.vue
  9. 539 163
      src/views/bid/index.vue
  10. 465 0
      src/views/bid/tender/dialog.vue
  11. 426 0
      src/views/bid/tender/table.vue
  12. 854 0
      src/views/bid/tender/tender.vue
  13. 773 0
      src/views/bid/tender1.vue
  14. 378 0
      src/views/bid/tender1/dialog.vue
  15. 301 0
      src/views/bid/tender1/table.vue
  16. 838 0
      src/views/bid/tender1/tender.vue
  17. 398 0
      src/views/bid/tender2/dialog.vue
  18. 307 0
      src/views/bid/tender2/table.vue
  19. 827 0
      src/views/bid/tender2/tender.vue
  20. 379 0
      src/views/bid/tender3/dialog.vue
  21. 325 0
      src/views/bid/tender3/table.vue
  22. 859 0
      src/views/bid/tender3/tender.vue
  23. 188 20
      src/views/client/record.vue
  24. 427 0
      src/views/tender/copy.vue
  25. 425 166
      src/views/tender/index.vue
  26. 357 0
      src/views/tender/tender/dialog.vue
  27. 424 0
      src/views/tender/tender/table.vue
  28. 864 0
      src/views/tender/tender/tender.vue
  29. 317 0
      src/views/tender/tender1/dialog.vue
  30. 299 0
      src/views/tender/tender1/table.vue
  31. 922 0
      src/views/tender/tender1/tender.vue
  32. 358 0
      src/views/tender/tender2/dialog.vue
  33. 312 0
      src/views/tender/tender2/table.vue
  34. 887 0
      src/views/tender/tender2/tender.vue
  35. 314 0
      src/views/tender/tender3/dialog.vue
  36. 325 0
      src/views/tender/tender3/table.vue
  37. 876 0
      src/views/tender/tender3/tender.vue

+ 7 - 5
config/index.js

@@ -11,8 +11,10 @@ module.exports = {
         proxyTable: {
             '/': {
                 // target: 'http://47.108.151.62:80/pre', //后端接口地址     中间人运营平台
-                target: 'http://127.0.0.1:28080', //后端接口地址   
-                // target: 'http://192.168.3.8:7001', //后端接口地址   
+                // target: 'http://47.108.151.62', //后端接口地址   
+                // target: 'http://192.168.3.5:7001', //后端接口地址   
+                target: 'http://127.0.0.1:28081', //后端接口地址   
+                // target: 'http://47.108.14.99:7001/', //后端接口地址   
                 changeOrigin: true, //是否跨域
                 pathRewrite: {
                     '^/': '/', //重写,
@@ -22,8 +24,8 @@ module.exports = {
         },
 
         // 本地开发使用   192.168.0.126  localhost
-        host: '127.0.0.1',
-        // host: '192.168.124.14',
+        host: '192.168.3.7',
+        // host: '192.168.124.10',
         port: 8081,
         autoOpenBrowser: true,
         errorOverlay: true,
@@ -39,7 +41,7 @@ module.exports = {
         index: path.resolve(__dirname, '../dist/index.html'),
         assetsRoot: path.resolve(__dirname, '../dist'),
         assetsSubDirectory: 'static',
-        assetsPublicPath: '/bid/',
+        assetsPublicPath: '/tender/',
 
         productionSourceMap: false,
         devtool: 'source-map',

+ 1 - 1
config/prod.env.js

@@ -1,5 +1,5 @@
 module.exports = {
   NODE_ENV: '"production"',
   ENV_CONFIG: '"prod"',
-  BASE_API: '"/pre"'
+  BASE_API: '"/bidding"'
 }

+ 164 - 14
src/api/bid.js

@@ -1,43 +1,65 @@
 import request from '@/utils/request'
 
+
+/***
+ *   物流相关接口
+ * 
+ * * */
 // 获取列表
 export function getTableList(parms) {
   return request({
-    url: '/tender/query',
-    method: 'post',
-    data: parms
+    url: '/common/tender',
+    method: 'get',
+    params: parms
   })
 }
-// 获取列表
+// 获取列表   --  物流
 export function getQueryId(parms) {
   return request({
-    url: '/bidding/query-by-tender-id',
-    method: 'post',
-    data: parms
+    url: '/logistics',
+    // url: '/common/tender/logistics',
+    method: 'get',
+    params: parms
   })
 }
+
 // 修改列表
 export function getQueryEdit(parms) {
   return request({
-    url: '/tender/update',
-    method: 'post',
+    url: '/common/tender/update',
+    method: 'put',
     data: parms
   })
 }
+// 获取列表
+export function getLogisticsInfo(parms) {
+  return request({
+    url: '/bidding/logistics/info',
+    method: 'get',
+    params: parms
+  })
+}
+// 已投递列表
+export function getLogisticsList(parms) {
+  return request({
+    url: '/logistics/tender',
+    method: 'get',
+    params: parms
+  })
+}
 // 添加列表
 export function getQueryAdd(parms) {
   return request({
-    url: '/tender/new',
+    url: '/common/tender',
     method: 'post',
     data: parms
   })
 }
 // 作废列表
-export function getQueryDelete(parms) {
+export function getQueryDelete(tenderType,tenderParentId) {
   return request({
-    url: '/tender/delete',
-    method: 'post',
-    data: parms
+    url: '/common/tender/'+ tenderType+"/"+tenderParentId,
+    method: 'PUT',
   })
 }
 
@@ -49,3 +71,131 @@ export function loadCustomer(parms) {
     params: parms
   })
 }
+
+// 获取下载模板URL
+export function apiFile(value){
+  return request({
+    url:"/file/template/" + value,
+    method:"get"
+  })
+}
+
+
+/**
+ * 获取客户
+ * 
+ * ** */
+
+export function getCustomerName(parms) {
+  return request({
+    url: '/customer/customerName',
+    method: 'get',
+    params: parms
+  })
+}
+
+// 置中标
+export function getContract(tenderld,biddingld,tenderType){
+  return request({
+    url:"/common/tender/success/contract/" +tenderld +"/"+biddingld+"/"+tenderType,
+    method:"get"
+  })
+}
+ 
+
+/***
+ * 
+ * 销售相关
+ * 
+ * * */
+
+  // 获取列表   --  销售
+export function getSaleId(parms) {
+  return request({
+    url: '/tender/sale/page',
+    // url: '/common/tender/logistics',
+    method: 'get',
+    params: parms
+  })
+}
+// 已投递列表
+export function getBiddingSaleList(parms) {
+  return request({
+    url: '/tender/sale',
+    method: 'get',
+    params: parms
+  })
+}
+
+// 标的详情
+export function getBiddingSaleInfo(parms) {
+  return request({
+    url: '/bidding/sale',
+    method: 'get',
+    params: parms
+  })
+}
+
+
+
+/**
+ *   原料相关接口
+ * 
+ * * */
+
+export function getTenderRaw(parms) {
+  return request({
+    url: '/tender/raw',
+    // url: '/common/tender/logistics',
+    method: 'get',
+    params: parms
+  })
+}
+// 已投递列表
+export function getTenderRawList(parms) {
+  return request({
+    url: '/tender/raw/info',
+    method: 'get',
+    params: parms
+  })
+}
+
+// 标的详情
+export function getBiddingRowInfo(parms) {
+  return request({
+    url: ' /bidding/raw',
+    method: 'get',
+    params: parms
+  })
+}
+
+/**
+ * 加工承揽
+ * 
+ * ** */
+
+export function getTenderProcessing(parms) {
+  return request({
+    url: '/tender/processing',
+    // url: '/common/tender/logistics',
+    method: 'get',
+    params: parms
+  })
+}
+// 已投递列表
+export function getTenderInfoList(parms) {
+  return request({
+    url: '/tender/processing/info',
+    method: 'get',
+    params: parms
+  })
+}
+// 标的详情
+export function getBiddingList(parms) {
+  return request({
+    url: '/bidding/processing',
+    method: 'get',
+    params: parms
+  })
+}
+// 

+ 18 - 0
src/api/record.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { method } from 'lodash'
 
 // 获取所有配置价格
 export function customerList(parms) {
@@ -49,3 +50,20 @@ export function userRoles() {
   })
 }
 
+// 获取下载模板URL
+
+export function apiFile(){
+  return request({
+    url:"/file/template/customer",
+    method:"get"
+  })
+}
+
+// 批量上传客户
+export function addBatch(data){
+  return request({
+    url:"/customer/batch",
+    method:"post",
+    data:data
+  })
+}

+ 166 - 8
src/api/tender.js

@@ -1,21 +1,43 @@
 import request from '@/utils/request'
-
+  /***
+   *    物流相关接口
+   * 
+   * * */
 // 获取列表
 export function getTableList(parms) {
   return request({
-    url: '/tender/search',
-    method: 'post',
-    data: parms
+    url: '/common/tender',
+    method: 'get',
+    params: parms
   })
 }
 // 获取列表
 export function getQueryId(parms) {
   return request({
-    url: '/bidding/query-by-tender-id',
-    method: 'post',
-    data: parms
+    url: '/logistics',
+    // url: '/common/tender/logistics',
+    method: 'get',
+    params: parms
   })
 }
+
+// 获取列表
+export function getLogisticsInfo(parms) {
+  return request({
+    url: '/bidding/logistics/info',
+    method: 'get',
+    params: parms
+  })
+}
+// 已投递列表
+export function getLogisticsList(parms) {
+  return request({
+    url: '/logistics/tender',
+    method: 'get',
+    params: parms
+  })
+}
+
 // 修改列表
 export function getQueryEdit(parms) {
   return request({
@@ -27,12 +49,13 @@ export function getQueryEdit(parms) {
 // 添加列表
 export function getQueryAdd(parms) {
   return request({
-    url: '/bidding/new',
+    url: '/bidding/logistics',
     method: 'post',
     data: parms
   })
 }
 
+
 // 下载
 export function loadCustomer(parms) {
   return request({
@@ -41,3 +64,138 @@ export function loadCustomer(parms) {
     params: parms
   })
 }
+
+
+/**
+ * 获取客户
+ * 
+ * ** */
+
+export function getCustomerName(parms) {
+  return request({
+    url: '/customer/customerName',
+    method: 'get',
+    params: parms
+  })
+}
+
+
+/**
+ * 
+ *     销售相关接口
+ * 
+  * **/
+
+ // 获取列表   --  销售
+export function getSaleId(parms) {
+  return request({
+    url: '/tender/sale/page',
+    // url: '/common/tender/logistics',
+    method: 'get',
+    params: parms
+  })
+}
+
+// 添加列表
+export function getSaleAdd(parms) {
+  return request({
+    url: '/bidding/sale',
+    method: 'post',
+    data: parms
+  })
+}
+// 已投递列表
+export function getBiddingSaleList(parms) {
+  return request({
+    url: '/tender/sale',
+    method: 'get',
+    params: parms
+  })
+}
+// 标的详情
+export function getBiddingSaleInfo(parms) {
+  return request({
+    url: '/bidding/sale',
+    method: 'get',
+    params: parms
+  })
+}
+/**
+ *   原料相关接口
+ * 
+ * * */
+
+export function getTenderRaw(parms) {
+  return request({
+    url: '/tender/raw',
+    // url: '/common/tender/logistics',
+    method: 'get',
+    params: parms
+  })
+}
+
+// 添加列表
+export function getRawAdd(parms) {
+  return request({
+    url: '/bidding/raw',
+    method: 'post',
+    data: parms
+  })
+}
+// 已投递列表
+export function getTenderRawList(parms) {
+  return request({
+    url: '/tender/raw/info',
+    method: 'get',
+    params: parms
+  })
+}
+// 标的详情
+export function getBiddingRowInfo(parms) {
+  return request({
+    url: ' /bidding/raw',
+    method: 'get',
+    params: parms
+  })
+}
+/**
+ * 加工承揽
+ * 
+ * ** */
+
+export function getTenderProcessing(parms) {
+  return request({
+    url: '/tender/processing',
+    // url: '/common/tender/logistics',
+    method: 'get',
+    params: parms
+  })
+}
+
+// 添加列表
+export function getBiddingAdd(parms) {
+  return request({
+    url: '/bidding/processing',
+    method: 'post',
+    data: parms
+  })
+}
+
+
+// 已投递列表
+export function getTenderInfoList(parms) {
+  return request({
+    url: '/tender/processing/info',
+    method: 'get',
+    params: parms
+  })
+}
+
+// 标的详情
+export function getBiddingList(parms) {
+  return request({
+    url: '/bidding/processing',
+    method: 'get',
+    params: parms
+  })
+}

+ 13 - 1
src/filters/index.js

@@ -38,5 +38,17 @@ export function numberFormatter(num, digits) {
 }
 
 export function toThousandFilter(num) {
-  return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','))
+  // return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','))
+  if(num) {
+		if(!isNaN(num) && typeof num === 'number') {
+			return num.toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','));
+		} else {
+			return parseFloat(num).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','))
+		}
+    }else if (num === null || num === undefined || num === '') {
+    	return ''
+    }else if (num === 0) {
+		return num + '.0000'
+   }
+
 }

+ 3 - 3
src/views/admin/tenant.vue

@@ -44,7 +44,7 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="授权结束时间" width="160" align="center">
+      <el-table-column label="授权投标结束时间" width="160" align="center">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.endTime) }}</span>
         </template>
@@ -110,7 +110,7 @@
             placeholder="选择开始日期时间"
           />
         </el-form-item>
-        <el-form-item label="结束时间" prop="endTime" :label-width="formLabelWidth">
+        <el-form-item label="投标结束时间" prop="endTime" :label-width="formLabelWidth">
           <el-date-picker
             v-model="dataForm.endTime"
             type="datetime"
@@ -173,7 +173,7 @@ export default {
         name: [{ required: true, message: '租户名称不能为空', trigger: 'blur' }],
         code: [{ required: true, message: '租户编号不能为空', trigger: 'blur' }],
         startTime: [{ required: true, message: '开始时间不能为空', trigger: 'blur' }],
-        endTime: [{ required: true, message: '结束时间不能为空', trigger: 'blur' }],
+        endTime: [{ required: true, message: '投标结束时间不能为空', trigger: 'blur' }],
         status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
       },
       loading: false,

+ 23 - 0
src/views/admin/user.vue

@@ -70,6 +70,29 @@
               <div>{{ scope.row.deptName }}</div>
             </template>
           </el-table-column>
+
+          <el-table-column label="投标类型" align="center">
+            <template slot-scope="scope">
+               <el-tag type='warning' v-if="scope.row.tenderType == 0">
+                 招标方
+                </el-tag>
+                <el-tag   v-if="scope.row.tenderType == 1">
+                 投标方/物流
+                </el-tag>
+                 <el-tag   v-if="scope.row.tenderType == 2">
+                 投标方/原料
+                </el-tag>
+                 <el-tag  v-if="scope.row.tenderType == 3">
+                 投标方/销售
+                </el-tag>
+                 <el-tag   v-if="scope.row.tenderType == 4">
+                 投标方/加工承揽
+                </el-tag>
+            </template>
+          </el-table-column>
+
+          
+
           <el-table-column label="公司" align="center">
             <template slot-scope="scope">
               <div>{{ scope.row.customerName }}</div>

+ 539 - 163
src/views/bid/index.vue

@@ -3,6 +3,7 @@
 
     <div class="head-container" style="margin: 10px 0 10px 0;">
       <!-- 搜索 -->
+      <span style="fontSize:13px">标题</span>
       <el-input
         v-model="query.value"
         clearable
@@ -10,17 +11,57 @@
         style="width: 200px;"
         size="small"
         class="filter-item"
+        @keyup.enter.native="handleFind"
+         @clear="handleFind"
       />
-      <el-button class="filter-item" size="small" type="primary" icon="el-icon-search" plain @click="handleFind">搜索</el-button>
-      <el-button
-        class="filter-item"
-        size="small"
-        type="primary"
-        icon="el-icon-plus"
-        @click="handleAdd"
-      >发布新标
-      </el-button>
-    </div>
+      <span style="fontSize:13px;marginLeft:20px">招标类型</span>
+      <el-select v-model="query.tenderType" style="width: 200px;" @keyup.enter.native="handleFind" @clear="handleFind" size="small" clearable  value-key="areaId" filterable placeholder="请选择招标类型">
+        <el-option
+          v-for="item in tenderType"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        />
+      </el-select>
+
+        <span style="fontSize:13px;marginLeft:20px">招标规则</span>
+      <el-select v-model="query.tenderRule" style="width: 200px;" @keyup.enter.native="handleFind" @clear="handleFind" size="small" clearable  value-key="areaId" filterable placeholder="请选择招标规则">
+        <el-option
+          v-for="item in tenderRule"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        />
+      </el-select>
+
+
+    <span style="fontSize:13px;marginLeft:20px">开始时间</span>
+            <el-date-picker
+              v-model="applyDateStart"
+              size="mini"
+              type="datetimerange"
+              style="width: 400px;"
+              range-separator="-"
+              clearable
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :default-time="['00:00:00', '23:59:59']"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+             @change="onApplyDate"
+             @clear="onApplyDate"
+            />
+      </div>
+          <div style="float:right">
+           <el-button class="filter-item" size="small" type="primary" icon="el-icon-search"  @click="handleFind">搜索</el-button>
+          <el-button
+            class="filter-item"
+            size="small"
+            type="primary"
+            icon="el-icon-plus"
+            @click="handleAdd"
+          >发布新标
+          </el-button>
+      </div>
     <!--表格渲染-->
     <el-table v-loading="loading" :data="data" style="width: 100%;">
       <el-table-column label="序号" fixed="left" width="60" align="center">
@@ -29,49 +70,65 @@
         </template>
       </el-table-column>
 
-      <el-table-column prop="title" label="标题" :show-overflow-tooltip="true" width="250" align="center" />
+      <el-table-column prop="tenderTitle" label="标题" :show-overflow-tooltip="true" width="250" align="center" />
 
       <el-table-column label="状态" align="center" width="100">
         <template slot-scope="scope">
-          <el-tag v-if="scope.row.status ==1">进行中</el-tag>
-          <el-tag v-if="scope.row.status ==2" type="info">已结束</el-tag>
-          <el-tag v-if="scope.row.status ==3" type="danger">已作废</el-tag>
-          <el-tag v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+          <el-tag effect="plain" v-if="scope.row.status ==1">进行中</el-tag>
+          <el-tag effect="plain" v-if="scope.row.status ==2" type="info">已结束</el-tag>
+          <el-tag effect="plain" v-if="scope.row.status ==3" type="danger">已作废</el-tag>
+          <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
         </template>
       </el-table-column>
 
-      <el-table-column prop="description" :show-overflow-tooltip="true" label="报价方式" width="100" align="center">
+      <el-table-column prop="description" :show-overflow-tooltip="true" label="招标类型" width="100" align="center">
+        <template slot-scope="scope"> 
+          <el-tag v-if="scope.row.tenderType == 1"  >物流</el-tag>
+          <el-tag v-if="scope.row.tenderType == 2" >原料</el-tag>
+          <el-tag v-if="scope.row.tenderType == 3" >销售</el-tag>
+          <el-tag v-if="scope.row.tenderType == 4" >加工承揽</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column prop="description" :show-overflow-tooltip="true" label="招标规则" width="100" align="center">
         <template slot-scope="scope">
-          <el-tag v-if="scope.row.priceQuotes == 1" color="#5783E6" style="border-color:#5783E6" effect="dark">总价</el-tag>
-          <el-tag v-if="scope.row.priceQuotes == 2" effect="dark" color="#82C497" style="border-color:#82C497">单价</el-tag>
+          <el-tag v-if="scope.row.tenderRule == 1" type="success" effect="plain">价低者得</el-tag>
+          <el-tag v-if="scope.row.tenderRule == 2" effect="plain" >价高者得</el-tag>
         </template>
       </el-table-column>
-      <el-table-column prop="remarks" label="备注" :show-overflow-tooltip="true" align="center" />
-      <el-table-column prop="appendix" label="附件" align="center" width="100">
+      <!-- <el-table-column prop="description" :show-overflow-tooltip="true" label="是否作废" width="100" align="center">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.isInvalid == 1"  >正常</el-tag>
+          <el-tag v-if="scope.row.isInvalid == 2" type="danger" >已作废</el-tag>
+        </template>
+      </el-table-column> -->
+      <el-table-column prop="fileUrl" label="附件" align="center" width="200">
         <template slot-scope="scope">
-          <el-button type="text" @click="onLoad(scope.row.appendix)">下载</el-button>
+          <!-- <el-button type="text" @click="onLoad(scope.row.appendix)">下载</el-button> -->
+          <el-link :href="'http://view.officeapps.live.com/op/view.aspx?src='+scope.row.fileUrl" type="primary" target="_target"><i class="el-icon-view"></i> 查看</el-link>
+          <el-link :href="scope.row.fileUrl" type="primary" target="_target"><i class="el-icon-download"></i> 下载</el-link>
         </template>
       </el-table-column>
       <el-table-column prop="startTime" label="开始时间" align="center" width="160" />
       <el-table-column prop="endTime" label="截止时间" align="center" width="160" />
+      <el-table-column prop="tenderRemark" label="备注" :show-overflow-tooltip="true" align="center" />
 
-      <el-table-column label="操作" width="150" fixed="right" align="center">
+      <el-table-column label="操作" width="250" fixed="right" align="center">
         <template slot-scope="scope">
+          <el-button  slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">标的详情</el-button>
           <el-button v-if="scope.row.status == 1 || scope.row.status == 4" slot="reference" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
           <el-popover
-            :ref="scope.row.id"
+            :ref="scope.row.tenderParentId"
             placement="bottom"
             width="180"
           >
             <p>此操作将作废该标,确定要作废吗?</p>
             <div style="text-align: right; margin: 0">
               <el-button size="mini" @click="$refs[scope.row.id].doClose()">取消</el-button>
-              <el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定
+              <el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.tenderParentId,scope.row.tenderType)">确定
               </el-button>
             </div>
             <el-button v-if="scope.row.status == 1 || scope.row.status == 4" slot="reference" icon="el-icon-delete" type="text">作废</el-button>
           </el-popover>
-          <el-button v-if="scope.row.status != 1 && scope.row.status != 4" slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">投标详情</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -91,49 +148,73 @@
     </div>
 
     <!--新增-->
-    <el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="dialog" :title="isAdd ? '发布新标' : '修改新标'" width="40%">
+    <el-dialog :append-to-body="true"  :close-on-click-modal="false" :visible.sync="dialog" :title="isAdd ? '发布新标' : '修改新标'" width="40%">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="标题" prop="title">
-          <div class="padding" style="width: 370px;">
-            <el-input v-model="form.title" maxlength="200" show-word-limit placeholder="请输入标题" />
+        <el-form-item label="标题" prop="tenderTitle">
+          <div class="padding" style="width: 80%;">
+            <el-input v-model="form.tenderTitle" maxlength="64" show-word-limit placeholder="请输入标题" />
           </div>
         </el-form-item>
-        <el-form-item label="备注" prop="remarks">
-          <el-input
-            v-model="form.remarks"
-            type="textarea"
-            style="width: 370px;"
-            :autosize="{ minRows: 2, maxRows: 10}"
-            placeholder="请输入内容"
-            maxlength="500"
-            show-word-limit
-          />
+
+         <el-form-item label="招标类型" prop="tenderType" >
+              <el-select v-model="form.tenderType" style="width: 80%;" @change="onTenderType" :disabled="!isAdd" value-key="areaId" filterable placeholder="请选择招标类型">
+                <el-option
+                  v-for="item in tenderType"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                />
+              </el-select>
+          </el-form-item>
+          <el-form-item label="招标规则" prop="tenderRule">
+            <el-radio v-model="form.tenderRule" @change="onShowType"  :label="1">价低者得</el-radio>
+            <el-radio v-model="form.tenderRule" @change="onShowType"  :label="2">价高者得</el-radio>
         </el-form-item>
-        <el-form-item label="附件" prop="appendix" class="is-required">
-          <el-upload
-            class="upload-demo"
-            drag
-            :limit="1"
-            :on-preview="handlePreview"
-            :on-change="handleChange"
-            :on-remove="handleRemove"
-            :before-remove="beforeRemove"
-            :on-exceed="handleExceed"
-            :on-error="hanndleErr"
-            :action="BASE_API+'/tender/upload'"
-            list-type="text"
-            :file-list="fileList"
-            multiple
-          >
-            <i class="el-icon-upload" />
-            <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-            <!-- <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div> -->
-          </el-upload>
+        <el-form-item label="附件" prop="fileUrl" class="is-required">
+          <el-row type="flex" class="row-bg">
+            <div>
+                  <el-upload
+                    :disabled="!showType"
+                    class="upload-demo"
+                    :limit="1"
+                    :on-preview="handlePreview"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :before-remove="beforeRemove"
+                    :on-exceed="handleExceed"
+                    :on-error="hanndleErr"
+                    name="multipartFile"
+                    :action="isAdd ? BASE_API+'/common/tender/file/'+form.tenderType+'/'+ form.tenderRule : BASE_API+'/common/tender/file/'+form.tenderType+'/'+ form.tenderRule +'?tenderParentId='+ form.tenderParentId"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                  >
+                          <el-button @click="handleUpload">上传文件</el-button>
+                  </el-upload>
+                <div style="fontSize:12px;color:#303133">*上传填写好的文件</div>  
+            </div>
+            <div style="border-right:0.5px solid #eee;margin:0 60px"></div>
+            <div>
+            <el-button @click="onFile">下载模板</el-button>
+            <div style="fontSize:12px;color:#303133">*下载模板,填写信息</div>
+            </div>
+          </el-row>
+
         </el-form-item>
-        <el-form-item label="报价方式" prop="priceQuotes">
-          <el-radio v-model="form.priceQuotes" :label="1">总价</el-radio>
-          <el-radio v-model="form.priceQuotes" :label="2">单价</el-radio>
+
+                <el-form-item label="备注" prop="remarks">
+              <el-input
+                v-model="form.tenderRemark"
+                type="textarea"
+                style="width: 80%;"
+                :autosize="{ minRows: 2, maxRows: 10}"
+                placeholder="请输入内容"
+                maxlength="200"
+                show-word-limit
+              />
         </el-form-item>
+  
         <el-form-item label="发布时间" prop="startTime">
           <!-- <el-date-picker
             v-model="form.startTime"
@@ -158,10 +239,11 @@
           <el-date-picker
             v-model="bidDate"
             type="datetimerange"
+            style="width:80%"
             size="mini"
             range-separator="~"
             value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '15:00:00']"
+            :default-time="['00:00:00', '23:59:59']"
             start-placeholder="开始日期"
             end-placeholder="结束日期"
             @change="oncustom"
@@ -175,74 +257,42 @@
       </div>
     </el-dialog>
 
-    <!-- 详情 -->
-    <el-dialog :append-to-body="true" :visible.sync="viewDialog" title="投标详情" width="90%" center>
-      <el-table center :data="Paramdata" style="width: 100%;">
-
-        <el-table-column prop="customerName" label="客户名称" show-overflow-tooltip="true" align="center" />
-
-        <el-table-column label="报价方式" align="center">
-          <template slot-scope="scope">
-            <el-tag v-if="scope.row.priceQuotes == 1" color="#5783E6" style="border-color:#5783E6" effect="dark">总价</el-tag>
-            <el-tag v-if="scope.row.priceQuotes == 2" effect="dark" color="#82C497" style="border-color:#82C497">单价</el-tag>
-          </template>
-        </el-table-column>
+   
+    <div class="goodsNameCss">
+       <!-- 物流详情 -->
+    <ckTender ref="ckTender"/>
+        <!-- 销售详情 -->
+          <ckTender1 ref="ckTender1"></ckTender1>
+          <!-- 原料 -->
+          <ckTender2 ref="ckTender2"></ckTender2>
+      <!-- 加工承揽-->
+          <ckTender3 ref="ckTender3"></ckTender3>
+      
+    </div>
 
-        <el-table-column prop="price" :show-overflow-tooltip="true" label="报价金额" align="center">
-          <template slot-scope="scope">
-            <div>
-              {{ scope.row.price | toThousandFilter }}
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column prop="remarks" label="备注" :show-overflow-tooltip="true" align="center" />
-        <el-table-column prop="appendix" label="附件" align="center" width="100">
-          <template slot-scope="scope">
-            <!-- <el-link type="primary" :href="scope.row.appendix">查看</el-link> -->
-            <el-button type="text" @click="onLoad(scope.row.appendix)">下载</el-button>
-          </template>
-        </el-table-column>
-        <el-table-column prop="createTime" label="投标时间" align="center" />
-        <el-table-column prop="userName" label=" 投标帐号" align="center" />
-        <el-table-column prop="status" label=" 投标结果" align="center">
-          <template slot-scope="scope">
-            <el-tag v-if="scope.row.status == 0" type="warning">已提交</el-tag>
-            <el-tag v-if="scope.row.status == 1" type="success">已中标</el-tag>
-            <el-tag v-if="scope.row.status == 2" type="danger">未中标</el-tag>
-          </template>
-        </el-table-column>
-
-      </el-table>
-      <div class="pagination">
-        <el-pagination
-          :current-page.sync="param.page"
-          :page-size="param.size"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total1"
-          :page-sizes="[10, 20, 30, 50]"
-          background
-          @size-change="handleSizeChangeParam"
-          @current-change="handleCurrentChangeParam"
-        />
-      </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="viewDialog = false">取消</el-button>
-        <el-button :loading="loading" type="primary" @click="viewDialog = false">确认</el-button>
-      </div>
-    </el-dialog>
   </div>
 
 </template>
 
 <script>
-import { getTableList, getQueryId, getQueryAdd, getQueryEdit, getQueryDelete, loadCustomer } from '@/api/bid'
+import { getTableList, getQueryId, getQueryAdd, getQueryEdit, getQueryDelete, loadCustomer,apiFile,getSaleId } from '@/api/bid'
 import { Notification, MessageBox } from 'element-ui'
+import ckTender1 from "./tender1/tender.vue"
+import ckTender from "./tender/tender.vue"
+import ckTender2 from "./tender2/tender.vue"
+import ckTender3 from "./tender3/tender.vue"
 export default {
+   components:{
+ckTender1,
+ckTender2,
+ckTender3,
+    ckTender
+  },
   data() {
     const checkTel = (rule, value, callback) => {
-      console.log(this.form.appendix)
+      console.log(this.form.fileUrl)
       console.log(value, 'value')
-      if (this.form.appendix == null || this.form.appendix == '') {
+      if (this.form.fileUrl == null || this.form.fileUrl == '') {
         callback(new Error('请选择附件'))
         console.log('没过')
       } else {
@@ -251,10 +301,16 @@ export default {
       }
     }
     return {
+      showType:false,
       form: {
+        tenderType:"",
+        tenderRule:"",
+        fileUrl:""
       },
+      applyDateStart:[],
       data: [],
       fileList: [],
+      fileData:{},
       BASE_API: process.env.BASE_API,
       dialog: false,
       delLoading: false,
@@ -265,41 +321,113 @@ export default {
       pageSize: 10,
       total: 0, // 总数量
       rules: {
-        title: [
+        tenderTitle: [
           { required: true, message: '标题不为空', trigger: 'blur' }
         ],
-        priceQuotes: [
-          { required: true, message: '请选择报价方式', trigger: 'blur' }
+        tenderRule: [
+          { required: true, message: '请选择招标规则', trigger: 'blur' }
+        ],
+        tenderType: [
+          { required: true, message: '请选择投标类型', trigger: 'blur' }
         ],
-        appendix: [
+        fileUrl: [
           { validator: checkTel, trigger: 'change' }
-        ]
+        ],
         // startTime: [
         //   { type:"array",required: true, message: '发布时间不为空', trigger: 'blur' }
         // ]
       },
+      tenderType:[
+        {id:1,name:"物流",value:"logistics"},
+        {id:2,name:"原料",value:"raw"},
+        {id:3,name:"销售",value:"sale"},
+        {id:4,name:"加工承揽",value:"processing"},
+      ],
+      tenderRule:[
+        {id:1,name:"价低者得"},
+        {id:2,name:"价高者得"},
+
+      ],
       queryTypeOptions: [
         { key: 'name', display_name: '字典名称' },
         { key: 'remark', display_name: '描述' }
       ],
       query: {
         type: '',
-        value: ''
+        value: '',
+        tenderRule:"",
+        tenderType:"",
+        startTime:"",
+        endTime:""
       },
       param: {
-        page: 1,
+        current: 1,
         size: 10
       },
       total1: 0,
       Paramdata: [],
       bidDate: [],
-      buton: false
+      buton: false,
+      fileUrl:"",
+      tableLoading:false,
+      dialogTableVisible:false,
+      goodsName:"",
+      activeName:"first",
+      bidInfo:{},
+      saleViewDialog:false,
     }
   },
   created() {
     this.getDictData()
+    console.log( process.env.BASE_API+" process.env.BASE_API")
   },
   methods: {
+     // 投标详情 向父元素传递数据
+    costPlannedAmountChange(val){
+      console.log(val)
+ 
+      this.dialogTableVisible = true
+      setTimeout(() => {
+        this.goodsName = val.goodsName
+       this.$refs.ckDialog.priceData = val
+      this.$refs.ckDialog.getTenantList()
+        console.log(this.$refs.ckDialog)
+      }, 300);
+    },
+    onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.query.startTime =this.applyDateStart[0]
+              this.query.endTime = this.applyDateStart[1]
+            }else{
+              this.query.startTime =""
+              this.query.endTime =""
+            }
+      this.handleFind()
+    },
+    onShowType(){
+      console.log(this.form.tenderType+"this.form.tenderType ")
+      console.log(this.form.tenderRule+"this.form.tenderRule")
+        if(this.form.tenderType ==undefined ||  this.form.tenderRule == undefined){
+          this.showType = false
+        }else{
+          this.showType = true
+        }
+    },
+    onTenderType(value,index){
+      console.log(value)
+      // let value= ""
+      this.onShowType()
+      let tenderType =this.tenderType
+      // id减一得到下标
+      let data = tenderType[value - 1].value
+      apiFile(data).then((res)=>{
+        console.log(res)
+        this.fileUrl = res.data.data.path
+      })
+
+    },
     // 发布时间
     oncustom() {
       console.log(this.bidDate)
@@ -330,24 +458,76 @@ export default {
     // 获取详情
     getDictData: function() {
       this.loading = true
-      // const params = new URLSearchParams()
-      // params.append('current', this.currentPage)
-      // params.append('size', this.pageSize)
-      const data = {
-        page: this.currentPage,
-        size: this.pageSize,
-        title: this.query.value
-      }
-      getTableList(data).then(res => {
+
+      const params = new URLSearchParams()
+      params.append('current', this.currentPage)
+      params.append('size', this.pageSize)
+      params.append('tenderType', this.query.tenderType)
+      params.append('tenderTitle', this.query.value)
+      params.append('tenderRule', this.query.tenderRule)
+      params.append('startTime',this.query.startTime )
+      params.append('endTime', this.query.endTime)
+
+      // const data = {
+      //   page: this.currentPage,
+      //   size: this.pageSize,
+      //   title: this.query.value
+      // }
+
+      getTableList(params).then(res => {
         console.log(res)
-        this.data = res.data.data.records
+        // this.data = res.data.data.records
+        let data = res.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于结束时间,已结束")
+          }
+
+          return res
+        })
+        this.data = data
         this.total = res.data.data.total
         this.loading = false
       })
     },
+    // 点击时候
+    handleUpload(){
+      console.log("我被固定了")
+      if(this.form.tenderType ==undefined ||  this.form.tenderRule == undefined){
+       this.$message({
+          message: '请先选择招标类型和招标规则',
+          type: 'warning'
+        });
+      }
+      // return false
+    },
     // 文件移除的时候
     handleRemove(file, fileList) {
-      this.form.appendix = ''
+      this.form.fileUrl = ''
       console.log(file, fileList, this.fileList, '移出')
     },
     // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
@@ -356,7 +536,8 @@ export default {
       if (file.response) {
         console.log(file.response, 'file')
         if (file.response.code == '200') {
-          this.form.appendix = file.response.data
+          this.form.fileUrl = file.response.data.filePath
+          this.form.tenderParentId = file.response.data.tenderParentId
         } else {
           Notification.error({
             title: file.response.msg,
@@ -368,8 +549,16 @@ export default {
     },
     // 点击文件列表中已上传的文件时的钩子
     handlePreview(file) {
-      console.log(file, 'file1')
-
+      console.log(file, 'file21')
+      // 判断添加 还是 编辑
+      let officeUrl
+      if(this.isAdd){
+        officeUrl = 'http://view.officeapps.live.com/op/view.aspx?src='+file.response.data.filePath
+      }else{
+        officeUrl = 'http://view.officeapps.live.com/op/view.aspx?src='+this.form.fileUrl
+      }
+// 在新窗口打开编码后 的链接
+window.open(officeUrl,'_target')
       // window.location.href = file.url
     },
     handleExceed(files, fileList) {
@@ -383,6 +572,17 @@ export default {
     beforeRemove(file, fileList) {
       return this.$confirm(`确定移除 ${file.name}?`)
     },
+      onFile(){
+        // let url = "https://fire-development.oss-cn-beijing.aliyuncs.com/bid/dev/客户批量上传模板.xlsx"
+      if(this.form.tenderType ==undefined ||  this.form.tenderRule == undefined){
+       this.$message({
+          message: '请先选择招标类型和招标规则',
+          type: 'warning'
+        });
+      }else{
+        window.open(this.fileUrl, '_self');
+      }
+    },
 
     // 字典名称提交动作
     doSubmit() {
@@ -444,10 +644,12 @@ export default {
       end.setTime(start.getTime() + 3600 * 1000 * 24 * 1)
       console.log(this.formatDate(end))
       this.form.startTime = this.formatDate(start) + ' 00:00:00'
-      this.form.endTime = this.formatDate(end) + ' 15:00:00'
+      this.form.endTime = this.formatDate(end) + ' 23:59:59'
       this.bidDate = [this.form.startTime, this.form.endTime]
-      this.form.appendix = null
+      this.form.fileUrl = null
       this.fileList = []
+      // 添加弹框中的附件,进来要隐藏
+      this.showType = false
       this.dialog = true
       if (this.$refs['form']) {
         this.$refs['form'].resetFields()
@@ -463,39 +665,148 @@ export default {
       this.bidDate = [data.startTime, data.endTime]
       // this.form.
       // let name = data.appendix.lastIndexOf('/') ;
-      if (data.appendix) {
-        let name = data.appendix.split('tender/')
+      if (data.fileUrl) {
+        let name = data.fileUrl.split('/')
         name = name.pop()
         // let name = data.appendix.replace(/(.*\/)*([^.]+).*/ig, "$2");
-        this.fileList = [{ name: name, url: data.appendix }]
+        this.fileList = [{ name: name, url: data.fileUrl }]
       }
-
+      // 编辑弹框中的附件,进来要展示
+      this.showType = true
       this.dialog = true
       this.isAdd = false
-
+      // 下载模板类型
+      let tenderValue = this.tenderType[data.tenderType-1].value
+       apiFile(tenderValue).then((res)=>{
+        console.log(res)
+        this.fileUrl = res.data.data.path
+      })
       console.log(data)
+    },
+     handleClick(row,val){
+      console.log(row,val)
+      if(row.name == "second"){
+       this.$refs.ckTable.tenderParentId = this.param.tenderParentId
+        this.$refs.ckTable.getTenantList()
+      }
     },
     // 详情
     handleView(row) {
-      this.param.tenderId = row.id
-      this.param.page = 1
-      this.getParam()
-      this.viewDialog = true
+   
+      let tenderType = row.tenderType
+      if(tenderType == 1){
+        this.$refs.ckTender.viewDialog = true
+        let param =  {
+        tenderParentId:row.tenderParentId,
+          current: 1,
+          size: 10
+        }
+         setTimeout(() => {
+           
+            this.$refs.ckTender.activeName="first"
+            this.$refs.ckTender.param = param
+            this.$refs.ckTender.bidInfo = row
+            this.$refs.ckTender.applyDateStart = []
+            // this.$refs.ckTender.param.current = 1
+            this.$refs.ckTender.getParam()
+            console.log("物流")
+      }, 300);
+      }else if(tenderType == 2){
+        this.$refs.ckTender2.viewDialog = true
+        let param =  {
+          tenderParentId:row.tenderParentId,
+          current: 1,
+          size: 10
+        }
+         setTimeout(() => {
+            this.$refs.ckTender2.activeName="first"
+            this.$refs.ckTender2.param = param
+            this.$refs.ckTender2.bidInfo = row
+            this.$refs.ckTender2.applyDateStart = []
+            this.$refs.ckTender2.getParam()
+            console.log("原料")
+      }, 300);
+      }else if(tenderType == 3){
+        this.$refs.ckTender1.viewDialog = true
+        let param =  {
+          tenderParentId:row.tenderParentId,
+          current: 1,
+          size: 10
+        }
+          setTimeout(() => {
+              this.$refs.ckTender1.activeName="first"
+              this.$refs.ckTender1.param = param
+              this.$refs.ckTender1.bidInfo = row
+            this.$refs.ckTender1.applyDateStart = []
+              this.$refs.ckTender1.getParam()
+        }, 300);
+        console.log("销售")
+      }else if(tenderType == 4){
+        this.$refs.ckTender3.viewDialog = true
+         let param =  {
+          tenderParentId:row.tenderParentId,
+          current: 1,
+          size: 10
+        }
+          setTimeout(() => {
+              this.$refs.ckTender3.activeName="first"
+              this.$refs.ckTender3.param = param
+              this.$refs.ckTender3.bidInfo = row
+            this.$refs.ckTender3.applyDateStart = []
+              this.$refs.ckTender3.getParam()
+        }, 300);
+        console.log("加工承揽")
+      }
     },
-    getParam() {
+    getParam(tenderParentId) {
       const data = this.param
+      this.tableLoading = true
+      // getSaleId
+      // this.
       getQueryId(data).then((res) => {
         console.log(res.data.data.records, '')
-        this.Paramdata = res.data.data.records
+        let data = res.data.data.records
+         data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于结束时间,已结束")
+          }
+
+          return res
+        })
+        this.Paramdata = data
+        this.tableLoading = false
         this.total1 = res.data.data.total
       })
     },
     // 删除操作
-    subDelete(val) {
-      const data = {
-        id: val
-      }
-      getQueryDelete(data).then(res => {
+    subDelete(tenderParentId,tenderType) {
+      // const data = {
+      //   id: val
+      // }
+      getQueryDelete(tenderType,tenderParentId).then(res => {
         if (res.data.code === 200) {
           this.$message({ message: '已作废', type: 'success' })
           this.getDictData()
@@ -503,7 +814,7 @@ export default {
       }).catch(err => {
         console.log(err.response.data.message)
       })
-      this.$refs[val].doClose()
+      this.$refs[tenderParentId].doClose()
     },
     // 换页
     handleCurrentChange: function(val) {
@@ -515,7 +826,7 @@ export default {
       this.getDictData()
     },
     handleCurrentChangeParam(val) {
-      this.param.page = val
+      this.param.current = val
       this.getParam()
     },
     handleSizeChangeParam(val) {
@@ -526,7 +837,7 @@ export default {
 }
 </script>
 
-<style scoped>
+<style scoped  lang="scss">
 /* 去掉上传附件时候的过度效果 */
   ::v-deep .el-upload-list__item{transition: none !important;}
    ::v-deep .el-textarea__inner{
@@ -535,4 +846,69 @@ export default {
 .padding /deep/ .el-input--medium .el-input__inner {
     padding-right: 56px;
 }
+/deep/ .el-upload-list__item-name {
+  width: 150px;
+}
+.ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+.paginationParam{
+  // bottom: 0;
+  // left: 0;
+  line-height: 80px;
+  width: 100%;
+  // left: 45%;
+  // text-align: right;
+  z-index: 999;
+  background: #fff;
+}
+/deep/ .el-tabs__item{
+  font-size: 16px !important;
+  // padding: 35px  ;
+}
+.el-card {
+  border: 0px solid #fff;
+}
+.clearfix {
+    line-height: 20px;
+    font-size: 18px;
+    font-weight: 600;
+    color: #409EFF;
+}
+/deep/.el-dialog.is-fullscreen {
+
+    background-color: #f5f7f9;
+}
+.box-card{
+  margin-bottom: 20px;
+  .row-bg{
+  padding: 15px 40px 0 40px;
+  .flex_text{
+    line-height: 50px;
+    color: #8C8C8C;
+    font-size: 14px;
+    // border:1px solid red;
+    // font-weight: 600;
+  }
+  .flex_name{
+    font-size: 14px;
+    padding-left: 25px;
+    color: #575757;
+    font-weight: 550;
+  }
+}
+}
+/deep/ .el-card__body{
+  padding: 20px 0;
+}
+/deep/.el-tabs__nav-wrap::after {
+
+    background-color: #dfe4ed00;  
+}
 </style>

+ 465 - 0
src/views/bid/tender/dialog.vue

@@ -0,0 +1,465 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <div class="" style="margin: 10px 0 30px 0;">
+      
+      <span style="font-size:14px">客户名称:</span>
+      <el-select v-model="goodsName" filterable style="width: 200px;" clearable size="small" placeholder="请选择" @clear="handleFind">
+            <el-option v-for="item in userDataList" :key="item.customerId" :label="item.customerName" :value="item.customerId" />
+          </el-select>
+      <span style="font-size:14px;margin-left:20px">是否为历史记录:</span>
+       <el-select v-model="historyValue" style="width: 200px;" @keyup.enter.native="handleFind" @clear="handleFind" size="small" clearable  value-key="areaId" filterable placeholder="请选择">
+        <el-option
+          v-for="item in history"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        />
+      </el-select>
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+       <!-- <el-upload
+                    :disabled="!showType"
+                    class="upload-demo"
+                    :limit="1"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/tender/file/'"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                  >
+                          <el-button @click="handleUpload" class="el-icon-upload" size="small" type="primary" style="width:90px; ">发送文件</el-button>
+                  </el-upload> -->
+    </div>
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  @selection-change="handleSelectionChange" @row-click="handleHighlightChangeTable" :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+       <!-- <el-table-column
+       :selectable="selectable"
+       :max="1"
+      type="selection"
+      width="55">
+    </el-table-column> -->
+<el-table-column label="客户名称" prop="customerName" fixed="left" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="运输方式" prop="goodsName"   align="center" :show-overflow-tooltip="true">
+           <template slot-scope="scope">
+                           <span v-if="scope.row.transportMode == 1">汽运</span>
+                            <!-- <span v-if="scope.row.transportMode == 2">汽运</span> -->
+                            <span v-if="scope.row.transportMode == 2">火车运输</span>
+                            <span v-if="scope.row.transportMode == 3">船运</span>
+                            <span v-if="scope.row.transportMode == 4">汽运/火车运输/船运</span>
+                            <span v-if="scope.row.transportMode == 5">汽运/火车运输</span>
+                            <span v-if="scope.row.transportMode == 6">汽运/船运</span>
+        </template>
+      </el-table-column>
+      
+      <el-table-column label="投标价格" prop="logisticsBiddingPrice" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+
+      <el-table-column label="数量(吨)" prop="quantity" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="总价" prop="logisticsTotalPrice" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="联系电话" prop="phone" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+
+       <el-table-column  :show-overflow-tooltip="true" label="包装方式" width="100" align="center">
+        <template slot-scope="scope">
+            <span v-if="scope.row.packingWay == 0">未知</span> 
+            <span v-if="scope.row.packingWay == 1">散粮</span> 
+            <span v-if="scope.row.packingWay == 2">包粮</span> 
+            <!-- <span v-if="scope.row.packingWay == 2">袋装</span> 
+            <span v-if="scope.row.packingWay == 3">散装</span> 
+            <span v-if="scope.row.packingWay == 4">集装箱</span>  -->
+        </template>
+      </el-table-column>
+         <el-table-column label="状态" align="center" width="100">
+            <template slot-scope="scope">
+            <el-tag effect="plain" v-if="scope.row.biddingStatus == 5">已投递</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==6" type="info">审核中</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==7" type="warning">已中标</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==8" type="danger">未中标</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==9" type="danger">已作废</el-tag>
+            </template>
+       </el-table-column>
+               <el-table-column prop="appendix" label="凭证" align="center" width="100">
+                <template slot-scope="scope">
+                    <el-link :disabled="scope.row.voucherFile ? false : true" :href="scope.row.voucherFile" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+                </template>
+              </el-table-column>
+       <el-table-column label="始发车站" prop="departureStation" width="190" align="center" :show-overflow-tooltip="true">
+           <template slot-scope="scope">
+            <span >{{priceData.departureName}}</span> 
+        </template>
+      </el-table-column>
+      <el-table-column label="目的车站" prop="destinationStation" width="150" align="center" :show-overflow-tooltip="true">
+         <template slot-scope="scope">
+            <span >{{priceData.destinationName}}</span> 
+        </template>
+      </el-table-column>
+
+      <el-table-column label="投标时间" prop="logisticsBiddingTime" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+
+      <el-table-column label="备注" prop="biddingLogisticsRemark" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+        <el-table-column label="操作" width="250" fixed="right" align="center">
+          <template slot-scope="scope">
+            <el-button  slot="reference"  :disabled="scope.row.biddingStatus !=6"  icon="el-icon-check" type="text" @click="dialogVisible=true;dataForm=scope.row">中标</el-button>
+            <!-- <el-button  slot="reference" icon="el-icon-check" type="text" @click="dialogVisible=true">中标</el-button> -->
+             <el-upload
+                    :disabled="scope.row.biddingStatus !=7"
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/tender/contract/send/' + scope.row.customerId"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                  >
+                          <el-button @click="handleUpload" :disabled="scope.row.biddingStatus !=7" class="el-icon-upload2" size="small" type="text" style="width:90px;font-size:14px ">发送合同</el-button>
+                  </el-upload>
+          </template>
+        </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+     <el-dialog
+      title=""
+      :visible.sync="dialogVisible"
+      width="35%"
+      top="35vh"
+      append-to-body
+     >
+      <span style="font-size:16px">此操作将“{{dataForm.customerName}}”,置中标</span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+            <el-upload
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/tender/contract/send/' + dataForm.customerId"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                  >
+                          <el-button @click="changeBid"  type="primary"  >确定并发送合同</el-button>
+                  </el-upload>
+        <el-button type="primary" @click="changeBid">确 定</el-button>
+        
+      </span>
+    </el-dialog>
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getLogisticsInfo,getCustomerName ,getContract} from '@/api/bid'
+import { Notification, MessageBox } from 'element-ui'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: {},
+      SelectionList:[],
+      goodsName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      history:[
+        {id:0,name:"否"},
+        {id:1,name:"是"}
+      ],
+      historyValue:"",
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: 1,
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      userDataList:[],
+      startTime:"",
+      endTime:"",
+        isShow:true,
+        showType:false,
+        fileData:{}
+    }
+  },
+  created() {
+    this.onCustmerName()
+          console.log(this.priceData,"priceData")
+
+  },
+  methods: {
+    // 置中标
+    changeBid(){
+      console.log(this.dataForm)
+      console.log(this.priceData,"priceData")
+      getContract(this.dataForm.tenderLogisticsId,this.dataForm.biddingLogisticsId,this.priceData.tenderType).then((res)=>{
+        if(res.data.code == 200){
+           this.$message({
+              message: '操作成功',
+              type: 'success'
+            });
+            this.dialogVisible = false
+            this.getTenantList()
+        }
+      })
+    },
+     // 点击时候
+    handleUpload(){
+      console.log(this.SelectionList,"我被固定了")
+      // if(this.SelectionList.length == 0){
+      //  this.$message({
+      //     message: '请先选择已中标的客户',
+      //     type: 'warning'
+      //   });
+      // }
+      // return false
+    },
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+           this.$message({
+              message: '合同发送成功',
+              type: 'success'
+            });
+          // this.form.fileUrl = file.response.data.filePath
+          // this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+        }
+      }
+    },
+    onCustmerName(){
+        getCustomerName().then((res)=>{
+            console.log(res)
+            this.userDataList = res.data.data
+        })
+    },
+      onshow(){
+          this.isShow = !this.isShow
+      },
+    parseTime,
+    getTenantList: function() {
+        console.log(this.priceData)
+      const params = new URLSearchParams()
+      params.append('tenderParentId', this.priceData.tenderParentId)
+      params.append('customerId', this.goodsName)
+      params.append('isHistory', this.historyValue)
+      params.append('tenderLogisticsId', this.priceData.logisticsBidId)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      this.loading =true
+      getLogisticsInfo(params).then(response => {
+        console.log(response)
+        this.loading = false
+         let data = response.data.data.records
+        data.map((res)=>{
+          // 投标时间
+          let startTime = this.priceData.endTime
+
+          const date = new Date(startTime)
+          const start = date.valueOf()         //开始时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          if(res.biddingStatus < 7){
+              console.log("我不满足")
+                if(time < start){
+                    res.biddingStatus = 5
+                    console.log("当前时间小于投标时间,已投递")
+                }else if(time > start){
+                    res.biddingStatus = 6
+                    console.log("当前时间小于投标时间,审核中")
+                }
+          }
+          return res
+        })
+
+        this.tableData = data
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = 1
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+
+
+
+   selectable(row){
+     console.log(row,"我是selectable")
+     if(row.biddingStatus == 7){
+
+       return true
+     }
+   },
+    handleSelectionChange(list){
+        console.log(list)
+      if (list.length > 1) {
+        this.$refs.multipleTable.clearSelection();
+        return;
+      }
+      this.SelectionList = [...list];
+      if(this.SelectionList.length >0){
+         this.showType = true
+      }else{
+         this.showType = false
+      }
+    },
+    handleHighlightChangeTable(row){
+       if(row.biddingStatus == 7){
+          this.$refs.multipleTable.toggleRowSelection(row);
+       }
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+.pagination{
+  padding-bottom: 30px;
+}
+</style>
+

+ 426 - 0
src/views/bid/tender/table.vue

@@ -0,0 +1,426 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <div>
+       <span style="fontSize:13px;marginLeft:20px">标的编码</span>
+        <el-input
+          v-model="logisticsCode"
+          clearable
+          placeholder="请输入标的编码"
+          style="width: 14%;"
+          size="small"
+          class="filter-item"
+          @keyup.enter.native="handleFind"
+          @clear="handleFind"
+        />
+      <span style="font-size:14px">货物名称:</span>
+      <el-input
+        v-model="goodsName"
+        clearable
+        placeholder="请输入货物"
+        style="width: 200px;margin-bottom:20px"
+        size="small"
+         @keyup.enter.native="handleFind"
+         @clear="handleFind"
+        class="filter-item"
+      />
+          <!-- <span style="fontSize:13px;marginLeft:20px">投标时间</span>
+            <el-date-picker
+              v-model="applyDateStart"
+              size="mini"
+              type="datetimerange"
+              style="width: 280px;"
+              range-separator="-"
+              clearable
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :default-time="['00:00:00', '23:59:59']"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+             @change="onApplyDate"
+             @clear="onApplyDate"
+            />
+ -->
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+    </div>
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+          <!-- <el-table-column type="expand" prop="biddingLogisticsInfoList">
+      <template slot-scope="props"> -->
+            <!-- <div  :key="index" style="background:rgb(245, 247, 250);padding:15px;margin:10px 0" v-if="isShow">
+                <el-row type="flex" class="row-bg">
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light" >运输方式: 
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 1">汽运</span> 
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 2">汽运</span>
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 3">火车运输</span>
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 4">船运</span>
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 5">汽运/火车运输/船运</span>
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 6">汽运/火车运输</span>
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 7">汽运/船运</span>
+                        </div>
+                    </el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">投标价格:{{props.row.biddingLogisticsInfoList[0].logisticsBiddingPrice}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">数量:{{props.row.biddingLogisticsInfoList[0].quantity}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">总价:{{props.row.biddingLogisticsInfoList[0].logisticsTotalPrice}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">联系电话:{{props.row.biddingLogisticsInfoList[0].phone}}</div></el-col>
+                </el-row>
+                <el-row type="flex" class="row-bg" style="margin-top:15px">
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light">包装方式:
+                           <span  v-if="props.row.biddingLogisticsInfoList[0].packingWay == 1">散粮</span> 
+                           <span v-if="props.row.biddingLogisticsInfoList[0].packingWay == 2">袋装</span> 
+                           <span v-if="props.row.biddingLogisticsInfoList[0].packingWay == 3">散装</span> 
+                           <span v-if="props.row.biddingLogisticsInfoList[0].packingWay == 4">集装箱</span> 
+                        </div>
+                    </el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">始发车站:{{props.row.biddingLogisticsInfoList[0].departureStation}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">目的车站:{{props.row.biddingLogisticsInfoList[0].destinationStation}}</div></el-col>
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light"> 状态:
+                                 <el-tag  v-if="props.row.biddingLogisticsInfoList[0].logisticsBiddingStatus == 5">已投递</el-tag>
+                                 <el-tag  v-if="props.row.biddingLogisticsInfoList[0].logisticsBiddingStatus == 6">审核中</el-tag>
+                                 <el-tag  v-if="props.row.biddingLogisticsInfoList[0].logisticsBiddingStatus == 7">已中标</el-tag>
+                                 <el-tag  v-if="props.row.biddingLogisticsInfoList[0].logisticsBiddingStatus == 8">未中标</el-tag>
+                         </div>
+                    </el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">投标时间:{{props.row.biddingLogisticsInfoList[0].logisticsBiddingTime}}</div></el-col>
+                </el-row>
+                <el-row type="flex" class="row-bg" style="margin-top:15px">
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light">备注:
+                            {{props.row.biddingLogisticsInfoList[0].logisticsRemark}}
+                        </div>
+                    </el-col>
+                </el-row>
+          </div> -->
+          <!-- <div v-for="(item,index) in props.row.biddingLogisticsInfoList" :key="index" style="background:rgb(245, 247, 250);padding:15px;margin:10px 0" >
+                <el-row type="flex" class="row-bg">
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light" >运输方式:
+                            <span v-if="item.transportMode == 1">汽运</span>
+                            <span v-if="item.transportMode == 2">汽运</span>
+                            <span v-if="item.transportMode == 3">火车运输</span>
+                            <span v-if="item.transportMode == 4">船运</span>
+                            <span v-if="item.transportMode == 5">汽运/火车运输/船运</span>
+                            <span v-if="item.transportMode == 6">汽运/火车运输</span>
+                            <span v-if="item.transportMode == 7">汽运/船运</span>
+                        </div>
+                    </el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">投标价格:{{item.logisticsBiddingPrice}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">数量:{{item.quantity}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">总价:{{item.logisticsTotalPrice}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">联系电话:{{item.phone}}</div></el-col>
+                </el-row>
+                <el-row type="flex" class="row-bg" style="margin-top:15px">
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light">包装方式:
+                           <span  v-if="item.packingWay == 1">散粮</span> 
+                           <span v-if="item.packingWay == 2">袋装</span> 
+                           <span v-if="item.packingWay == 3">散装</span> 
+                           <span v-if="item.packingWay == 4">集装箱</span> 
+                        </div>
+                    </el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">始发车站:{{item.departureStation}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">目的车站:{{item.destinationStation}}</div></el-col>
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light"> 状态:
+                                 <el-tag  v-if="item.logisticsBiddingStatus == 5">已投递</el-tag>
+                                 <el-tag  v-if="item.logisticsBiddingStatus == 6">审核中</el-tag>
+                                 <el-tag  v-if="item.logisticsBiddingStatus == 7">已中标</el-tag>
+                                 <el-tag  v-if="item.logisticsBiddingStatus == 8">未中标</el-tag>
+                         </div>
+                    </el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">投标时间:{{item.logisticsBiddingTime}}</div></el-col>
+                </el-row>
+                <el-row type="flex" class="row-bg" style="margin-top:15px">
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light">备注:
+                            {{item.logisticsRemark}}
+                        </div>
+                    </el-col>
+                </el-row>
+          </div> -->
+            <!-- <div @click="onshow">{{isShow ?"展开" : "收起"}}</div> -->
+      <!-- </template>
+    </el-table-column> -->
+      <el-table-column prop="logisticsCode" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" />
+
+      <el-table-column label="货物" prop="goodsName" fixed="left"  align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+
+      <el-table-column label="数量(吨)" prop="goodsNumber" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+
+      <el-table-column label="始发地" prop="departureName" width="190" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="目的地" prop="destinationName" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="预估距离" prop="predictDistance" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="单价" prop="transportUnitPrice" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="保证金" prop="deposit" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column prop="appendix" label="回执" align="center" width="100">
+        <template slot-scope="scope">
+            <el-link :disabled="scope.row.receiptPathUrl ? false : true" :href="scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+        </template>
+      </el-table-column>
+       <el-table-column label="状态" align="center" width="100">
+          <template slot-scope="scope">
+            <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+            <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+            <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+            <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+            <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+          </template>
+        </el-table-column>
+      <el-table-column prop="description" :show-overflow-tooltip="true" label="招标规则" width="100" align="center">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.tenderLogisticsRule == 1" type="success" effect="plain">价低者得</el-tag>
+          <el-tag v-if="scope.row.tenderLogisticsRule == 2" effect="plain" >价高者得</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="运输时间" prop="freightTime" width="230" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="投标开始时间" prop="startTime" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="投标结束时间" prop="endTime" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="投标备注" prop="logisticsRemark" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+  
+        <el-table-column label="操作" width="150" fixed="right" align="center">
+        <template slot-scope="scope">
+          <!-- <el-button type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == null" slot="reference" type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == 0" slot="reference" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">改标</el-button> -->
+          <el-button  slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">查看更多</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getLogisticsList } from '@/api/bid'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: [],
+      SelectionList:[],
+      goodsName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: 1,
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      startTime:"",
+      endTime:"",
+        isShow:true,
+        logisticsCode:""
+    }
+  },
+  created() {
+    // this.getTenantList()
+    console.log('res')
+  },
+  methods: {
+      handleView(row){
+          console.log("我被点击了")
+            this.$emit('change',row)
+        //   this.$parent.dialogTableVisible = true
+      },
+      onshow(){
+          this.isShow = !this.isShow
+      },
+    parseTime,
+    getTenantList: function() {
+      this.loading = true
+      const params = new URLSearchParams()
+      params.append('tenderParentId', this.tenderParentId)
+      params.append('goodsName', this.goodsName)
+      params.append('logisticsCode', this.logisticsCode)
+      params.append('startTime', this.startTime)
+      params.append('endTime', this.endTime)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      getLogisticsList(params).then(response => {
+        console.log(response)
+        this.loading = false
+         let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+         // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+          if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于投标结束时间,待处理")
+          }
+          return res
+        })
+        this.tableData = data
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = 1
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+</style>
+

+ 854 - 0
src/views/bid/tender/tender.vue

@@ -0,0 +1,854 @@
+<template>
+    <div>
+              <el-dialog :append-to-body="true" fullscreen :visible.sync="viewDialog" title="" center >
+               <el-card class="box-card" shadow="nerver">
+                    <div slot="header" class="clearfix">
+                      <span class="topClass">基本信息</span>
+                    </div>
+
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                           标题 : <span class="flex_name"> {{bidInfo.tenderTitle}}</span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                           状态 : <span class="flex_name"> <el-tag effect="plain" v-if="bidInfo.status ==1">进行中</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==2" type="info">已结束</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==3" type="danger">已作废</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==4" type="warning">未开始</el-tag>
+                                </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         招标类型 :  <span class="flex_name"><el-tag v-if="bidInfo.tenderType == 1"  >物流</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 2" >原料</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 3" >销售</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 4" >加工承揽</el-tag>
+                                    </span>
+                       </el-col>
+                    </el-row>
+                     <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                         招标规则 : <span class="flex_name">    <el-tag v-if="bidInfo.tenderRule == 1" type="success" effect="plain">价低者得</el-tag>
+          <el-tag v-if="bidInfo.tenderRule == 2" effect="plain" >价高者得</el-tag></span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         开始时间 : <span class="flex_name"> {{bidInfo.startTime}} </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         截止时间 :  <span class="flex_name">{{bidInfo.endTime}}
+                                    </span>
+                       </el-col>
+                    </el-row>
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="24" class="flex_text">
+                            备注:<span class="flex_name">{{bidInfo.tenderRemark}}</span>
+                       </el-col>
+                    </el-row>
+                  </el-card>
+
+                  <el-card class="box-card" shadow="nerver">
+                        <div slot="header" class="clearfix">
+                          <span class="topClass">招标要求</span>
+                        </div>
+                        <div style="padding:15px 40px;line-height:30px;fontSize:15px">
+                          1、报价必须完整,报价单一经发出,投标方不得随意更改信息及报价表格式,不得插入、删除行或列,不得空报,一旦更改报价表格式,将视为废标处理; <br/>
+                          2、投标方有能力完成物流及相关运输服务、储存监管照片等资料的上传、梳理归档;有能力获取储存监控设备后自行安装和回收管理,办理相关影像资料的录入; <br/>
+                          3、运输过程中投标方需按国林源诚要求提供固定车队,所有车辆/船舶均安装GPS定位系统,主动配合完成车(船)载摄像头安装,并按照国林源诚相关要求完成物流监管系统的监管任务,自愿接受国林源诚统一运输管理; <br/>
+                          4、中标后必须在三天内完成一切出库手续,每天按所交付加工点的约定日接货量交付,如需转存、倒仓等操作需提前三个工作日以书面形式上报至国林源诚审批备案。作业费用由中标方自行承担。 <br/>
+                          5、中标方需提供的增值税专用发票为 9  %的道路运输发票。 <br/>
+                          6、如发生运输作业,运输损耗标准按照:按每车计算,不得超过每车货物数量的1 ‰。 <br/>
+                          7、在储存库点作业时,中标公司应有能力提供翻转平台或吊装机至储存库点作业。 <br/>
+                          8、中标方需按照国林源诚要求保证运输货物完好、不撒漏、防偷盗、防雨湿,如发生任何质量问题,将追究投标方违约责任。 <br/>
+                          <!-- 1、报价必须完整,报价单一经发出,投标方不得随意更改信息及报价表格式(联运需尽量提供分段分解价格),不得插入、删除行或列(联运分段标注除外),不得空报,一旦更改报价表格式,将视为废标处理; <br/>
+                          2、投标方有能力完成物流及相关运输服务、储存监管照片等资料的上传、梳理归档;有能力获取储存监控设备后自行安装和回收管理,办理相关影像资料的录入;  <br/>                                                                              
+                          3、运输过程中投标方需按国林源诚要求提供固定车队,所有车辆/船舶均安装GPS定位系统,主动配合完成车(船)载摄像头安装,并按照国林源诚相关要求完成物流监管系统的监管任务,自愿接受国林源诚统一运输管理;  <br/>                                                             
+                          4、如需转存、倒仓等操作需提前三个工作日以书面形式上报至国林源诚审批备案。作业价格为包干单价,含提送货费、保险费、税金以及市场风险全包等一切费用,报价一旦发出,视为报价有效,不做任何更改说明。<br/>
+                          5、中标方需提供的增值税专用发票为 9  %;若提供其它税率的发票,按中标价折扣运费税差。<br/>
+                          6、如发生运输作业,运输损耗标准按照:按每车计算,省内不得超过每车货物数量的1 ‰,省外不得超过每车货物数量的2‰。<br/>
+                          7、在储存库点作业时,中标公司应有能力提供翻转平台或吊装机至储存库点作业。<br/>                                                                  
+                          8、中标方需按照国林源诚要求保证运输货物完好、不撒漏、防偷盗、防雨湿,如发生任何质量问题,将追究投标方违约责任;<br/> -->
+                        </div>
+                  </el-card>
+
+ 
+                    <el-card class="box-card" shadow="nerver">
+                       <div slot="header" class="clearfix">
+                          <span class="topClass"> 所有标的</span>
+                        </div>
+                          <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
+                                <el-tab-pane label="标的详情" name="first">
+                              <div slot="header" class="clearfix">
+                                <span class="topClass">投的详情</span>
+                              </div style="width:100%">
+                                      <div class="head-container" style="margin: 30px 0 10px 0;">
+                                        <div>
+                                         <span style="fontSize:13px;marginLeft:20px">标的编码</span>
+                                          <el-input
+                                            v-model="param.logisticsCode"
+                                            clearable
+                                            placeholder="请输入标的编码"
+                                            style="width: 14%;"
+                                            size="small"
+                                            class="filter-item"
+                                            @keyup.enter.native="getParamFexd"
+                                            @clear="getParamFexd"
+                                          />
+                                        <span style="fontSize:13px;marginLeft:30px">货品名称</span>
+                                          <el-input
+                                            v-model="param.goodsName"
+                                            clearable
+                                            placeholder="请输入货物名称"
+                                            style="width: 15%;"
+                                            size="small"
+                                            class="filter-item"
+                                            @keyup.enter.native="getParamFexd"
+                                            @clear="getParamFexd"
+                                          />
+                                      <span style="fontSize:13px;marginLeft:30px">始发地</span>
+                                          <el-input
+                                            v-model="param.departureName"
+                                            clearable
+                                            placeholder="请输入始发地"
+                                            style="width: 15%;"
+                                            size="small"
+                                            class="filter-item"
+                                            @keyup.enter.native="getParamFexd"
+                                            @clear="getParamFexd"
+                                          />
+                        
+                                      <span style="fontSize:13px;marginLeft:30px;">目的地</span>
+                                          <el-input
+                                            v-model="param.destinationName"
+                                            clearable
+                                            placeholder="请输入货物名称"
+                                            style="width: 15%;"
+                                            size="small"
+                                            class="filter-item"
+                                            @keyup.enter.native="getParamFexd"
+                                            @clear="getParamFexd"
+                                          />
+                                          <!-- 搜索 -->
+                                          <span style="fontSize:13px;marginLeft:30px;">是否投标</span>
+                                          <el-select v-model="param.logisticsIsTender"  style="width: 14%;" size="small"  @keyup.enter.native="getParamFexd" @clear="getParamFexd" clearable placeholder="请选择">
+                                            <el-option  label="未投标" value="0"> </el-option>
+                                            <el-option  label="有投标" value="1"> </el-option>
+                                          </el-select>
+                                          </div>
+                                          <div style="margin-top:20px">
+                                             <span style="fontSize:13px;marginLeft:20px">发标时间</span>
+                                                <el-date-picker
+                                                v-model="applyDateStart"
+                                                size="small"
+                                                type="datetimerange"
+                                                style="width: 400px;"
+                                                range-separator="-"
+                                                clearable
+                                                value-format="yyyy-MM-dd HH:mm:ss"
+                                                :default-time="['00:00:00', '23:59:59']"
+                                                start-placeholder="开始日期"
+                                                end-placeholder="结束日期"
+                                              @change="onApplyDate"
+                                              @clear="onApplyDate"
+                                              />
+                                        </div>
+                              <div style="text-align: right;margin-right:40px">
+                                   <el-button class="filter-item" style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="getParamFexd">搜索</el-button>
+                              </div>
+                                      <!-- <el-button class="filter-item" style="marginLeft:20px;marginBottom:20px" size="small" type="primary" icon="el-icon-search"  @click="getParamFexd">搜索</el-button> -->
+                                      <div style="height:20px"></div>
+                                     <el-table center :data="Paramdata"  :header-cell-style="{ background: '#f5f7fa', }" border v-loading="tableLoading" stripe style="width: 100%;">
+
+                                        <el-table-column prop="logisticsCode" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="goodsName" fixed="left" label="货品名称" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="goodsNumber"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="departureName"  label="始发地" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="destinationName" label="目的地" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="predictDistance" label="预估运输距离(公里/海里)" width="128" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="transportUnitPrice" label="运输单价含税价(元/吨)"  width="120" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="appendix" label="回执" align="center" width="100">
+                                            <template slot-scope="scope">
+                                                <el-link :disabled="scope.row.receiptPathUrl ? false : true" :href="scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+                                            </template>
+                                          </el-table-column>
+                                            <el-table-column label="状态" align="center" width="100">
+                                        <template slot-scope="scope">
+                                         <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                                          <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                                          <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                                          <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                                          <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                                        </template>
+                                      </el-table-column>
+                                        <el-table-column prop="logisticsIsTender" label="是否投标" :show-overflow-tooltip="true" align="center" >
+                                          <template slot-scope="scope">
+                                            <el-tag v-if="scope.row.logisticsIsTender == 0" type="info">未投标</el-tag>
+                                            <el-tag v-if="scope.row.logisticsIsTender == 1" type="warning">有投标</el-tag>
+                                          </template>
+                                        </el-table-column>
+                                        <el-table-column prop="tenderLogisticsRule" label="中标规则" :show-overflow-tooltip="true" align="center" >
+                                          <template slot-scope="scope">
+                                            <el-tag v-if="scope.row.tenderLogisticsRule == 1" type="success" effect="plain">价低者得</el-tag>
+                                            <el-tag v-if="scope.row.tenderLogisticsRule == 2" effect="plain" >价高者得</el-tag>
+                                          </template>
+                                        </el-table-column>
+                                        <el-table-column label="运输时间" prop="freightTime" width="200" align="center" :show-overflow-tooltip="true">
+                                        </el-table-column>
+                                        <el-table-column prop="startTime" width="152" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="endTime" width="152" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                                        <!-- <el-table-column prop="createTime" width="152" label="创建时间" :show-overflow-tooltip="true" align="center" /> -->
+                                        <el-table-column prop="logisticsRemark" width="152" label="备注" :show-overflow-tooltip="true" align="center" />
+                                  
+                                      </el-table>
+                                      <div class="pagination">
+                                        <el-pagination
+                                          :current-page.sync="param.current"
+                                          :page-size="param.size"
+                                          layout="total, sizes, prev, pager, next, jumper"
+                                          :total="total1"
+                                          :page-sizes="[1,10, 20, 30, 50]"
+                                          background
+                                          @size-change="handleSizeChangeParam"
+                                          @current-change="handleCurrentChangeParam"
+                                        />
+                                      </div>
+                                </div>
+                                </el-tab-pane>
+                                <el-tab-pane label="投标详情" name="second">
+                                    <!-- <el-card class="box-card" shadow="nerver"> -->
+                                      <!-- <div slot="header" class="clearfix">
+                                        <span class="topClass">投标详情</span>
+                                      </div> -->
+                                              <ckTable ref="ckTable" @change="costPlannedAmountChange($event)"></ckTable>
+                                    <!-- </el-card> -->
+                                </el-tab-pane>
+
+                          </el-tabs>
+                    </el-card>
+
+                  <!-- <el-card class="box-card" shadow="nerver">
+                    <div slot="header" class="clearfix">
+                      <span class="topClass">投标详情</span>
+                    </div>
+                  <ckTable ref="ckTable"  @change="costPlannedAmountChange($event)"></ckTable>
+                   </el-card> -->
+
+                       <div slot="footer" class="paginationParam">
+                          <!-- <el-button @click="viewDialog = false">取消</el-button> -->
+                          <el-button  type="primary" @click="viewDialog = false">返回</el-button>
+                          <!-- <el-button :loading="loading" type="primary" @click="viewDialog = false">确认</el-button> -->
+                        </div>
+                  <el-dialog :title="goodsName" width="90%" center :visible.sync="dialogTableVisible" append-to-body>
+                               <ckDialog ref="ckDialog"></ckDialog>
+                          </el-dialog>
+
+          </el-dialog>
+
+    </div>
+</template>
+
+
+<script>
+import { getTableList, getQueryId, getQueryAdd, getQueryEdit, getQueryDelete, loadCustomer,apiFile,getSaleId } from '@/api/bid'
+import { Notification, MessageBox } from 'element-ui'
+import ckTable from './table.vue'
+import ckDialog from './dialog.vue'
+export default {
+   components:{
+    ckTable,
+    ckDialog
+  },
+  data() {
+    const checkTel = (rule, value, callback) => {
+      console.log(this.form.fileUrl)
+      console.log(value, 'value')
+      if (this.form.fileUrl == null || this.form.fileUrl == '') {
+        callback(new Error('请选择附件'))
+        console.log('没过')
+      } else {
+        callback()
+        console.log('过')
+      }
+    }
+    return {
+      showType:false,
+      form: {
+        tenderType:"",
+        tenderRule:"",
+        fileUrl:""
+      },
+      applyDateStart:[],
+      data: [],
+      fileList: [],
+      fileData:{},
+      BASE_API: process.env.BASE_API,
+      dialog: false,
+      delLoading: false,
+      viewDialog: false,
+      loading: false,
+      isAdd: false,
+      currentPage: 1,
+      pageSize: 10,
+      total: 0, // 总数量
+      rules: {
+        tenderTitle: [
+          { required: true, message: '标题不为空', trigger: 'blur' }
+        ],
+        tenderRule: [
+          { required: true, message: '请选择招标规则', trigger: 'blur' }
+        ],
+        tenderType: [
+          { required: true, message: '请选择投标类型', trigger: 'blur' }
+        ],
+        fileUrl: [
+          { validator: checkTel, trigger: 'change' }
+        ],
+        // startTime: [
+        //   { type:"array",required: true, message: '发布时间不为空', trigger: 'blur' }
+        // ]
+      },
+      tenderType:[
+        {id:1,name:"物流",value:"logistics"},
+        {id:2,name:"原料",value:"raw"},
+        {id:3,name:"销售",value:"sale"},
+        {id:4,name:"加工承揽",value:"processing"},
+      ],
+      tenderRule:[
+        {id:1,name:"价低者得"},
+        {id:2,name:"价高者得"},
+
+      ],
+      queryTypeOptions: [
+        { key: 'name', display_name: '字典名称' },
+        { key: 'remark', display_name: '描述' }
+      ],
+      query: {
+        type: '',
+        value: '',
+        tenderRule:"",
+        tenderType:"",
+        startTime:"",
+        endTime:""
+      },
+      param: {
+        current: 1,
+        size: 10
+      },
+      total1: 0,
+      Paramdata: [],
+      bidDate: [],
+      buton: false,
+      fileUrl:"",
+      tableLoading:false,
+      dialogTableVisible:false,
+      goodsName:"",
+      activeName:"first",
+      bidInfo:{},
+      saleViewDialog:false,
+    }
+  },
+  created() {
+    this.getDictData()
+  },
+  methods: {
+     // 投标详情 向父元素传递数据
+    costPlannedAmountChange(val){
+      console.log(val,"我是val")
+ 
+      this.dialogTableVisible = true
+      setTimeout(() => {
+        this.goodsName = val.goodsName
+       this.$refs.ckDialog.historyValue = 0
+       this.$refs.ckDialog.goodsName = ""
+       this.$refs.ckDialog.priceData = val
+      this.$refs.ckDialog.handleFind()
+        console.log(this.$refs.ckDialog)
+      }, 300);
+    },
+    onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.param.startTime =this.applyDateStart[0]
+              this.param.endTime = this.applyDateStart[1]
+            }else{
+              this.param.startTime =""
+              this.param.endTime =""
+            }
+
+      this.getParamFexd()
+    },
+    onShowType(){
+      console.log(this.form.tenderType+"this.form.tenderType ")
+      console.log(this.form.tenderRule+"this.form.tenderRule")
+        if(this.form.tenderType ==undefined ||  this.form.tenderRule == undefined){
+          this.showType = false
+        }else{
+          this.showType = true
+        }
+    },
+    onTenderType(value,index){
+      console.log(value)
+      // let value= ""
+      this.onShowType()
+      let tenderType =this.tenderType
+      // id减一得到下标
+      let data = tenderType[value - 1].value
+      apiFile(data).then((res)=>{
+        console.log(res)
+        this.fileUrl = res.data.data.path
+      })
+
+    },
+    // 发布时间
+    oncustom() {
+      console.log(this.bidDate)
+      if (this.bidDate != null) {
+        this.form.startTime = this.bidDate[0]
+        this.form.endTime = this.bidDate[1]
+      }
+    },
+    onClear() {
+      this.bidDate = []
+      console.log(this.form)
+    },
+    // 下载
+    onLoad(row) {
+      // const params = new URLSearchParams()
+      // params.append('path', row)
+      const a = document.createElement('a')
+      // a.href= /bidding/load
+      const url = window.location.origin + process.env.BASE_API + '/bidding/load?path=' + encodeURIComponent(row)
+      a.href = url
+      a.click()
+    },
+    // 搜索
+    handleFind: function() {
+      this.currentPage = 1
+      this.getDictData()
+    },
+    // 获取详情
+    getDictData: function() {
+      this.loading = true
+
+      const params = new URLSearchParams()
+      params.append('current', this.currentPage)
+      params.append('size', this.pageSize)
+      params.append('tenderType', this.query.tenderType)
+      params.append('tenderTitle', this.query.value)
+      params.append('tenderRule', this.query.tenderRule)
+      params.append('startTime',this.query.startTime )
+      params.append('endTime', this.query.endTime)
+
+      // const data = {
+      //   page: this.currentPage,
+      //   size: this.pageSize,
+      //   title: this.query.value
+      // }
+
+      getTableList(params).then(res => {
+        console.log(res)
+        // this.data = res.data.data.records
+        let data = res.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于投标结束时间,已结束")
+          }
+
+          return res
+        })
+        this.data = data
+        this.total = res.data.data.total
+        this.loading = false
+      })
+    },
+    // 点击时候
+    handleUpload(){
+      console.log("我被固定了")
+      if(this.form.tenderType ==undefined ||  this.form.tenderRule == undefined){
+       this.$message({
+          message: '请先选择招标类型和招标规则',
+          type: 'warning'
+        });
+      }
+      // return false
+    },
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+          this.form.fileUrl = file.response.data.filePath
+          this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+          this.fileList = []
+        }
+      }
+    },
+    // 点击文件列表中已上传的文件时的钩子
+    handlePreview(file) {
+      console.log(file, 'file21')
+      // 判断添加 还是 编辑
+      let officeUrl
+      if(this.isAdd){
+        officeUrl = 'http://view.officeapps.live.com/op/view.aspx?src='+file.response.data.filePath
+      }else{
+        officeUrl = 'http://view.officeapps.live.com/op/view.aspx?src='+this.form.fileUrl
+      }
+// 在新窗口打开编码后 的链接
+window.open(officeUrl,'_target')
+      // window.location.href = file.url
+    },
+    handleExceed(files, fileList) {
+      this.$message.warning(`当前限制选择 1 个附件,本次选择了 ${files.length} 个文件`)
+    },
+    hanndleErr(err, files, fileList) {
+      console.log(err, 'err')
+      console.log(files, 'err')
+      console.log(fileList, 'err')
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${file.name}?`)
+    },
+      onFile(){
+        // let url = "https://fire-development.oss-cn-beijing.aliyuncs.com/bid/dev/客户批量上传模板.xlsx"
+      if(this.form.tenderType ==undefined ||  this.form.tenderRule == undefined){
+       this.$message({
+          message: '请先选择招标类型和招标规则',
+          type: 'warning'
+        });
+      }else{
+        window.open(this.fileUrl, '_self');
+      }
+    },
+
+    // 字典名称提交动作
+    doSubmit() {
+      console.log(this.form)
+      this.$refs['form'].validate((valid) => {
+        console.log(valid)
+        if (valid) {
+          if (this.isAdd) {
+            // 新增字典
+            this.buton = true
+            getQueryAdd(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.dialog = false
+                this.getDictData()
+                this.buton = false
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+
+              this.$refs['form'].resetFields()
+            }).catch(err => {
+              this.buton = false
+            })
+          } else {
+            // 更新
+            getQueryEdit(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.getDictData()
+            })
+          }
+        }
+      })
+    },
+    formatDate(date) {
+      var myyear = date.getFullYear()
+      var mymonth = date.getMonth() + 1
+      var myweekday = date.getDate()
+
+      if (mymonth < 10) {
+        mymonth = '0' + mymonth
+      }
+      if (myweekday < 10) {
+        myweekday = '0' + myweekday
+      }
+      return myyear + '-' + mymonth + '-' + myweekday
+    },
+    // 添加字典
+    handleAdd: function() {
+      this.isAdd = true
+      this.form = {}
+      const end = new Date()
+      const start = new Date()
+      end.setTime(start.getTime() + 3600 * 1000 * 24 * 1)
+      console.log(this.formatDate(end))
+      this.form.startTime = this.formatDate(start) + ' 00:00:00'
+      this.form.endTime = this.formatDate(end) + ' 15:00:00'
+      this.bidDate = [this.form.startTime, this.form.endTime]
+      this.form.fileUrl = null
+      this.fileList = []
+      // 添加弹框中的附件,进来要隐藏
+      this.showType = false
+      this.dialog = true
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+    },
+    // 编辑字典
+    handleEdit: function(row) {
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+      const data = JSON.parse(JSON.stringify(row))
+      this.form = data
+      this.bidDate = [data.startTime, data.endTime]
+      // this.form.
+      // let name = data.appendix.lastIndexOf('/') ;
+      if (data.fileUrl) {
+        let name = data.fileUrl.split('/')
+        name = name.pop()
+        // let name = data.appendix.replace(/(.*\/)*([^.]+).*/ig, "$2");
+        this.fileList = [{ name: name, url: data.fileUrl }]
+      }
+      // 编辑弹框中的附件,进来要展示
+      this.showType = true
+      this.dialog = true
+      this.isAdd = false
+      // 下载模板类型
+      let tenderValue = this.tenderType[data.tenderType-1].value
+       apiFile(tenderValue).then((res)=>{
+        console.log(res)
+        this.fileUrl = res.data.data.path
+      })
+      console.log(data)
+    },
+     handleClick(row,val){
+      console.log(row,val)
+      if(row.name == "second"){
+       this.$refs.ckTable.tenderParentId = this.param.tenderParentId
+       this.$refs.ckTable.goodsName = ""
+        this.$refs.ckTable.handleFind()
+      }
+    },
+    // 详情
+    handleView(row) {
+      this.param.tenderParentId = row.tenderParentId
+      this.bidInfo = row
+      this.param.current = 1
+      this.getParam()
+
+         setTimeout(() => {
+        console.log(this.$refs.ckTable.tenderParentId,"1234")
+       this.$refs.ckTable.tenderParentId = row.tenderParentId
+        this.$refs.ckTable.getTenantList()
+      }, 300);
+      let tenderType = row.tenderType
+      if(tenderType == 1){
+        this.viewDialog = true
+         this.getParam()
+        console.log("物流")
+      }else if(tenderType == 3){
+        this.saleViewDialog = true
+        console.log("销售")
+      }
+    },
+    getParamFexd(){
+      this.param.current = 1
+      this.getParam()
+    },
+    getParam(tenderParentId) {
+      const data = this.param
+      this.tableLoading = true
+      // getSaleId
+      // this.
+      getQueryId(data).then((res) => {
+        console.log(res.data.data.records, '')
+        let data = res.data.data.records
+         data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+      if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于投标结束时间,待处理")
+          }
+
+          return res
+        })
+        this.Paramdata = data
+        this.tableLoading = false
+        this.total1 = res.data.data.total
+      })
+    },
+    // 删除操作
+    subDelete(tenderParentId,tenderType) {
+      // const data = {
+      //   id: val
+      // }
+      getQueryDelete(tenderType,tenderParentId).then(res => {
+        if (res.data.code === 200) {
+          this.$message({ message: '已作废', type: 'success' })
+          this.getDictData()
+        }
+      }).catch(err => {
+        console.log(err.response.data.message)
+      })
+      this.$refs[tenderParentId].doClose()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      this.currentPage = val
+      this.getDictData()
+    },
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.getDictData()
+    },
+    handleCurrentChangeParam(val) {
+      this.param.current = val
+      this.getParam()
+    },
+    handleSizeChangeParam(val) {
+      this.param.size = val
+      this.getParam()
+    }
+  }
+}
+</script>
+
+<style scoped  lang="scss">
+/* 去掉上传附件时候的过度效果 */
+  ::v-deep .el-upload-list__item{transition: none !important;}
+   ::v-deep .el-textarea__inner{
+  padding-bottom: 36px;
+}
+.padding /deep/ .el-input--medium .el-input__inner {
+    padding-right: 56px;
+}
+/deep/ .el-upload-list__item-name {
+  width: 150px;
+}
+.ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+.paginationParam{
+  // bottom: 0;
+  // left: 0;
+  line-height: 80px;
+  width: 100%;
+  // left: 45%;
+  // text-align: right;
+  z-index: 999;
+  background: #fff;
+}
+/deep/ .el-tabs__item{
+  font-size: 16px !important;
+  // padding: 35px  ;
+}
+.el-card {
+  border: 0px solid #fff;
+}
+.clearfix {
+    line-height: 20px;
+    font-size: 18px;
+    font-weight: 600;
+    color: #409EFF;
+}
+/deep/.el-dialog.is-fullscreen {
+
+    background-color: #f5f7f9;
+}
+.box-card{
+  margin-bottom: 20px;
+  .row-bg{
+  padding: 15px 40px 0 40px;
+  .flex_text{
+    line-height: 50px;
+    color: #8C8C8C;
+    font-size: 14px;
+    // border:1px solid red;
+    // font-weight: 600;
+  }
+  .flex_name{
+    font-size: 14px;
+    padding-left: 25px;
+    color: #575757;
+    font-weight: 550;
+  }
+}
+}
+/deep/ .el-card__body{
+  padding: 20px 0;
+}
+/deep/.el-tabs__nav-wrap::after {
+
+    background-color: #dfe4ed00;  
+}
+/deep/ .el-dialog--center .el-dialog__body {
+    text-align: initial;
+    padding: 25px 25px 0px 30px;
+}
+
+/deep/ .el-tabs--border-card{
+  // border-top:1px ;
+  border-bottom: 0px;
+
+ box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.5)
+}
+</style>

+ 773 - 0
src/views/bid/tender1.vue

@@ -0,0 +1,773 @@
+<template>
+    <div>
+              <el-dialog :append-to-body="true" fullscreen :visible.sync="viewDialog" title="" center>
+               <el-card class="box-card" shadow="nerver">
+                    <div slot="header" class="clearfix">
+                      <span class="topClass">基本信息</span>
+                    </div>
+
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                           标题 : <span class="flex_name"> {{bidInfo.tenderTitle}}</span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                           状态 : <span class="flex_name"> <el-tag effect="plain" v-if="bidInfo.status ==1">进行中</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==2" type="info">已结束</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==3" type="danger">已作废</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==4" type="warning">未开始</el-tag>
+                                </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         招标类型 :  <span class="flex_name"><el-tag v-if="bidInfo.tenderType == 1"  >物流</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 2" >原料</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 3" >销售</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 4" >加工承揽</el-tag>
+                                    </span>
+                       </el-col>
+                    </el-row>
+                     <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                         招标规则 : <span class="flex_name">    <el-tag v-if="bidInfo.tenderRule == 1" type="success" effect="plain">价低者得</el-tag>
+          <el-tag v-if="bidInfo.tenderRule == 2" effect="plain" >价高者得</el-tag></span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         开始时间 : <span class="flex_name"> {{bidInfo.startTime}} </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         截止时间 :  <span class="flex_name">{{bidInfo.endTime}}
+                                    </span>
+                       </el-col>
+                    </el-row>
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="24" class="flex_text">
+                            备注:<span class="flex_name">{{bidInfo.tenderRemark}}</span>
+                       </el-col>
+                    </el-row>
+                  </el-card>
+
+ 
+                    <el-card class="box-card" shadow="nerver">
+                       <div slot="header" class="clearfix">
+                          <span class="topClass"> 所有标的</span>
+                        </div>
+                          <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
+                                <el-tab-pane label="标的详情" name="first">
+                              <div slot="header" class="clearfix">
+                                <span class="topClass">投的详情</span>
+                              </div>
+                                      <div class="head-container" style="margin: 30px 0 10px 0;">
+                                        <span style="fontSize:13px">货物名称</span>
+                                          <el-input
+                                            v-model="param.goodsName"
+                                            clearable
+                                            placeholder="请输入货物名称"
+                                            style="width: 200px;"
+                                            size="small"
+                                            class="filter-item"
+                                            @keyup.enter.native="getParam"
+                                            @clear="getParam"
+                                          />
+                                      <span style="fontSize:13px;marginLeft:30px">始发地</span>
+                                          <el-input
+                                            v-model="param.departureName"
+                                            clearable
+                                            placeholder="请输入始发地"
+                                            style="width: 200px;"
+                                            size="small"
+                                            class="filter-item"
+                                            @keyup.enter.native="getParam"
+                                            @clear="getParam"
+                                          />
+                        
+                                      <span style="fontSize:13px;marginLeft:30px;">目的地</span>
+                                          <el-input
+                                            v-model="param.destinationName"
+                                            clearable
+                                            placeholder="请输入货物名称"
+                                            style="width: 200px;"
+                                            size="small"
+                                            class="filter-item"
+                                            @keyup.enter.native="getParam"
+                                            @clear="getParam"
+                                          />
+                                          <!-- 搜索 -->
+                                          <span style="fontSize:13px;marginLeft:30px;">是否投标</span>
+                                          <el-select v-model="param.logisticsIsTender" size="small"  @keyup.enter.native="getParam" @clear="getParam" clearable placeholder="请选择">
+                                            <el-option  label="未投标" value="0"> </el-option>
+                                            <el-option  label="有投标" value="1"> </el-option>
+                                          </el-select>
+                                      <el-button class="filter-item" style="marginLeft:20px;marginBottom:20px" size="small" type="primary" icon="el-icon-search" plain @click="getParam">搜索</el-button>
+                                      <div style="height:20px"></div>
+                                      <el-table center :data="Paramdata"  :header-cell-style="{ background: '#f5f7fa', }" border v-loading="tableLoading" stripe style="width: 100%;">
+
+                                        <el-table-column prop="goodsName" fixed="left" label="货品名称" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="goodsNumber"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="departureName"  label="始发地" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="destinationName" label="目的地" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="predictDistance" label="预估运输距离(公里/海里)" width="128" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="transportUnitPrice" label="运输单价含税价(元/吨)"  width="120" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="appendix" label="附件" align="center" width="100">
+                                            <template slot-scope="scope">
+                                                <el-link v-if="scope.row.receiptPathUrl" :href="'http://view.officeapps.live.com/op/view.aspx?src='+scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 查看</el-link>
+                                            </template>
+                                          </el-table-column>
+                                            <el-table-column label="状态" align="center" width="100">
+                                        <template slot-scope="scope">
+                                          <el-tag effect="plain" v-if="scope.row.status ==1">进行中</el-tag>
+                                          <el-tag effect="plain" v-if="scope.row.status ==2" type="info">已结束</el-tag>
+                                          <el-tag effect="plain" v-if="scope.row.status ==3" type="danger">已作废</el-tag>
+                                          <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                                        </template>
+                                      </el-table-column>
+                                        <el-table-column prop="logisticsIsTender" label="是否投标" :show-overflow-tooltip="true" align="center" >
+                                          <template slot-scope="scope">
+                                            <el-tag v-if="scope.row.logisticsIsTender == 0" type="info">未投标</el-tag>
+                                            <el-tag v-if="scope.row.logisticsIsTender == 1" type="warning">有投标</el-tag>
+                                          </template>
+                                        </el-table-column>
+                                        <el-table-column prop="tenderLogisticsRule" label="中标规则" :show-overflow-tooltip="true" align="center" >
+                                          <template slot-scope="scope">
+                                            <el-tag v-if="scope.row.tenderLogisticsRule == 1" type="success" effect="plain">价低者得</el-tag>
+                                            <el-tag v-if="scope.row.tenderLogisticsRule == 2" effect="plain" >价高者得</el-tag>
+                                          </template>
+                                        </el-table-column>
+                                        <el-table-column prop="startTime" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="endTime" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="createTime" label="创建时间" :show-overflow-tooltip="true" align="center" />
+                                        <el-table-column prop="logisticsRemark" label="备注" :show-overflow-tooltip="true" align="center" />
+                                  
+                                      </el-table>
+                                      <div class="pagination">
+                                        <el-pagination
+                                          :current-page.sync="param.current"
+                                          :page-size="param.size"
+                                          layout="total, sizes, prev, pager, next, jumper"
+                                          :total="total1"
+                                          :page-sizes="[10, 20, 30, 50]"
+                                          background
+                                          @size-change="handleSizeChangeParam"
+                                          @current-change="handleCurrentChangeParam"
+                                        />
+                                      </div>
+                              <div style="height:60px"></div>
+                                </div>
+                                </el-tab-pane>
+                                <el-tab-pane label="投标详情" name="second">
+                                    <!-- <el-card class="box-card" shadow="nerver"> -->
+                                      <!-- <div slot="header" class="clearfix">
+                                        <span class="topClass">投标详情</span>
+                                      </div> -->
+                                              <ckTable ref="ckTable" @change="costPlannedAmountChange($event)"></ckTable>
+                                    <!-- </el-card> -->
+                                </el-tab-pane>
+
+                          </el-tabs>
+                    </el-card>
+
+                  <!-- <el-card class="box-card" shadow="nerver">
+                    <div slot="header" class="clearfix">
+                      <span class="topClass">投标详情</span>
+                    </div>
+                  <ckTable ref="ckTable"  @change="costPlannedAmountChange($event)"></ckTable>
+                   </el-card> -->
+
+                       <div slot="footer" class="paginationParam">
+                    <!-- <el-button @click="viewDialog = false">取消</el-button> -->
+                    <el-button :loading="loading" type="primary" @click="viewDialog = false">返回</el-button>
+                    <!-- <el-button :loading="loading" type="primary" @click="viewDialog = false">确认</el-button> -->
+                  </div>
+                  <el-dialog :title="goodsName" width="90%" center :visible.sync="dialogTableVisible" append-to-body>
+                               <ckDialog ref="ckDialog"></ckDialog>
+                          </el-dialog>
+
+          </el-dialog>
+
+    </div>
+</template>
+
+
+<script>
+import { getTableList, getQueryId, getQueryAdd, getQueryEdit, getQueryDelete, loadCustomer,apiFile,getSaleId } from '@/api/bid'
+import { Notification, MessageBox } from 'element-ui'
+
+export default {
+   components:{
+
+  },
+  data() {
+    const checkTel = (rule, value, callback) => {
+      console.log(this.form.fileUrl)
+      console.log(value, 'value')
+      if (this.form.fileUrl == null || this.form.fileUrl == '') {
+        callback(new Error('请选择附件'))
+        console.log('没过')
+      } else {
+        callback()
+        console.log('过')
+      }
+    }
+    return {
+      showType:false,
+      form: {
+        tenderType:"",
+        tenderRule:"",
+        fileUrl:""
+      },
+      applyDateStart:[],
+      data: [],
+      fileList: [],
+      fileData:{},
+      BASE_API: process.env.BASE_API,
+      dialog: false,
+      delLoading: false,
+      viewDialog: false,
+      loading: false,
+      isAdd: false,
+      currentPage: 1,
+      pageSize: 10,
+      total: 0, // 总数量
+      rules: {
+        tenderTitle: [
+          { required: true, message: '标题不为空', trigger: 'blur' }
+        ],
+        tenderRule: [
+          { required: true, message: '请选择招标规则', trigger: 'blur' }
+        ],
+        tenderType: [
+          { required: true, message: '请选择投标类型', trigger: 'blur' }
+        ],
+        fileUrl: [
+          { validator: checkTel, trigger: 'change' }
+        ],
+        // startTime: [
+        //   { type:"array",required: true, message: '发布时间不为空', trigger: 'blur' }
+        // ]
+      },
+      tenderType:[
+        {id:1,name:"物流",value:"logistics"},
+        {id:2,name:"原料",value:"raw"},
+        {id:3,name:"销售",value:"sale"},
+        {id:4,name:"加工承揽",value:"processing"},
+      ],
+      tenderRule:[
+        {id:1,name:"价低者得"},
+        {id:2,name:"价高者得"},
+
+      ],
+      queryTypeOptions: [
+        { key: 'name', display_name: '字典名称' },
+        { key: 'remark', display_name: '描述' }
+      ],
+      query: {
+        type: '',
+        value: '',
+        tenderRule:"",
+        tenderType:"",
+        startTime:"",
+        endTime:""
+      },
+      param: {
+        current: 1,
+        size: 10
+      },
+      total1: 0,
+      Paramdata: [],
+      bidDate: [],
+      buton: false,
+      fileUrl:"",
+      tableLoading:false,
+      dialogTableVisible:false,
+      goodsName:"",
+      activeName:"first",
+      bidInfo:{},
+      saleViewDialog:false,
+    }
+  },
+  created() {
+    this.getDictData()
+  },
+  methods: {
+     // 投标详情 向父元素传递数据
+    costPlannedAmountChange(val){
+      console.log(val)
+ 
+      this.dialogTableVisible = true
+      setTimeout(() => {
+        this.goodsName = val.goodsName
+       this.$refs.ckDialog.priceData = val
+      this.$refs.ckDialog.getTenantList()
+        console.log(this.$refs.ckDialog)
+      }, 300);
+    },
+    onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.query.startTime =this.applyDateStart[0]
+              this.query.endTime = this.applyDateStart[1]
+            }else{
+              this.query.startTime =""
+              this.query.endTime =""
+            }
+      this.handleFind()
+    },
+    onShowType(){
+      console.log(this.form.tenderType+"this.form.tenderType ")
+      console.log(this.form.tenderRule+"this.form.tenderRule")
+        if(this.form.tenderType ==undefined ||  this.form.tenderRule == undefined){
+          this.showType = false
+        }else{
+          this.showType = true
+        }
+    },
+    onTenderType(value,index){
+      console.log(value)
+      // let value= ""
+      this.onShowType()
+      let tenderType =this.tenderType
+      // id减一得到下标
+      let data = tenderType[value - 1].value
+      apiFile(data).then((res)=>{
+        console.log(res)
+        this.fileUrl = res.data.data.path
+      })
+
+    },
+    // 发布时间
+    oncustom() {
+      console.log(this.bidDate)
+      if (this.bidDate != null) {
+        this.form.startTime = this.bidDate[0]
+        this.form.endTime = this.bidDate[1]
+      }
+    },
+    onClear() {
+      this.bidDate = []
+      console.log(this.form)
+    },
+    // 下载
+    onLoad(row) {
+      // const params = new URLSearchParams()
+      // params.append('path', row)
+      const a = document.createElement('a')
+      // a.href= /bidding/load
+      const url = window.location.origin + process.env.BASE_API + '/bidding/load?path=' + encodeURIComponent(row)
+      a.href = url
+      a.click()
+    },
+    // 搜索
+    handleFind: function() {
+      this.currentPage = 1
+      this.getDictData()
+    },
+    // 获取详情
+    getDictData: function() {
+      this.loading = true
+
+      const params = new URLSearchParams()
+      params.append('current', this.currentPage)
+      params.append('size', this.pageSize)
+      params.append('tenderType', this.query.tenderType)
+      params.append('tenderTitle', this.query.value)
+      params.append('tenderRule', this.query.tenderRule)
+      params.append('startTime',this.query.startTime )
+      params.append('endTime', this.query.endTime)
+
+      // const data = {
+      //   page: this.currentPage,
+      //   size: this.pageSize,
+      //   title: this.query.value
+      // }
+
+      getTableList(params).then(res => {
+        console.log(res)
+        // this.data = res.data.data.records
+        let data = res.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于投标结束时间,已结束")
+          }
+
+          return res
+        })
+        this.data = data
+        this.total = res.data.data.total
+        this.loading = false
+      })
+    },
+    // 点击时候
+    handleUpload(){
+      console.log("我被固定了")
+      if(this.form.tenderType ==undefined ||  this.form.tenderRule == undefined){
+       this.$message({
+          message: '请先选择招标类型和招标规则',
+          type: 'warning'
+        });
+      }
+      // return false
+    },
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+          this.form.fileUrl = file.response.data.filePath
+          this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+          this.fileList = []
+        }
+      }
+    },
+    // 点击文件列表中已上传的文件时的钩子
+    handlePreview(file) {
+      console.log(file, 'file21')
+      // 判断添加 还是 编辑
+      let officeUrl
+      if(this.isAdd){
+        officeUrl = 'http://view.officeapps.live.com/op/view.aspx?src='+file.response.data.filePath
+      }else{
+        officeUrl = 'http://view.officeapps.live.com/op/view.aspx?src='+this.form.fileUrl
+      }
+// 在新窗口打开编码后 的链接
+window.open(officeUrl,'_target')
+      // window.location.href = file.url
+    },
+    handleExceed(files, fileList) {
+      this.$message.warning(`当前限制选择 1 个附件,本次选择了 ${files.length} 个文件`)
+    },
+    hanndleErr(err, files, fileList) {
+      console.log(err, 'err')
+      console.log(files, 'err')
+      console.log(fileList, 'err')
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${file.name}?`)
+    },
+      onFile(){
+        // let url = "https://fire-development.oss-cn-beijing.aliyuncs.com/bid/dev/客户批量上传模板.xlsx"
+      if(this.form.tenderType ==undefined ||  this.form.tenderRule == undefined){
+       this.$message({
+          message: '请先选择招标类型和招标规则',
+          type: 'warning'
+        });
+      }else{
+        window.open(this.fileUrl, '_self');
+      }
+    },
+
+    // 字典名称提交动作
+    doSubmit() {
+      console.log(this.form)
+      this.$refs['form'].validate((valid) => {
+        console.log(valid)
+        if (valid) {
+          if (this.isAdd) {
+            // 新增字典
+            this.buton = true
+            getQueryAdd(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.dialog = false
+                this.getDictData()
+                this.buton = false
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+
+              this.$refs['form'].resetFields()
+            }).catch(err => {
+              this.buton = false
+            })
+          } else {
+            // 更新
+            getQueryEdit(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.getDictData()
+            })
+          }
+        }
+      })
+    },
+    formatDate(date) {
+      var myyear = date.getFullYear()
+      var mymonth = date.getMonth() + 1
+      var myweekday = date.getDate()
+
+      if (mymonth < 10) {
+        mymonth = '0' + mymonth
+      }
+      if (myweekday < 10) {
+        myweekday = '0' + myweekday
+      }
+      return myyear + '-' + mymonth + '-' + myweekday
+    },
+    // 添加字典
+    handleAdd: function() {
+      this.isAdd = true
+      this.form = {}
+      const end = new Date()
+      const start = new Date()
+      end.setTime(start.getTime() + 3600 * 1000 * 24 * 1)
+      console.log(this.formatDate(end))
+      this.form.startTime = this.formatDate(start) + ' 00:00:00'
+      this.form.endTime = this.formatDate(end) + ' 15:00:00'
+      this.bidDate = [this.form.startTime, this.form.endTime]
+      this.form.fileUrl = null
+      this.fileList = []
+      // 添加弹框中的附件,进来要隐藏
+      this.showType = false
+      this.dialog = true
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+    },
+    // 编辑字典
+    handleEdit: function(row) {
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+      const data = JSON.parse(JSON.stringify(row))
+      this.form = data
+      this.bidDate = [data.startTime, data.endTime]
+      // this.form.
+      // let name = data.appendix.lastIndexOf('/') ;
+      if (data.fileUrl) {
+        let name = data.fileUrl.split('/')
+        name = name.pop()
+        // let name = data.appendix.replace(/(.*\/)*([^.]+).*/ig, "$2");
+        this.fileList = [{ name: name, url: data.fileUrl }]
+      }
+      // 编辑弹框中的附件,进来要展示
+      this.showType = true
+      this.dialog = true
+      this.isAdd = false
+      // 下载模板类型
+      let tenderValue = this.tenderType[data.tenderType-1].value
+       apiFile(tenderValue).then((res)=>{
+        console.log(res)
+        this.fileUrl = res.data.data.path
+      })
+      console.log(data)
+    },
+     handleClick(row,val){
+      console.log(row,val)
+      if(row.name == "second"){
+       this.$refs.ckTable.tenderParentId = this.param.tenderParentId
+        this.$refs.ckTable.getTenantList()
+      }
+    },
+    // 详情
+    handleView(row) {
+      this.param.tenderParentId = row.tenderParentId
+      this.bidInfo = row
+      this.param.current = 1
+      this.getParam()
+
+         setTimeout(() => {
+        console.log(this.$refs.ckTable.tenderParentId,"1234")
+       this.$refs.ckTable.tenderParentId = row.tenderParentId
+        this.$refs.ckTable.getTenantList()
+      }, 300);
+      let tenderType = row.tenderType
+      if(tenderType == 1){
+        this.viewDialog = true
+         this.getParam()
+        console.log("物流")
+      }else if(tenderType == 3){
+        this.saleViewDialog = true
+        console.log("销售")
+      }
+    },
+    getParam(tenderParentId) {
+      const data = this.param
+      this.tableLoading = true
+      // getSaleId
+      // this.
+      getQueryId(data).then((res) => {
+        console.log(res.data.data.records, '')
+        let data = res.data.data.records
+         data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于投标结束时间,已结束")
+          }
+
+          return res
+        })
+        this.Paramdata = data
+        this.tableLoading = false
+        this.total1 = res.data.data.total
+      })
+    },
+    // 删除操作
+    subDelete(tenderParentId,tenderType) {
+      // const data = {
+      //   id: val
+      // }
+      getQueryDelete(tenderType,tenderParentId).then(res => {
+        if (res.data.code === 200) {
+          this.$message({ message: '已作废', type: 'success' })
+          this.getDictData()
+        }
+      }).catch(err => {
+        console.log(err.response.data.message)
+      })
+      this.$refs[tenderParentId].doClose()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      this.currentPage = val
+      this.getDictData()
+    },
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.getDictData()
+    },
+    handleCurrentChangeParam(val) {
+      this.param.current = val
+      this.getParam()
+    },
+    handleSizeChangeParam(val) {
+      this.param.size = val
+      this.getParam()
+    }
+  }
+}
+</script>
+
+<style scoped  lang="scss">
+/* 去掉上传附件时候的过度效果 */
+  ::v-deep .el-upload-list__item{transition: none !important;}
+   ::v-deep .el-textarea__inner{
+  padding-bottom: 36px;
+}
+.padding /deep/ .el-input--medium .el-input__inner {
+    padding-right: 56px;
+}
+/deep/ .el-upload-list__item-name {
+  width: 150px;
+}
+.ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+.paginationParam{
+  // bottom: 0;
+  // left: 0;
+  line-height: 80px;
+  width: 100%;
+  // left: 45%;
+  // text-align: right;
+  z-index: 999;
+  background: #fff;
+}
+/deep/ .el-tabs__item{
+  font-size: 16px !important;
+  // padding: 35px  ;
+}
+.el-card {
+  border: 0px solid #fff;
+}
+.clearfix {
+    line-height: 20px;
+    font-size: 18px;
+    font-weight: 600;
+    color: #409EFF;
+}
+/deep/.el-dialog.is-fullscreen {
+
+    background-color: #f5f7f9;
+}
+.box-card{
+  margin-bottom: 20px;
+  .row-bg{
+  padding: 15px 40px 0 40px;
+  .flex_text{
+    line-height: 50px;
+    color: #8C8C8C;
+    font-size: 14px;
+    // border:1px solid red;
+    // font-weight: 600;
+  }
+  .flex_name{
+    font-size: 14px;
+    padding-left: 25px;
+    color: #575757;
+    font-weight: 550;
+  }
+}
+}
+/deep/ .el-card__body{
+  padding: 20px 0;
+}
+/deep/.el-tabs__nav-wrap::after {
+
+    background-color: #dfe4ed00;  
+}
+</style>

+ 378 - 0
src/views/bid/tender1/dialog.vue

@@ -0,0 +1,378 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <div class="" style="margin: 10px 0 30px 0;">
+      <span style="font-size:14px">客户名称:</span>
+      <el-select v-model="goodsName" filterable style="width: 200px;" clearable size="small" placeholder="请选择" @clear="handleFind">
+            <el-option v-for="item in userDataList" :key="item.customerId" :label="item.customerName" :value="item.customerId" />
+          </el-select>
+      <span style="font-size:14px;margin-left:20px">是否为历史记录:</span>
+       <el-select v-model="historyValue" style="width: 200px;" @keyup.enter.native="handleFind" @clear="handleFind" size="small" clearable  value-key="areaId" filterable placeholder="请选择">
+        <el-option
+          v-for="item in history"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        />
+      </el-select>
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+    </div>
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+                            <el-table-column prop="customerName" fixed="left" label="产品名称" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="tenderSaleId" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" />
+
+                            <el-table-column prop="quantity"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="biddingPrice"  width="90" label="投标价格(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="totalPrice" width="90" label="总价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="phone" width="170" label="联系电话" :show-overflow-tooltip="true" align="center" />
+                             <el-table-column prop="appendix" label="凭证" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link :disabled="scope.row.voucherFile ? false : true" :href="scope.row.voucherFile" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+                                </template>
+                              </el-table-column>
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus == 5">已投递</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==6" type="info">审核中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==7" type="warning">已中标</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==8" type="danger">未中标</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==9" type="danger">已作废</el-tag>
+                            </template>
+                          </el-table-column>
+                            <el-table-column prop="biddingTime" label="投标时间"  width="152" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+                <el-table-column label="操作" width="250" fixed="right" align="center">
+          <template slot-scope="scope">
+            <el-button  slot="reference"  :disabled="scope.row.biddingStatus !=6"  icon="el-icon-check" type="text" @click="dialogVisible=true;dataForm=scope.row">中标</el-button>
+            <!-- <el-button  slot="reference"   icon="el-icon-check" type="text" @click="dialogVisible=true;dataForm=scope.row">中标</el-button> -->
+             <el-upload
+                    :disabled="scope.row.biddingStatus !=7"
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/tender/contract/send/' + scope.row.customerId"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                  >
+                          <el-button @click="handleUpload" :disabled="scope.row.biddingStatus !=7" class="el-icon-upload2" size="small" type="text" style="width:90px;font-size:14px ">发送合同</el-button>
+                  </el-upload>
+          </template>
+        </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+
+   <el-dialog
+      title=""
+      :visible.sync="dialogVisible"
+      width="35%"
+      top="35vh"
+      append-to-body
+     >
+      <span style="font-size:16px">此操作将“{{dataForm.customerName}}”,置中标</span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+            <el-upload
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/tender/contract/send/' + dataForm.customerId"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                  >
+                          <el-button @click="changeBid"  type="primary"  >确定并发送合同</el-button>
+                  </el-upload>
+        <el-button type="primary" @click="changeBid">确 定</el-button>
+        
+      </span>
+    </el-dialog>
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getBiddingSaleInfo,getCustomerName,getContract } from '@/api/bid'
+import { Notification, MessageBox } from 'element-ui'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: {},
+      SelectionList:[],
+      goodsName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      history:[
+        {id:0,name:"否"},
+        {id:1,name:"是"}
+      ],
+      historyValue:"",
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: 1,
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      userDataList:[],
+      startTime:"",
+      endTime:"",
+        isShow:true,
+        fileData:{}
+
+    }
+  },
+  created() {
+    this.onCustmerName()
+    console.log('res')
+  },
+  methods: {
+      // 置中标
+    changeBid(){
+      console.log(this.dataForm)
+      console.log(this.priceData,"priceData")
+      getContract(this.dataForm.tenderSaleId,this.dataForm.biddingSaleId,this.priceData.tenderType).then((res)=>{
+        if(res.data.code == 200){
+           this.$message({
+              message: '操作成功',
+              type: 'success'
+            });
+            this.dialogVisible = false
+            this.getTenantList()
+        }
+      })
+    },
+    // 点击时候
+    handleUpload(){
+      console.log(this.SelectionList,"我被固定了")
+      // if(this.SelectionList.length == 0){
+      //  this.$message({
+      //     message: '请先选择已中标的客户',
+      //     type: 'warning'
+      //   });
+      // }
+      // return false
+    },
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+           this.$message({
+              message: '合同发送成功',
+              type: 'success'
+            });
+          // this.form.fileUrl = file.response.data.filePath
+          // this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+        }
+      }
+    },
+    onCustmerName(){
+        getCustomerName().then((res)=>{
+            console.log(res)
+            this.userDataList = res.data.data
+        })
+    },
+      onshow(){
+          this.isShow = !this.isShow
+      },
+    parseTime,
+    getTenantList: function() {
+        console.log(this.priceData)
+      const params = new URLSearchParams()
+      params.append('tenderParentId', this.priceData.tenderParentId)
+      params.append('customerId', this.goodsName)
+      params.append('isHistory', this.historyValue)
+      params.append('tenderSaleId', this.priceData.tenderSaleId)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      this.loading =true
+      getBiddingSaleInfo(params).then(response => {
+        console.log(response)
+        this.loading = false
+         let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 投标时间
+          let startTime = this.priceData.endTime
+
+          const date = new Date(startTime)
+          const start = date.valueOf()         //开始时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          if(res.biddingStatus < 7){
+              console.log("我不满足")
+                if(time < start){
+                    res.biddingStatus = 5
+                    console.log("当前时间小于投标时间,已投递")
+                }else if(time > start){
+                    res.biddingStatus = 6
+                    console.log("当前时间小于投标时间,审核中")
+                }
+          }
+          return res
+        })
+        console.log(data)
+        this.tableData = data
+        console.log('1' + response.data.data)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = 1
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+.pagination{
+  padding-bottom: 30px;
+}
+</style>
+

+ 301 - 0
src/views/bid/tender1/table.vue

@@ -0,0 +1,301 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <div>
+      <span style="font-size:14px">产品名称:</span>
+      <el-input
+        v-model="productName"
+        clearable
+        placeholder="请输入产品"
+        style="width: 200px;margin-bottom:20px"
+        size="small"
+         @keyup.enter.native="handleFind"
+         @clear="handleFind"
+        class="filter-item"
+      />
+          <!-- <span style="fontSize:13px;marginLeft:20px">投标时间</span>
+            <el-date-picker
+              v-model="applyDateStart"
+              size="mini"
+              type="datetimerange"
+              style="width: 280px;"
+              range-separator="-"
+              clearable
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :default-time="['00:00:00', '23:59:59']"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+             @change="onApplyDate"
+             @clear="onApplyDate"
+            />
+ -->
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+    </div>
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+
+     <el-table-column prop="tenderCode" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="productName" fixed="left" label="产品名称" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="productEncode" width="150" label="产品内部编码" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="processingLocation"   label="加工地点(所在加工厂) " :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="number"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="lowestPrice"  width="90" label="最低价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="highestPrice" width="90" label="最高价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="biddingStartPrice" width="100" label="投标起价(元)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deposit" width="100" label="履约保证金" :show-overflow-tooltip="true" align="center" />
+                             <el-table-column prop="appendix" label="回执" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link :disabled="scope.row.receiptPathUrl ? false : true" :href="scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+                                </template>
+                              </el-table-column>
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                             <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                            </template>
+                          </el-table-column>
+                          <!-- <el-table-column prop="tenderSaleRule" width="100" label="中标规则" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.tenderSaleRule == 1" type="success" effect="plain">价低者得</el-tag>
+                                  <el-tag v-if="scope.row.tenderSaleRule == 2" effect="plain" >价高者得</el-tag>
+                              </template>
+                            </el-table-column> -->
+                            <el-table-column prop="startTime" width="152" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="endTime" width="152" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="createTime" label="创建时间"  width="152" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="saleRemark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+        <el-table-column label="操作" width="150" fixed="right" align="center">
+        <template slot-scope="scope">
+          <!-- <el-button type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == null" slot="reference" type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == 0" slot="reference" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">改标</el-button> -->
+          <!-- <el-button  slot="reference" type="text" :disabled="scope.row.status !=1" icon="el-icon-plus" @click="handleAdd(scope.row)">投标</el-button> -->
+          <el-button  slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">查看更多</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getBiddingSaleList } from '@/api/bid'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: [],
+      SelectionList:[],
+      productName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: 1,
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      startTime:"",
+      endTime:"",
+        // dialogTableVisible:false
+    }
+  },
+  created() {
+    // this.getTenantList()
+    console.log('res')
+  },
+  methods: {
+      handleView(row){
+          console.log("我被点击了")
+            this.$emit('change',row)
+        //   this.$parent.dialogTableVisible = true
+      },
+    parseTime,
+    getTenantList: function() {
+      this.loading = true
+      const params = new URLSearchParams()
+      params.append('tenderParentId', this.tenderParentId)
+      params.append('productName', this.productName)
+      // params.append('startTime', this.startTime)
+      // params.append('endTime', this.endTime)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      getBiddingSaleList(params).then(response => {
+        console.log(response)
+        this.loading = false
+          let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+         // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+          if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于投标结束时间,待处理")
+          }
+          return res
+        })
+        this.tableData = data
+        console.log('1' + response.data.data.records)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = 1
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+
+</style>
+

+ 838 - 0
src/views/bid/tender1/tender.vue

@@ -0,0 +1,838 @@
+<template>
+    <div>
+          <el-dialog :append-to-body="true" fullscreen :visible.sync="viewDialog" title="" center>
+                  <el-card class="box-card" shadow="nerver">
+                    <div slot="header" class="clearfix">
+                      <span class="topClass">基本信息</span>
+                    </div>
+
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                           标题 : <span class="flex_name"> {{bidInfo.tenderTitle}}</span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                           状态 : <span class="flex_name"> <el-tag effect="plain" v-if="bidInfo.status ==1">进行中</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==2" type="info">已结束</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==3" type="danger">已作废</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==4" type="warning">未开始</el-tag>
+                                </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         招标类型 :  <span class="flex_name"><el-tag v-if="bidInfo.tenderType == 1"  >物流</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 2" >原料</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 3" >销售</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 4" >加工承揽</el-tag>
+                                    </span>
+                       </el-col>
+                    </el-row>
+                     <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                         招标规则 : <span class="flex_name">    <el-tag v-if="bidInfo.tenderRule == 1" type="success" effect="plain">价低者得</el-tag>
+          <el-tag v-if="bidInfo.tenderRule == 2" effect="plain" >价高者得</el-tag></span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         开始时间 : <span class="flex_name"> {{bidInfo.startTime}} </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         截止时间 :  <span class="flex_name">{{bidInfo.endTime}}
+                                    </span>
+                       </el-col>
+                    </el-row>
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="24" class="flex_text">
+                            备注:<span class="flex_name">{{bidInfo.tenderRemark}}</span>
+                       </el-col>
+                    </el-row>
+                  </el-card>
+                   <el-card class="box-card" shadow="nerver">
+                        <div slot="header" class="clearfix">
+                          <span class="topClass"> 所有标的</span>
+                        </div>
+                      <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
+                        <el-tab-pane label="标的详情" name="first">
+
+                          <div class="head-container" style="margin: 30px 0 10px 0;">
+                            <span style="fontSize:13px">产品名称</span>
+                              <el-input
+                                v-model="param.productName"
+                                clearable
+                                placeholder="请输入产品名称"
+                                style="width: 200px;"
+                                size="small"
+                                class="filter-item"
+                                @keyup.enter.native="getParamFexd"
+                                @clear="getParamFexd"
+                              />
+                            <span style="fontSize:13px;marginLeft:20px">编码</span>
+                              <el-input
+                                v-model="param.productEncode"
+                                clearable
+                                placeholder="请输入编码"
+                                style="width: 200px;"
+                                size="small"
+                                class="filter-item"
+                                @keyup.enter.native="getParamFexd"
+                                @clear="getParamFexd"
+                              />
+                            <span style="fontSize:13px;marginLeft:20px">加工地点</span>
+                              <el-input
+                                v-model="param.processingLocation"
+                                clearable
+                                placeholder="请输入加工地点"
+                                style="width: 200px;"
+                                size="small"
+                                class="filter-item"
+                                @keyup.enter.native="getParamFexd"
+                                @clear="getParamFexd"
+                              />
+                               <span style="fontSize:13px;marginLeft:30px;">是否投标</span>
+                                          <el-select v-model="param.saleIsTender" size="small"  @keyup.enter.native="getParamFexd" @clear="getParamFexd" clearable placeholder="请选择">
+                                            <el-option  label="未投标" value="0"> </el-option>
+                                            <el-option  label="有投标" value="1"> </el-option>
+                                          </el-select>
+                            <span style="fontSize:13px;marginLeft:20px">发标时间</span>
+                              <el-date-picker
+                                v-model="applyDateStart"
+                                size="small"
+                                type="datetimerange"
+                                style="width: 400px;"
+                                range-separator="-"
+                                clearable
+                                value-format="yyyy-MM-dd HH:mm:ss"
+                                :default-time="['00:00:00', '23:59:59']"
+                                start-placeholder="开始日期"
+                                end-placeholder="结束日期"
+                              @change="onApplyDate"
+                              @clear="onApplyDate"
+                              />
+                              <div style="text-align: right;margin-right:40px;margin-top:20px">
+                                   <el-button class="filter-item" style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="getParamFexd">搜索</el-button>
+                              </div>
+                          <div style="height:20px"></div>
+                          <el-table center :data="Paramdata" :header-cell-style="{ background: '#f5f7fa', }" border v-loading="tableLoading" stripe style="width: 100%;">
+
+                            <el-table-column prop="tenderCode" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="productName" width="150" fixed="left" label="产品名称" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="productEncode" width="150" label="产品内部编码" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="processingLocation"   label="加工地点(所在加工厂) " :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="number"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="lowestPrice"  width="90" label="最低价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="highestPrice" width="90" label="最高价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="biddingStartPrice" width="100" label="投标起价价(元)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deposit" width="100" label="履约保证金" :show-overflow-tooltip="true" align="center" />
+                             <el-table-column prop="appendix" label="回执" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link :disabled="scope.row.receiptPathUrl ? false : true" :href="scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+                                </template>
+                              </el-table-column>
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                             <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                            </template>
+                          </el-table-column>
+                           <el-table-column prop="logisticsIsTender" label="是否投标" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                <el-tag v-if="scope.row.saleIsTender == 0" type="info">未投标</el-tag>
+                                <el-tag v-if="scope.row.saleIsTender == 1" type="warning">有投标</el-tag>
+                              </template>
+                            </el-table-column>
+                          <el-table-column prop="tenderSaleRule" width="100" label="中标规则" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.tenderSaleRule == 1" type="success" effect="plain">价低者得</el-tag>
+                                  <el-tag v-if="scope.row.tenderSaleRule == 2" effect="plain" >价高者得</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="startTime" width="152" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="endTime" width="152" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="createTime"  label="创建时间"  width="152" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="saleRemark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+                          </el-table>
+                          <div class="pagination">
+                            <el-pagination
+                              :current-page.sync="param.current"
+                              :page-size="param.size"
+                              layout="total, sizes, prev, pager, next, jumper"
+                              :total="total1"
+                              :page-sizes="[10, 20, 30, 50]"
+                              background
+                              @size-change="handleSizeChangeParam"
+                              @current-change="handleCurrentChangeParam"
+                            />
+                          </div>
+                  <!-- <div style="height:60px"></div> -->
+                    </div>
+
+                </el-tab-pane>
+                <el-tab-pane label="投标详情" name="second">
+                   <!-- <el-card class="box-card" shadow="nerver"> -->
+                      <!-- <div slot="header" class="clearfix">
+                        <span class="topClass">投标详情</span>
+                      </div> -->
+                              <ckTable ref="ckTable" @change="costPlannedAmountChange($event)"></ckTable>
+                   <!-- </el-card> -->
+                </el-tab-pane>
+              </el-tabs>
+             
+                      </el-card>
+          <el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '投标' : '修标'" width="50%">
+                      <el-form ref="form" :model="form" :rules="rules1" label-width="80px">
+                        <el-form-item label="货物名称">
+                           <!-- <span>{{form.biddingLogisticsRemark}}</span> -->
+                           <el-tag>{{form.goodsName}}</el-tag>
+                            <!-- <el-input  v-model="form.goodsName" style="width:50%" readonly></el-input> -->
+                        </el-form-item>
+                         <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="始发车站" prop="departureStation">
+                              <el-input v-model="form.departureStation" style="width: 80%;" placeholder="请输入始发车站"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="目的车站" prop="destinationStation">
+                                <el-input v-model="form.destinationStation" style="width: 80%;" placeholder="请输入目的车站"></el-input>
+                              </el-form-item>
+                          </el-col>
+                         </el-row>
+                        
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="包装方式" prop="packingWay">
+                              <el-select v-model="form.packingWay" style="width: 80%;"  filterable placeholder="请选择包装方式">
+                                  <el-option
+                                    v-for="item in packingWay"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id"
+                                  />
+                                </el-select>
+                            </el-form-item>
+                           </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                           <el-form-item label="运输方式" prop="transportMode">
+                             <el-select v-model="form.transportMode" style="width: 80%;"  filterable placeholder="请选择包装方式">
+                                <el-option
+                                  v-for="item in transportMode"
+                                  :key="item.id"
+                                  :label="item.name"
+                                  :value="item.id"
+                                />
+                              </el-select>
+                           </el-form-item>
+                        </el-col>
+                        </el-row>
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="数量" prop="quantity">
+                              <el-input v-model="form.quantity" readonly style="width: 80%;" placeholder="数量"><template slot="append">(吨)</template></el-input>
+                           <!-- <span style="fontSize:16px" effect="plain">{{form.quantity}} (吨)</span> -->
+                            <!-- <el-input v-model="form.quantity" style="width: 80%;" placeholder="请输入数量"></el-input> -->
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="投标价格" prop="logisticsBiddingPrice">
+                              <el-input v-model="form.logisticsBiddingPrice" style="width: 80%;" placeholder="请输入金额"><template slot="append">(吨/元)</template></el-input>
+                              <!-- <el-input v-model="form.logisticsBiddingPrice" @input="onlogistiicsPrice" style="width: 80%;" placeholder="请输入金额"><template slot="append">(吨/元)</template></el-input> -->
+                              <!-- <div style="color:#909399;fontSize:15px"> * <span style="color:#909399;fontSize:13px;position: relative;top:-5px">最大价格 {{form.transportUnitPrice}} </span> </div> -->
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                            <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="合计" prop="quantity">
+                              <el-input  :value="form.logisticsBiddingPrice ? (form.quantity *form.logisticsBiddingPrice).toFixed(4) : 0" readonly style="width: 80%;" placeholder="请输入金额"><template slot="append">(元)</template></el-input>
+                           <!-- <span style="fontSize:16px"  effect="plain">{{}} (吨/元)</span> -->
+                           <!-- <el-tag  style="fontSize:14px"  effect="plain">{{form.logisticsBiddingPrice=="NAN" ? (form.quantity *form.logisticsBiddingPrice).toFixed(4) : 0}} (吨/元)</el-tag> -->
+                            <!-- <el-input v-model="form.quantity" style="width: 80%;" placeholder="请输入数量"></el-input> -->
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                               <el-form-item label="上传凭证" >
+                              <el-upload
+                                  class="upload-demo"
+                                  :limit="1"
+                                  :on-preview="handlePreview"
+                                  :on-change="handleChange"
+                                  :on-remove="handleRemove"
+                                  :before-remove="beforeRemove"
+                                  :on-exceed="handleExceed"
+                                  :action="BASE_API+'/common/bidding/voucher'"
+                                  name="multipartFile"
+                                  list-type="text"
+                                  :file-list="fileList"
+                                  multiple
+                                >
+                                    <el-button class="el-icon-upload" >上传凭证</el-button>
+                                </el-upload>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="联系电话" prop="phone">
+                            <el-input v-model="form.phone" style="width: 80%;" placeholder="请输入联系电话"></el-input>
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="备注" prop="biddingLogisticsRemark">
+                                <el-input
+                                  v-model="form.biddingLogisticsRemark"
+                                  type="textarea"
+                                  style="width: 93%;"
+                                  :autosize="{ minRows: 2, maxRows: 10}"
+                                  maxlength="500"
+                                  show-word-limit
+                                  placeholder="请输入内容"
+                                />
+                              </el-form-item>
+                          </el-col>
+                        </el-row>
+                      </el-form>
+                      <div slot="footer" class="dialog-footer">
+                        <el-button @click="dialog = false">取消</el-button>
+                        <el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
+                      </div>
+                    </el-dialog>
+            
+                   <div slot="footer" class="paginationParam" style="paddingRight:">
+                    <!-- <el-button @click="viewDialog = false">取消</el-button> -->
+                    <el-button :loading="loading" type="primary" @click="viewDialog = false">返回</el-button>
+                  </div>
+
+                         <el-dialog :title="goodsName" width="90%" center :visible.sync="dialogTableVisible" append-to-body>
+                               <ckDialog ref="ckDialog"></ckDialog>
+                          </el-dialog>
+
+    </el-dialog>
+    </div>
+</template>
+
+<script>
+
+import {  getSaleId } from '@/api/bid'
+import { Notification, MessageBox } from 'element-ui'
+
+import ckTable from './table.vue'
+import ckDialog from './dialog.vue'
+export default {
+   components:{
+    ckTable,
+    ckDialog
+  },
+  data() {
+    const checkTel = (rule, value, callback) => {
+      if (value == null) {
+        callback(new Error('请选择附件'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      form: {
+      },
+      data: [{}],
+      active:0,
+      BASE_API: process.env.BASE_API,
+      dialog: false,
+      loading: false,
+      delLoading: false,
+      tableLoading:false,
+      viewDialog: false,
+      isAdd: false,
+      currentPage: 1,
+      pageSize: 10,
+      total: 0, // 总数量
+      rules1:{
+        departureStation:[
+          { required: true, message: '始发车站不为空', trigger: 'blur' },
+        ],
+         destinationStation:[
+          { required: true, message: '目的车站不为空', trigger: 'blur' },
+        ],
+         logisticsBiddingPrice:[
+          { required: true, message: '投标价格不为空', trigger: 'blur' },
+        ],
+         packingWay:[
+          { required: true, message: '包装方式不为空', trigger: 'blur' },
+        ],
+         phone:[
+          { required: true, message: '联系电话不为空', trigger: 'blur' },
+        ],
+         transportMode:[
+          { required: true, message: '运输方式不为空', trigger: 'blur' },
+        ],
+      },
+      rules: {
+
+        price: [
+          { required: true, message: '报价金额不为空', trigger: 'blur' },
+        ],
+        appendix: [
+          // { type:"array",required: true, message: '附件不为空', trigger: 'blur' },
+          { validator: checkTel, trigger: 'blur' }
+        ]
+      },
+      query: {
+        type: '',
+        value: '',
+         tenderRule:"",
+        tenderType:"",
+        startTime:"",
+        endTime:""
+      },
+      fileList: [],
+      param: {
+        current: 1,
+        size: 10
+      },
+      total1: 0,
+      Paramdata: [],
+      applyDateStart:[],
+      dialogTableData:[],
+       tenderRule:[
+        {id:1,name:"价低者得"},
+        {id:2,name:"价高者得"},
+
+      ],
+      packingWay:[
+        {id:1,name:"散粮"},
+        {id:2,name:"袋装"},
+        {id:3,name:"散装"},
+        {id:4,name:"集装箱"},
+      ],
+      transportMode:[
+        {id:1,name:"汽运"},
+        {id:2,name:"火车运输"},
+        {id:3,name:"船运"},
+        {id:4,name:"汽运/火车运输/船运"},
+        {id:5,name:"汽运/火车运输"},
+        {id:6,name:"汽运/船运"},
+      ],
+       activeName: 'first',
+       dialogTableVisible:false,
+       goodsName:"",
+       bidInfo:{}
+    }
+  },
+  created() {
+    // this.getDictData()
+  },
+  methods: {
+    // 投标详情 向父元素传递数据
+    costPlannedAmountChange(val){
+      console.log(val)
+ 
+      this.dialogTableVisible = true
+      setTimeout(() => {
+      //   this.goodsName = val.goodsName
+      //  this.$refs.ckDialog.priceData = val
+      // this.$refs.ckDialog.getTenantList()
+        // console.log(this.$refs.ckDialog)
+         this.goodsName = val.goodsName
+          this.$refs.ckDialog.historyValue = 0
+          this.$refs.ckDialog.goodsName = ""
+          this.$refs.ckDialog.priceData = val
+          this.$refs.ckDialog.handleFind()
+        console.log(this.$refs.ckDialog)
+      }, 300);
+    },
+    // 价格投标不能大于合计
+    onlogistiicsPrice(val){
+      console.log(val)
+       if(val>this.form.transportUnitPrice){
+         this.form.logisticsBiddingPrice = this.form.transportUnitPrice
+         console.log("我是大于")
+       }
+       if(val.indexOf('.') !== -1 && val == '.'){
+         this.form.logisticsBiddingPrice =0
+       }
+       if(val== "+" || val== "-"){
+         this.form.logisticsBiddingPrice = 0
+       }
+       if(val<0){
+         this.form.logisticsBiddingPrice = 0
+       }
+    },
+    onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.param.startTime =this.applyDateStart[0]
+              this.param.endTime = this.applyDateStart[1]
+            }else{
+              this.param.startTime =""
+              this.param.endTime =""
+            }
+
+      this.getParamFexd()
+    },
+    next() {
+      console.log(this.$refs.ckTable)
+        if (this.active++ > 2) this.active = 0;
+        this.dialogTableData = this.$refs.ckTable.SelectionList
+      },
+      handleSelectionChange(row){
+        
+      },
+    // 获取详情
+    getDictData: function() {
+      this.loading = true
+        const params = new URLSearchParams()
+      params.append('current', this.currentPage)
+      params.append('size', this.pageSize)
+      params.append('tenderType', this.query.tenderType)
+      params.append('tenderTitle', this.query.value)
+      params.append('tenderRule', this.query.tenderRule)
+      params.append('startTime',this.query.startTime )
+      params.append('endTime', this.query.endTime)
+
+      getTableList(params).then(res => {
+          console.log(res)
+        // this.data = res.data.data.records
+        let data = res.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于投标结束时间,已结束")
+          }
+
+          return res
+        })
+        this.data = data
+        this.total = res.data.data.total
+        this.loading = false
+      })
+    },
+
+    // 搜索
+    handleFind: function() {
+      this.currentPage = 1
+      this.getDictData()
+    },
+
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.voucherFile = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+          this.form.voucherFile = file.response.data.filePath
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+          this.fileList = []
+        }
+      }
+    },
+    // 点击文件列表中已上传的文件时的钩子
+    handlePreview(file) {
+      console.log(file, 'file1')
+      // window.location.href = file.url
+    },
+    handleExceed(files, fileList) {
+      this.$message.warning(`当前限制选择 1 个附件,本次选择了 ${files.length} 个文件`)
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${file.name}?`)
+    },
+    // 下载
+    onLoad(row) {
+      // const params = new URLSearchParams()
+      // params.append('path', row)
+      const a = document.createElement('a')
+      // a.href= /bidding/load
+      const url = window.location.origin + process.env.BASE_API + '/bidding/load?path=' + encodeURIComponent(row)
+      a.href = url
+      a.click()
+    },
+
+    // 字典名称提交动作
+    doSubmit() {
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          if (this.isAdd) {
+            // 新增字典
+            console.log(this.form)
+            this.loading = true
+            getQueryAdd(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.loading = false
+              this.getDictData()
+              this.$refs['form'].resetFields()
+            }).catch(err => {
+              this.loading = false
+            })
+          } else {
+            // 更新字典
+            getQueryEdit(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.getDictData()
+            })
+          }
+        }
+      })
+    },
+    // 添加字典
+    handleAdd: function(row) {
+      this.dialog = true
+      this.isAdd = true
+      this.form = {}
+      this.fileList = []
+      this.form.tenderLogisticsId = row.logisticsBidId
+      this.form.tenderParentId = this.param.tenderParentId
+      this.form.quantity = row.goodsNumber
+      this.form.goodsName = row.goodsName
+      this.form.transportUnitPrice = row.transportUnitPrice
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+    },
+    // 编辑字典
+    handleEdit: function(row) {
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+      this.dialog = true
+      this.isAdd = false
+      this.form = row.bidding
+      this.form.priceQuotes = row.priceQuotes
+      if (this.form.appendix) {
+        let name = this.form.appendix.split('bidding/')
+        name = name.pop()
+        // let name = data.appendix.replace(/(.*\/)*([^.]+).*/ig, "$2");
+        this.fileList = [{ name: name, url: this.form.appendix }]
+      }
+    },
+    handleClick(row,val){
+      console.log(row,val)
+      if(row.name == "second"){
+       this.$refs.ckTable.tenderParentId = this.param.tenderParentId
+         this.$refs.ckTable.productName = ""
+        this.$refs.ckTable.handleFind()
+      }
+    },
+    handleView(row) {
+      let tenderType = row.tenderType
+      if(tenderType == 1){
+        this.$refs.ckTender.viewDialog = true
+         setTimeout(() => {
+            this.$refs.ckTender.activeName="first"
+            this.$refs.ckTender.param.tenderParentId = row.tenderParentId
+            this.$refs.ckTender.bidInfo = row
+            this.$refs.ckTender.param.current = 1
+            this.$refs.ckTender.getParam()
+            console.log("物流")
+      }, 300);
+      }else if(tenderType == 3){
+        this.saleViewDialog = true
+        console.log("销售")
+      }
+    },
+    // 所有标的搜索
+    getParamFexd(){
+      this.param.current = 1
+      this.getParam()
+    },
+    // 所有标的列表数据
+    getParam() {
+      const data = this.param
+      this.tableLoading = true
+      getSaleId(data).then((res) => {
+       console.log(res.data.data.records, '')
+        let data = res.data.data.records
+         data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于投标结束时间,待处理")
+          }
+
+          return res
+        })
+        this.Paramdata = data
+        this.tableLoading = false
+        this.total1 = res.data.data.total
+      })
+    },
+
+    // 换页
+    handleCurrentChange: function(val) {
+      this.currentPage = val
+      this.getDictData()
+    },
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.getDictData()
+    },
+    handleCurrentChangeParam(val) {
+      this.param.current = val
+      this.getParam()
+    },
+    handleSizeChangeParam(val) {
+      this.param.size = val
+      this.getParam()
+    }
+  }
+}
+</script>
+<style scoped lang="scss">
+/* 去掉上传附件时候的过度效果 */
+  ::v-deep .el-upload-list__item{transition: none !important;}
+  ::v-deep .el-textarea__inner{
+  padding-bottom: 36px;
+}
+.btn_fixed{
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  padding: 15px 50px;
+  width: 100%;
+  text-align: right;
+  background: #f5f5f5;
+
+}
+.ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+.paginationParam{
+  // position: fixed;
+  // bottom: 50px;
+  bottom: 0;
+  left: 0;
+  line-height: 80px;
+  width: 100%;
+  // left: 45%;
+  // text-align: right;
+  z-index: 999;
+  background: #fff;
+}
+/deep/ .el-tabs__item{
+  font-size: 16px !important;
+  // padding: 35px  ;
+}
+.el-card {
+  border: 0px solid #fff;
+}
+.clearfix {
+    line-height: 20px;
+    font-size: 18px;
+    font-weight: 600;
+    color: #409EFF;
+}
+/deep/.el-dialog.is-fullscreen {
+
+    background-color: #f5f7f9;
+}
+.box-card{
+  margin-bottom: 20px;
+  .row-bg{
+  padding: 15px 40px 0 40px;
+  .flex_text{
+    line-height: 50px;
+    color: #8C8C8C;
+    font-size: 14px;
+    // border:1px solid red;
+    // font-weight: 600;
+  }
+  .flex_name{
+    font-size: 14px;
+    padding-left: 25px;
+    color: #575757;
+    font-weight: 550;
+  }
+}
+}
+/deep/ .el-card__body{
+  padding: 20px 0;
+}
+/deep/.el-tabs__nav-wrap::after {
+
+    background-color: #dfe4ed00;  
+}
+/deep/ .el-dialog--center .el-dialog__body {
+    text-align: initial;
+    padding: 25px 25px 0px 30px;
+}
+
+/deep/ .el-tabs--border-card{
+  // border-top:1px ;
+  border-bottom: 0px;
+
+ box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.5)
+}
+
+</style>
+

+ 398 - 0
src/views/bid/tender2/dialog.vue

@@ -0,0 +1,398 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <div class="" style="margin: 10px 0 30px 0;">
+      <span style="font-size:14px">客户名称:</span>
+      <el-select v-model="goodsName" filterable style="width: 200px;" clearable size="small" placeholder="请选择" @clear="handleFind">
+            <el-option v-for="item in userDataList" :key="item.customerId" :label="item.customerName" :value="item.customerId" />
+          </el-select>
+      <span style="font-size:14px;margin-left:20px">是否为历史记录:</span>
+       <el-select v-model="historyValue" style="width: 200px;" @keyup.enter.native="handleFind" @clear="handleFind" size="small" clearable  value-key="areaId" filterable placeholder="请选择">
+        <el-option
+          v-for="item in history"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        />
+      </el-select>
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+    </div>
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+                            <el-table-column prop="customerName" width="170" fixed="left" label="产品名称" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="rawTenderId" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" />
+
+                            <el-table-column prop="quantity"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="biddingPrice"  width="90" label="投标价格(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="totalPrice" width="90" label="总价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="priceProvision"  width="100" label="价格条款" :show-overflow-tooltip="true" align="center" >
+                                <template slot-scope="scope">
+                                    <span v-if="scope.row.priceProvision ==1"> 港口平仓价</span>
+                                    <span v-if="scope.row.priceProvision ==2"> 到厂价</span>
+                                    <span v-if="scope.row.priceProvision ==3"> 自提价</span>
+                                </template>
+                            </el-table-column>
+                                 <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus == 5">已投递</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==6" type="info">审核中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==7" type="warning">已中标</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==8" type="danger">未中标</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==9" type="danger">已作废</el-tag>
+                            </template>
+                          </el-table-column>
+                            <el-table-column prop="dateManufacture" label="生产日期"  width="152" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deliveryStartTime" width="170" label="交货开始" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deliveryEndTime" width="170" label="交货结束" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deliveryLocation" width="170" label="交货地点" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="invoiceRate"  label="发票税率(%)" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <span>{{scope.row.invoiceRate}}</span> <span v-if="scope.row.invoiceRate"> %</span>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop=""  width="90" label="发票种类" :show-overflow-tooltip="true" align="center" >
+                                <template slot-scope="scope">
+                                    <span v-if="scope.row.invoiceType ==1"> 普票</span>
+                                    <span v-if="scope.row.invoiceType ==2"> 专票</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="phone" width="170" label="联系电话" :show-overflow-tooltip="true" align="center" />
+                             <el-table-column prop="appendix" label="凭证" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link :disabled="scope.row.voucherFile ? false : true" :href="scope.row.voucherFile" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+                                </template>
+                              </el-table-column>
+                        
+                            <el-table-column prop="biddingTime" label="投标时间"  width="152" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+                <el-table-column label="操作" width="250" fixed="right" align="center">
+          <template slot-scope="scope">
+            <el-button  slot="reference"  :disabled="scope.row.biddingStatus !=6"  icon="el-icon-check" type="text" @click="dialogVisible=true;dataForm=scope.row">中标</el-button>
+             <el-upload
+                     :disabled="scope.row.biddingStatus !=7"
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/tender/contract/send/' + scope.row.customerId"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                  >
+                          <el-button @click="handleUpload"  class="el-icon-upload2" :disabled="scope.row.biddingStatus !=7" size="small" type="text" style="width:90px;font-size:14px ">发送合同</el-button>
+                  </el-upload>
+          </template>
+        </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+   <el-dialog
+      title=""
+      :visible.sync="dialogVisible"
+      width="35%"
+      top="35vh"
+      append-to-body
+     >
+      <span style="font-size:16px">此操作将“{{dataForm.customerName}}”,置中标</span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+            <el-upload
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/tender/contract/send/' + dataForm.customerId"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                  >
+                          <el-button @click="changeBid"  type="primary"  >确定并发送合同</el-button>
+                  </el-upload>
+        <el-button type="primary" @click="changeBid">确 定</el-button>
+        
+      </span>
+    </el-dialog>
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getBiddingRowInfo,getCustomerName,getContract } from '@/api/bid'
+import { Notification, MessageBox } from 'element-ui'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: {},
+      SelectionList:[],
+      goodsName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      history:[
+        {id:0,name:"否"},
+        {id:1,name:"是"}
+      ],
+      historyValue:"",
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: 1,
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      userDataList:[],
+      startTime:"",
+      endTime:"",
+        isShow:true,
+         showType:false,
+        fileData:{}
+    }
+  },
+  created() {
+    this.onCustmerName()
+    console.log('res')
+  },
+  methods: {
+     // 置中标
+    changeBid(){
+      console.log(this.dataForm)
+      console.log(this.priceData,"priceData")
+      getContract(this.dataForm.rawTenderId,this.dataForm.biddingRawId,this.priceData.tenderType).then((res)=>{
+        if(res.data.code == 200){
+           this.$message({
+              message: '操作成功',
+              type: 'success'
+            });
+            this.dialogVisible = false
+            this.getTenantList()
+        }
+      })
+    },
+    // 点击时候
+    handleUpload(){
+      console.log(this.SelectionList,"我被固定了")
+      // if(this.SelectionList.length == 0){
+      //  this.$message({
+      //     message: '请先选择已中标的客户',
+      //     type: 'warning'
+      //   });
+      // }
+      // return false
+    },
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+           this.$message({
+              message: '合同发送成功',
+              type: 'success'
+            });
+          // this.form.fileUrl = file.response.data.filePath
+          // this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+        }
+      }
+    },
+    onCustmerName(){
+        getCustomerName().then((res)=>{
+            console.log(res)
+            this.userDataList = res.data.data
+        })
+    },
+      onshow(){
+          this.isShow = !this.isShow
+      },
+    parseTime,
+    getTenantList: function() {
+        console.log(this.priceData)
+      const params = new URLSearchParams()
+      params.append('tenderParentId', this.priceData.tenderParentId)
+      params.append('customerId', this.goodsName)
+      params.append('isHistory', this.historyValue)
+      params.append('rawTenderId', this.priceData.rawTenderId)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      this.loading =true
+      getBiddingRowInfo(params).then(response => {
+        console.log(response)
+        this.loading = false
+         let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 投标时间
+          let startTime = this.priceData.endTime
+
+          const date = new Date(startTime)
+          const start = date.valueOf()         //开始时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          if(res.biddingStatus < 7){
+              console.log("我不满足")
+                if(time < start){
+                    res.biddingStatus = 5
+                    console.log("当前时间小于投标时间,已投递")
+                }else if(time > start){
+                    res.biddingStatus = 6
+                    console.log("当前时间小于投标时间,审核中")
+                }
+          }
+          return res
+        })
+        console.log(data)
+        this.tableData = data
+        console.log('1' + response.data.data)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = 1
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+.pagination{
+  padding-bottom: 30px;
+}
+</style>
+

+ 307 - 0
src/views/bid/tender2/table.vue

@@ -0,0 +1,307 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <div>
+      <span style="font-size:14px">品种:</span>
+      <el-input
+        v-model="goodsName"
+        clearable
+        placeholder="请输入货物"
+        style="width: 200px;margin-bottom:20px"
+        size="small"
+         @keyup.enter.native="handleFind"
+         @clear="handleFind"
+        class="filter-item"
+      />
+          <!-- <span style="fontSize:13px;marginLeft:20px">投标时间</span>
+            <el-date-picker
+              v-model="applyDateStart"
+              size="mini"
+              type="datetimerange"
+              style="width: 280px;"
+              range-separator="-"
+              clearable
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :default-time="['00:00:00', '23:59:59']"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+             @change="onApplyDate"
+             @clear="onApplyDate"
+            />
+ -->
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+    </div>
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+     
+    <el-table-column prop="tenderRawCode" width="150" label="标的编码" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="breeds"   label="品种" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="number"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="unitPrice" width="100" label="单价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                              <el-table-column prop="deliveryMethod" width="100" label="交付方式" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.deliveryMethod == 1" type="success" effect="plain">自提</el-tag>
+                                  <el-tag v-if="scope.row.deliveryMethod == 2" effect="plain" >送货到厂</el-tag>
+                              </template>
+                            </el-table-column>
+                              <el-table-column prop="deliveryMethod" label="等级" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.level == 5" >二级</el-tag>
+                                  <el-tag v-if="scope.row.level == 6" >三级</el-tag>
+                              </template>
+                            </el-table-column>
+                         <el-table-column prop="appendix" label="回执" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link :disabled="scope.row.receiptPathUrl ? false : true" :href="scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+                                </template>
+                              </el-table-column>
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                             <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                            </template>
+                          </el-table-column>
+                          <el-table-column prop="tenderLogisticsRule" label="中标规则" width="100" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.rule == 1" type="success" effect="plain">价低者得</el-tag>
+                                  <el-tag v-if="scope.row.rule == 2" effect="plain" >价高者得</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="startTime" width="152" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="endTime" width="152" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="createTime" label="创建时间"  width="152" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+        <el-table-column label="操作" width="250" fixed="right" align="center">
+        <template slot-scope="scope">
+          <el-button  slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">查看更多</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getTenderRawList } from '@/api/tender'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: [],
+      SelectionList:[],
+      goodsName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: 1,
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      startTime:"",
+      endTime:"",
+        // dialogTableVisible:false
+    }
+  },
+  created() {
+    // this.getTenantList()
+    console.log('res')
+  },
+  methods: {
+      handleAdd(row){
+      this.$emit("onAdd",row)
+    },
+      handleView(row){
+          console.log("我被点击了")
+            this.$emit('change',row)
+        //   this.$parent.dialogTableVisible = true
+      },
+    parseTime,
+    getTenantList: function() {
+      this.loading = true
+      const params = new URLSearchParams()
+      params.append('tenderParentId', this.tenderParentId)
+      params.append('breeds', this.goodsName)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      getTenderRawList(params).then(response => {
+        console.log(response)
+        this.loading = false
+          let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+           if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于投标结束时间,待处理")
+          }
+          return res
+        })
+
+   
+        this.tableData = data
+        console.log('1' + response.data.data.records)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = 1
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+
+</style>
+

+ 827 - 0
src/views/bid/tender2/tender.vue

@@ -0,0 +1,827 @@
+<template>
+    <div>
+          <el-dialog :append-to-body="true" fullscreen :visible.sync="viewDialog" title="" center>
+                  <el-card class="box-card" shadow="nerver">
+                    <div slot="header" class="clearfix">
+                      <span class="topClass">基本信息</span>
+                    </div>
+
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                           标题 : <span class="flex_name"> {{bidInfo.tenderTitle}}</span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                           状态 : <span class="flex_name"> <el-tag effect="plain" v-if="bidInfo.status ==1">进行中</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==2" type="info">已结束</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==3" type="danger">已作废</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==4" type="warning">未开始</el-tag>
+                                </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         招标类型 :  <span class="flex_name"><el-tag v-if="bidInfo.tenderType == 1"  >物流</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 2" >原料</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 3" >销售</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 4" >加工承揽</el-tag>
+                                    </span>
+                       </el-col>
+                    </el-row>
+                     <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                         招标规则 : <span class="flex_name">    <el-tag v-if="bidInfo.tenderRule == 1" type="success" effect="plain">价低者得</el-tag>
+          <el-tag v-if="bidInfo.tenderRule == 2" effect="plain" >价高者得</el-tag></span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         开始时间 : <span class="flex_name"> {{bidInfo.startTime}} </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         截止时间 :  <span class="flex_name">{{bidInfo.endTime}}
+                                    </span>
+                       </el-col>
+                    </el-row>
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="24" class="flex_text">
+                            备注:<span class="flex_name">{{bidInfo.tenderRemark}}</span>
+                       </el-col>
+                    </el-row>
+                  </el-card>
+                   <el-card class="box-card" shadow="nerver">
+                        <div slot="header" class="clearfix">
+                          <span class="topClass"> 所有标的</span>
+                        </div>
+                      <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
+                        <el-tab-pane label="标的详情" name="first">
+
+                          <div class="head-container" style="margin: 30px 0 10px 0;">
+                            <span style="fontSize:13px">品种</span>
+                              <el-input
+                                v-model="param.breeds"
+                                clearable
+                                placeholder="请输入产品名称"
+                                style="width: 200px;"
+                                size="small"
+                                class="filter-item"
+                                @keyup.enter.native="getParamFexd"
+                                @clear="getParamFexd"
+                              />
+                            <span style="fontSize:13px;marginLeft:20px">交付方式</span>
+                               <el-select v-model="param.deliveryMethod" style="width:200px;" size="small"  @keyup.enter.native="getParamFexd" @clear="getParamFexd" clearable filterable placeholder="请选择交付方式">
+                                  <el-option
+                                    v-for="item in deliveryMethod"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id"
+                                  />
+                                </el-select>
+                            <span style="fontSize:13px;marginLeft:20px">等级</span>
+                              <el-select v-model="param.level" size="small" style="width: 200px;"  @keyup.enter.native="getParamFexd" @clear="getParamFexd" clearable filterable placeholder="请选择等级">
+                                  <el-option
+                                    v-for="item in level"
+                                    :key="item.name"
+                                    :label="item.name"
+                                    :value="item.name"
+                                  />
+                                </el-select>
+                                 <span style="fontSize:13px;marginLeft:30px;">是否投标</span>
+                              <el-select v-model="param.rawIsTender" size="small"  @keyup.enter.native="getParamFexd" @clear="getParamFexd" clearable placeholder="请选择">
+                                <el-option  label="未投标" value="0"> </el-option>
+                                <el-option  label="有投标" value="1"> </el-option>
+                              </el-select>
+                            <span style="fontSize:13px;marginLeft:20px">发标时间</span>
+                              <el-date-picker
+                                v-model="applyDateStart"
+                                size="small"
+                                type="datetimerange"
+                                style="width: 400px;"
+                                range-separator="-"
+                                clearable
+                                value-format="yyyy-MM-dd HH:mm:ss"
+                                :default-time="['00:00:00', '23:59:59']"
+                                start-placeholder="开始日期"
+                                end-placeholder="结束日期"
+                              @change="onApplyDate"
+                              @clear="onApplyDate"
+                              />
+                              <div style="text-align: right;margin-right:40px;margin-top:20px">
+                                   <el-button class="filter-item" style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="getParamFexd">搜索</el-button>
+                              </div>
+                          <div style="height:20px"></div>
+                          <el-table center :data="Paramdata" :header-cell-style="{ background: '#f5f7fa', }" border v-loading="tableLoading" stripe style="width: 100%;">
+
+                            <!-- <el-table-column prop="rawTenderId" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="tenderRawCode" width="150" label="标的编码" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="breeds"   label="品种" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="number"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="unitPrice" width="100" label="单价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                              <el-table-column prop="deliveryMethod" width="100" label="交付方式" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.deliveryMethod == 1" type="success" effect="plain">自提</el-tag>
+                                  <el-tag v-if="scope.row.deliveryMethod == 2" effect="plain" >送货到厂</el-tag>
+                              </template>
+                            </el-table-column>
+                              <el-table-column prop="deliveryMethod" label="等级" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.level == 5" >二级</el-tag>
+                                  <el-tag v-if="scope.row.level == 6" >三级</el-tag>
+                              </template>
+                            </el-table-column>
+                             <el-table-column prop="appendix" label="回执" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link :disabled="scope.row.receiptPathUrl ? false : true" :href="scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+                                </template>
+                              </el-table-column>
+
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                             <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                            </template>
+                          </el-table-column>
+                            <el-table-column prop="logisticsIsTender" label="是否投标" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                <el-tag v-if="scope.row.rawIsTender == 0" type="info">未投标</el-tag>
+                                <el-tag v-if="scope.row.rawIsTender == 1" type="warning">有投标</el-tag>
+                              </template>
+                            </el-table-column>
+                          <el-table-column prop="tenderLogisticsRule" label="中标规则" width="100" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.rule == 1" type="success" effect="plain">价低者得</el-tag>
+                                  <el-tag v-if="scope.row.rule == 2" effect="plain" >价高者得</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="startTime" width="152" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="endTime" width="152" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="createTime" label="创建时间"  width="152" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+                
+                          </el-table>
+                          <div class="pagination">
+                            <el-pagination
+                              :current-page.sync="param.current"
+                              :page-size="param.size"
+                              layout="total, sizes, prev, pager, next, jumper"
+                              :total="total1"
+                              :page-sizes="[10, 20, 30, 50]"
+                              background
+                              @size-change="handleSizeChangeParam"
+                              @current-change="handleCurrentChangeParam"
+                            />
+                          </div>
+                  <!-- <div style="height:60px"></div> -->
+                    </div>
+
+                </el-tab-pane>
+                <el-tab-pane label="投标详情" name="second">
+                   <!-- <el-card class="box-card" shadow="nerver"> -->
+                      <!-- <div slot="header" class="clearfix">
+                        <span class="topClass">投标详情</span>
+                      </div> -->
+                              <ckTable ref="ckTable" @change="costPlannedAmountChange($event)"></ckTable>
+                   <!-- </el-card> -->
+                </el-tab-pane>
+              </el-tabs>
+             
+                      </el-card>
+          <el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '投标' : '修标'" width="50%">
+                      <el-form ref="form" :model="form" :rules="rules1" label-width="80px">
+                        <el-form-item label="货物名称">
+                           <!-- <span>{{form.biddingLogisticsRemark}}</span> -->
+                           <el-tag>{{form.goodsName}}</el-tag>
+                            <!-- <el-input  v-model="form.goodsName" style="width:50%" readonly></el-input> -->
+                        </el-form-item>
+                         <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="始发车站" prop="departureStation">
+                              <el-input v-model="form.departureStation" style="width: 80%;" placeholder="请输入始发车站"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="目的车站" prop="destinationStation">
+                                <el-input v-model="form.destinationStation" style="width: 80%;" placeholder="请输入目的车站"></el-input>
+                              </el-form-item>
+                          </el-col>
+                         </el-row>
+                        
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="包装方式" prop="packingWay">
+                              <el-select v-model="form.packingWay" style="width: 80%;"  filterable placeholder="请选择包装方式">
+                                  <el-option
+                                    v-for="item in packingWay"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id"
+                                  />
+                                </el-select>
+                            </el-form-item>
+                           </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                           <el-form-item label="运输方式" prop="transportMode">
+                             <el-select v-model="form.transportMode" style="width: 80%;"  filterable placeholder="请选择包装方式">
+                                <el-option
+                                  v-for="item in transportMode"
+                                  :key="item.id"
+                                  :label="item.name"
+                                  :value="item.id"
+                                />
+                              </el-select>
+                           </el-form-item>
+                        </el-col>
+                        </el-row>
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="数量" prop="quantity">
+                              <el-input v-model="form.quantity" readonly style="width: 80%;" placeholder="数量"><template slot="append">(吨)</template></el-input>
+                           <!-- <span style="fontSize:16px" effect="plain">{{form.quantity}} (吨)</span> -->
+                            <!-- <el-input v-model="form.quantity" style="width: 80%;" placeholder="请输入数量"></el-input> -->
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="投标价格" prop="logisticsBiddingPrice">
+                              <el-input v-model="form.logisticsBiddingPrice" style="width: 80%;" placeholder="请输入金额"><template slot="append">(吨/元)</template></el-input>
+                              <!-- <el-input v-model="form.logisticsBiddingPrice" @input="onlogistiicsPrice" style="width: 80%;" placeholder="请输入金额"><template slot="append">(吨/元)</template></el-input> -->
+                              <!-- <div style="color:#909399;fontSize:15px"> * <span style="color:#909399;fontSize:13px;position: relative;top:-5px">最大价格 {{form.transportUnitPrice}} </span> </div> -->
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                            <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="合计" prop="quantity">
+                              <el-input  :value="form.logisticsBiddingPrice ? (form.quantity *form.logisticsBiddingPrice).toFixed(4) : 0" readonly style="width: 80%;" placeholder="请输入金额"><template slot="append">(元)</template></el-input>
+                           <!-- <span style="fontSize:16px"  effect="plain">{{}} (吨/元)</span> -->
+                           <!-- <el-tag  style="fontSize:14px"  effect="plain">{{form.logisticsBiddingPrice=="NAN" ? (form.quantity *form.logisticsBiddingPrice).toFixed(4) : 0}} (吨/元)</el-tag> -->
+                            <!-- <el-input v-model="form.quantity" style="width: 80%;" placeholder="请输入数量"></el-input> -->
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                               <el-form-item label="上传凭证" >
+                              <el-upload
+                                  class="upload-demo"
+                                  :limit="1"
+                                  :on-preview="handlePreview"
+                                  :on-change="handleChange"
+                                  :on-remove="handleRemove"
+                                  :before-remove="beforeRemove"
+                                  :on-exceed="handleExceed"
+                                  :action="BASE_API+'/common/bidding/voucher'"
+                                  name="multipartFile"
+                                  list-type="text"
+                                  :file-list="fileList"
+                                  multiple
+                                >
+                                    <el-button class="el-icon-upload" >上传凭证</el-button>
+                                </el-upload>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="联系电话" prop="phone">
+                            <el-input v-model="form.phone" style="width: 80%;" placeholder="请输入联系电话"></el-input>
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="备注" prop="biddingLogisticsRemark">
+                                <el-input
+                                  v-model="form.biddingLogisticsRemark"
+                                  type="textarea"
+                                  style="width: 93%;"
+                                  :autosize="{ minRows: 2, maxRows: 10}"
+                                  maxlength="500"
+                                  show-word-limit
+                                  placeholder="请输入内容"
+                                />
+                              </el-form-item>
+                          </el-col>
+                        </el-row>
+                      </el-form>
+                      <div slot="footer" class="dialog-footer">
+                        <el-button @click="dialog = false">取消</el-button>
+                        <el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
+                      </div>
+                    </el-dialog>
+            
+                   <div slot="footer" class="paginationParam" style="paddingRight:">
+                    <!-- <el-button @click="viewDialog = false">取消</el-button> -->
+                    <el-button :loading="loading" type="primary" @click="viewDialog = false">返回</el-button>
+                  </div>
+
+                         <el-dialog :title="goodsName" width="90%" center :visible.sync="dialogTableVisible" append-to-body>
+                               <ckDialog ref="ckDialog"></ckDialog>
+                          </el-dialog>
+
+    </el-dialog>
+    </div>
+</template>
+
+<script>
+
+import {  getTenderRaw } from '@/api/bid'
+import { Notification, MessageBox } from 'element-ui'
+
+import ckTable from './table.vue'
+import ckDialog from './dialog.vue'
+export default {
+   components:{
+    ckTable,
+    ckDialog
+  },
+  data() {
+    const checkTel = (rule, value, callback) => {
+      if (value == null) {
+        callback(new Error('请选择附件'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      form: {
+      },
+      data: [{}],
+      active:0,
+      BASE_API: process.env.BASE_API,
+      dialog: false,
+      loading: false,
+      delLoading: false,
+      tableLoading:false,
+      viewDialog: false,
+      isAdd: false,
+      currentPage: 1,
+      pageSize: 10,
+      total: 0, // 总数量
+      rules1:{
+        departureStation:[
+          { required: true, message: '始发车站不为空', trigger: 'blur' },
+        ],
+         destinationStation:[
+          { required: true, message: '目的车站不为空', trigger: 'blur' },
+        ],
+         logisticsBiddingPrice:[
+          { required: true, message: '投标价格不为空', trigger: 'blur' },
+        ],
+         packingWay:[
+          { required: true, message: '包装方式不为空', trigger: 'blur' },
+        ],
+         phone:[
+          { required: true, message: '联系电话不为空', trigger: 'blur' },
+        ],
+         transportMode:[
+          { required: true, message: '运输方式不为空', trigger: 'blur' },
+        ],
+      },
+      rules: {
+
+        price: [
+          { required: true, message: '报价金额不为空', trigger: 'blur' },
+        ],
+        appendix: [
+          // { type:"array",required: true, message: '附件不为空', trigger: 'blur' },
+          { validator: checkTel, trigger: 'blur' }
+        ]
+      },
+      query: {
+        type: '',
+        value: '',
+         tenderRule:"",
+        tenderType:"",
+        startTime:"",
+        endTime:""
+      },
+      fileList: [],
+      param: {
+        current: 1,
+        size: 10
+      },
+      total1: 0,
+      Paramdata: [],
+      applyDateStart:[],
+      dialogTableData:[],
+       level:[
+        {id:1,name:"二级"},
+        {id:2,name:"三级"},
+
+      ],
+      deliveryMethod:[
+        {id:1,name:"自提"},
+        {id:2,name:"送货到厂"},
+      ],
+      packingWay:[],
+      transportMode:[
+        {id:1,name:"汽运"},
+        {id:2,name:"火车运输"},
+        {id:3,name:"船运"},
+        {id:4,name:"汽运/火车运输/船运"},
+        {id:5,name:"汽运/火车运输"},
+        {id:6,name:"汽运/船运"},
+      ],
+       activeName: 'first',
+       dialogTableVisible:false,
+       goodsName:"",
+       bidInfo:{}
+    }
+  },
+  created() {
+    // this.getDictData()
+  },
+  methods: {
+    // 投标详情 向父元素传递数据
+    costPlannedAmountChange(val){
+      console.log(val)
+ 
+      this.dialogTableVisible = true
+      setTimeout(() => {
+      //   this.goodsName = val.goodsName
+      //  this.$refs.ckDialog.priceData = val
+      // this.$refs.ckDialog.getTenantList()
+      //   console.log(this.$refs.ckDialog)
+       this.goodsName = val.goodsName
+          this.$refs.ckDialog.historyValue = 0
+          this.$refs.ckDialog.goodsName = ""
+          this.$refs.ckDialog.priceData = val
+          this.$refs.ckDialog.handleFind()
+      }, 300);
+    },
+    // 价格投标不能大于合计
+    onlogistiicsPrice(val){
+      console.log(val)
+       if(val>this.form.transportUnitPrice){
+         this.form.logisticsBiddingPrice = this.form.transportUnitPrice
+         console.log("我是大于")
+       }
+       if(val.indexOf('.') !== -1 && val == '.'){
+         this.form.logisticsBiddingPrice =0
+       }
+       if(val== "+" || val== "-"){
+         this.form.logisticsBiddingPrice = 0
+       }
+       if(val<0){
+         this.form.logisticsBiddingPrice = 0
+       }
+    },
+    onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.param.startTime =this.applyDateStart[0]
+              this.param.endTime = this.applyDateStart[1]
+            }else{
+              this.param.startTime =""
+              this.param.endTime =""
+            }
+
+      this.getParamFexd()
+    },
+    next() {
+      console.log(this.$refs.ckTable)
+        if (this.active++ > 2) this.active = 0;
+        this.dialogTableData = this.$refs.ckTable.SelectionList
+      },
+      handleSelectionChange(row){
+        
+      },
+    // 获取详情
+    getDictData: function() {
+      this.loading = true
+        const params = new URLSearchParams()
+      params.append('current', this.currentPage)
+      params.append('size', this.pageSize)
+      params.append('tenderType', this.query.tenderType)
+      params.append('tenderTitle', this.query.value)
+      params.append('tenderRule', this.query.tenderRule)
+      params.append('startTime',this.query.startTime )
+      params.append('endTime', this.query.endTime)
+
+      getTableList(params).then(res => {
+          console.log(res)
+        // this.data = res.data.data.records
+        let data = res.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于投标结束时间,已结束")
+          }
+
+          return res
+        })
+        this.data = data
+        this.total = res.data.data.total
+        this.loading = false
+      })
+    },
+
+    // 搜索
+    handleFind: function() {
+      this.currentPage = 1
+      this.getDictData()
+    },
+
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.voucherFile = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+          this.form.voucherFile = file.response.data.filePath
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+          this.fileList = []
+        }
+      }
+    },
+    // 点击文件列表中已上传的文件时的钩子
+    handlePreview(file) {
+      console.log(file, 'file1')
+      // window.location.href = file.url
+    },
+    handleExceed(files, fileList) {
+      this.$message.warning(`当前限制选择 1 个附件,本次选择了 ${files.length} 个文件`)
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${file.name}?`)
+    },
+    // 下载
+    onLoad(row) {
+      // const params = new URLSearchParams()
+      // params.append('path', row)
+      const a = document.createElement('a')
+      // a.href= /bidding/load
+      const url = window.location.origin + process.env.BASE_API + '/bidding/load?path=' + encodeURIComponent(row)
+      a.href = url
+      a.click()
+    },
+
+    // 字典名称提交动作
+    doSubmit() {
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          if (this.isAdd) {
+            // 新增字典
+            console.log(this.form)
+            this.loading = true
+            getQueryAdd(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.loading = false
+              this.getDictData()
+              this.$refs['form'].resetFields()
+            }).catch(err => {
+              this.loading = false
+            })
+          } else {
+            // 更新字典
+            getQueryEdit(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.getDictData()
+            })
+          }
+        }
+      })
+    },
+    // 添加字典
+    handleAdd: function(row) {
+      this.dialog = true
+      this.isAdd = true
+      this.form = {}
+      this.fileList = []
+      this.form.tenderLogisticsId = row.logisticsBidId
+      this.form.tenderParentId = this.param.tenderParentId
+      this.form.quantity = row.goodsNumber
+      this.form.goodsName = row.goodsName
+      this.form.transportUnitPrice = row.transportUnitPrice
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+    },
+    // 编辑字典
+    handleEdit: function(row) {
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+      this.dialog = true
+      this.isAdd = false
+      this.form = row.bidding
+      this.form.priceQuotes = row.priceQuotes
+      if (this.form.appendix) {
+        let name = this.form.appendix.split('bidding/')
+        name = name.pop()
+        // let name = data.appendix.replace(/(.*\/)*([^.]+).*/ig, "$2");
+        this.fileList = [{ name: name, url: this.form.appendix }]
+      }
+    },
+    handleClick(row,val){
+      console.log(row,val)
+      if(row.name == "second"){
+       this.$refs.ckTable.tenderParentId = this.param.tenderParentId
+        // this.$refs.ckTable.getTenantList()
+        this.$refs.ckTable.goodsName = ""
+        this.$refs.ckTable.handleFind()
+      }
+    },
+
+    // 所有标的搜索
+    getParamFexd(){
+      this.param.current = 1
+      this.getParam()
+    },
+    // 所有标的列表数据
+    getParam() {
+      const data = this.param
+      this.tableLoading = true
+      getTenderRaw(data).then((res) => {
+       console.log(this.bidInfo, 'bidInfo')
+        let data = res.data.data.records
+         data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于投标结束时间,待处理")
+          }
+
+          return res
+        })
+        this.Paramdata = data
+        this.tableLoading = false
+        this.total1 = res.data.data.total
+      })
+    },
+
+    // 换页
+    handleCurrentChange: function(val) {
+      this.currentPage = val
+      this.getDictData()
+    },
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.getDictData()
+    },
+    handleCurrentChangeParam(val) {
+      this.param.current = val
+      this.getParam()
+    },
+    handleSizeChangeParam(val) {
+      this.param.size = val
+      this.getParam()
+    }
+  }
+}
+</script>
+<style scoped lang="scss">
+/* 去掉上传附件时候的过度效果 */
+  ::v-deep .el-upload-list__item{transition: none !important;}
+  ::v-deep .el-textarea__inner{
+  padding-bottom: 36px;
+}
+.btn_fixed{
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  padding: 15px 50px;
+  width: 100%;
+  text-align: right;
+  background: #f5f5f5;
+
+}
+.ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+.paginationParam{
+  // position: fixed;
+  // bottom: 50px;
+  bottom: 0;
+  left: 0;
+  line-height: 80px;
+  width: 100%;
+  // left: 45%;
+  // text-align: right;
+  z-index: 999;
+  background: #fff;
+}
+/deep/ .el-tabs__item{
+  font-size: 16px !important;
+  // padding: 35px  ;
+}
+.el-card {
+  border: 0px solid #fff;
+}
+.clearfix {
+    line-height: 20px;
+    font-size: 18px;
+    font-weight: 600;
+    color: #409EFF;
+}
+/deep/.el-dialog.is-fullscreen {
+
+    background-color: #f5f7f9;
+}
+.box-card{
+  margin-bottom: 20px;
+  .row-bg{
+  padding: 15px 40px 0 40px;
+  .flex_text{
+    line-height: 50px;
+    color: #8C8C8C;
+    font-size: 14px;
+    // border:1px solid red;
+    // font-weight: 600;
+  }
+  .flex_name{
+    font-size: 14px;
+    padding-left: 25px;
+    color: #575757;
+    font-weight: 550;
+  }
+}
+}
+/deep/ .el-card__body{
+  padding: 20px 0;
+}
+/deep/.el-tabs__nav-wrap::after {
+
+    background-color: #dfe4ed00;  
+}
+/deep/ .el-dialog--center .el-dialog__body {
+    text-align: initial;
+    padding: 25px 25px 0px 30px;
+}
+
+/deep/ .el-tabs--border-card{
+  // border-top:1px ;
+  border-bottom: 0px;
+
+ box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.5)
+}
+
+</style>
+

+ 379 - 0
src/views/bid/tender3/dialog.vue

@@ -0,0 +1,379 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <div class="" style="margin: 10px 0 30px 0;">
+      <span style="font-size:14px">客户名称:</span>
+      <el-select v-model="goodsName" filterable style="width: 200px;" clearable size="small" placeholder="请选择" @clear="handleFind">
+            <el-option v-for="item in userDataList" :key="item.customerId" :label="item.customerName" :value="item.customerId" />
+          </el-select>
+      <span style="font-size:14px;margin-left:20px">是否为历史记录:</span>
+       <el-select v-model="historyValue" style="width: 200px;" @keyup.enter.native="handleFind" @clear="handleFind" size="small" clearable  value-key="areaId" filterable placeholder="请选择">
+        <el-option
+          v-for="item in history"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        />
+      </el-select>
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+    </div>
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+        <el-table-column prop="customerName" width="150" label="客户名称" :show-overflow-tooltip="true" align="center" />
+        <el-table-column prop="processingCode" width="150" label="标的编码" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="comesFrom"   label="产地" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="breeds"   label="品种" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="level"   label="等级" :show-overflow-tooltip="true" align="center" />
+              <el-table-column prop="appendix" label="凭证" align="center" width="100">
+                <template slot-scope="scope">
+                    <el-link :disabled="scope.row.voucherFile ? false : true" :href="scope.row.voucherFile" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+                </template>
+              </el-table-column>
+
+            <el-table-column label="状态" align="center" width="100">
+            <template slot-scope="scope">
+              <el-tag effect="plain" v-if="scope.row.biddingStatus == 5">已投递</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==6" type="info">审核中</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==7" type="warning">已中标</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==8" type="danger">未中标</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==9" type="danger">已作废</el-tag>
+            </template>
+          </el-table-column>
+            <el-table-column prop="storageAssistFee" width="100" label="出库辅助费" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="rentalFee"  label="租赁费" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="processFee"  label="加工费" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="biddingPrice" width="100" label="投标价格" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="quantity"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="phone" width="152" label="联系电话" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="biddingTime" label="投标时间"  width="152" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+              <el-table-column label="操作" width="250" fixed="right" align="center">
+          <template slot-scope="scope">
+            <el-button  slot="reference"  :disabled="scope.row.biddingStatus !=6"  icon="el-icon-check" type="text" @click="dialogVisible=true;dataForm=scope.row">中标</el-button>
+            <!-- <el-button  slot="reference"   icon="el-icon-check" type="text" @click="dialogVisible=true;dataForm=scope.row">中标</el-button> -->
+            <!-- :disabled="scope.row.biddingStatus !=7" -->
+             <el-upload
+                     :disabled="scope.row.biddingStatus !=7"
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/tender/contract/send/' + scope.row.customerId"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                  >
+                          <el-button @click="handleUpload" :disabled="scope.row.biddingStatus !=7"  class="el-icon-upload2" size="small" type="text" style="width:90px;font-size:14px ">发送合同</el-button>
+                  </el-upload>
+          </template>
+        </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+   <el-dialog
+      title=""
+      :visible.sync="dialogVisible"
+      width="35%"
+      top="35vh"
+      append-to-body
+     >
+      <span style="font-size:16px">此操作将“{{dataForm.customerName}}”,置中标</span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+            <el-upload
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/tender/contract/send/' + dataForm.customerId"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                  >
+                          <el-button @click="changeBid"  type="primary"  >确定并发送合同</el-button>
+                  </el-upload>
+        <el-button type="primary" @click="changeBid">确 定</el-button>
+        
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getBiddingList,getCustomerName,getContract } from '@/api/bid'
+import { Notification, MessageBox } from 'element-ui'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: {},
+      SelectionList:[],
+      goodsName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      history:[
+        {id:0,name:"否"},
+        {id:1,name:"是"}
+      ],
+      historyValue:"",
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: 1,
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      userDataList:[],
+      startTime:"",
+      endTime:"",
+        isShow:true
+    }
+  },
+  created() {
+    this.onCustmerName()
+    console.log('res')
+  },
+  methods: {
+          // 置中标
+    changeBid(){
+      console.log(this.dataForm)
+      console.log(this.priceData,"priceData")
+      getContract(this.dataForm.tenderProcessingId,this.dataForm.biddingProcessingId,this.priceData.tenderType).then((res)=>{
+        if(res.data.code == 200){
+           this.$message({
+              message: '操作成功',
+              type: 'success'
+            });
+            this.dialogVisible = false
+            this.getTenantList()
+        }
+      })
+    },
+    // 点击时候
+    handleUpload(){
+      console.log(this.SelectionList,"我被固定了")
+      // if(this.SelectionList.length == 0){
+      //  this.$message({
+      //     message: '请先选择已中标的客户',
+      //     type: 'warning'
+      //   });
+      // }
+      // return false
+    },
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+           this.$message({
+              message: '合同发送成功',
+              type: 'success'
+            });
+          // this.form.fileUrl = file.response.data.filePath
+          // this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+        }
+      }
+    },
+    onCustmerName(){
+        getCustomerName().then((res)=>{
+            console.log(res)
+            this.userDataList = res.data.data
+        })
+    },
+      onshow(){
+          this.isShow = !this.isShow
+      },
+    parseTime,
+    getTenantList: function() {
+        console.log(this.priceData)
+      const params = new URLSearchParams()
+      params.append('tenderParentId', this.priceData.tenderParentId)
+      params.append('customerId', this.goodsName)
+      params.append('isHistory', this.historyValue)
+      params.append('biddingProcessingId', this.priceData.tenderProcessingId)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      this.loading =true
+      getBiddingList(params).then(response => {
+        console.log(response)
+        this.loading = false
+         let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 投标时间
+          let startTime = this.priceData.endTime
+
+          const date = new Date(startTime)
+          const start = date.valueOf()         //开始时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          if(res.biddingStatus < 7){
+              console.log("我不满足")
+                if(time < start){
+                    res.biddingStatus = 5
+                    console.log("当前时间小于投标时间,已投递")
+                }else if(time > start){
+                    res.biddingStatus = 6
+                    console.log("当前时间小于投标时间,审核中")
+                }
+          }
+          return res
+        })
+        console.log(data)
+        this.tableData = data
+        console.log('1' + response.data.data.records)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = 1
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+.pagination{
+  padding-bottom: 30px;
+}
+</style>
+

+ 325 - 0
src/views/bid/tender3/table.vue

@@ -0,0 +1,325 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <div>
+      <span style="font-size:14px">品种:</span>
+      <el-input
+        v-model="productName"
+        clearable
+        placeholder="请输入品种"
+        style="width: 200px;margin-bottom:20px"
+        size="small"
+         @keyup.enter.native="handleFind"
+         @clear="handleFind"
+        class="filter-item"
+      />
+          <!-- <span style="fontSize:13px;marginLeft:20px">投标时间</span>
+            <el-date-picker
+              v-model="applyDateStart"
+              size="mini"
+              type="datetimerange"
+              style="width: 280px;"
+              range-separator="-"
+              clearable
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :default-time="['00:00:00', '23:59:59']"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+             @change="onApplyDate"
+             @clear="onApplyDate"
+            />
+ -->
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+    </div>
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+
+           <!-- <el-table-column prop="rawTenderId" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="processingCode" width="150" label="标的编码" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="warehouseNumber"   label="仓号" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="comesFrom"   label="产地" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="produceAge"  width="120" label="生产年限" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="breeds"   label="品种" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="level"   label="等级" :show-overflow-tooltip="true" align="center" />
+                             <el-table-column prop="appendix" label="回执" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link :disabled="scope.row.receiptPathUrl ? false : true" :href="scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+                                </template>
+                              </el-table-column>
+
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                             <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                            </template>
+                          </el-table-column>
+
+                          <!-- <el-table-column prop="processingIsTender" label="是否投标" width="100" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.processingIsTender == 0" type="success" effect="plain">是</el-tag>
+                                  <el-tag v-if="scope.row.processingIsTender == 1" effect="plain" >否</el-tag>
+                              </template>
+                            </el-table-column> -->
+                        
+                            <el-table-column prop="quantity"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="nearFutureWater"  label="近期水分%" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="nearFutureImpurity"  label="近期杂质%" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="riceRatio"  label="整精米率%" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="normalLeavingCapacity"  label="承储库日正常出库能力" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deliveryMethod" label="常用出库方式" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.retrievalWay == 1" >铁路</el-tag>
+                                  <el-tag v-if="scope.row.retrievalWay == 2" >公路</el-tag>
+                                  <el-tag v-if="scope.row.retrievalWay == 3" >水路</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="leavingCapacityForty" width="100" label="是否具备40吨以上大型运输车辆装车计量能力" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="specialRailwayLine" width="100" label="有无铁路专用线" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="storageFoggy" width="100" label="是否露天储存" :show-overflow-tooltip="true" align="center" />
+                             <el-table-column prop="deliveryMethod" label="储粮形态" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.storageForm == 1" >包装</el-tag>
+                                  <el-tag v-if="scope.row.storageForm == 2" >散装</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="sampleLookTime" label="看样日期" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="ifSoothSaveConfirmSample"  label="是否由实际存储库点确认看样单" :show-overflow-tooltip="true" align="center" />
+
+
+                            <el-table-column prop="startTime" width="152" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="endTime" width="152" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+        <el-table-column label="操作" width="250" fixed="right" align="center">
+        <template slot-scope="scope">
+
+          <!-- <el-button  slot="reference" type="text" :disabled="scope.row.status !=3" icon="el-icon-plus" @click="handleAdd(scope.row)">投标</el-button> -->
+          <el-button  slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">查看更多</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getTenderInfoList } from '@/api/bid'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: [],
+      SelectionList:[],
+      productName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: 1,
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      startTime:"",
+      endTime:"",
+        // dialogTableVisible:false
+    }
+  },
+  created() {
+    // this.getTenantList()
+    console.log('res')
+  },
+  methods: {
+        handleAdd(row){
+      this.$emit("onAdd",row)
+    },
+      handleView(row){
+          console.log("我被点击了")
+            this.$emit('change',row)
+        //   this.$parent.dialogTableVisible = true
+      },
+    parseTime,
+    getTenantList: function() {
+      this.loading = true
+      const params = new URLSearchParams()
+      params.append('tenderParentId', this.tenderParentId)
+      params.append('breeds', this.productName)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      getTenderInfoList(params).then(response => {
+        console.log(response)
+        this.loading = false
+          let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+          if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于投标结束时间,待处理")
+          }
+          return res
+        })
+        this.tableData = data
+        console.log('1' + response.data.data.records)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = 1
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+
+</style>
+

+ 859 - 0
src/views/bid/tender3/tender.vue

@@ -0,0 +1,859 @@
+<template>
+    <div>
+          <el-dialog :append-to-body="true" fullscreen :visible.sync="viewDialog" title="" center>
+                  <el-card class="box-card" shadow="nerver">
+                    <div slot="header" class="clearfix">
+                      <span class="topClass">基本信息</span>
+                    </div>
+
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                           标题 : <span class="flex_name"> {{bidInfo.tenderTitle}}</span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                           状态 : <span class="flex_name"> <el-tag effect="plain" v-if="bidInfo.status ==1">进行中</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==2" type="info">已结束</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==3" type="danger">已作废</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==4" type="warning">未开始</el-tag>
+                                </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         招标类型 :  <span class="flex_name"><el-tag v-if="bidInfo.tenderType == 1"  >物流</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 2" >原料</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 3" >销售</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 4" >加工承揽</el-tag>
+                                    </span>
+                       </el-col>
+                    </el-row>
+                     <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                         招标规则 : <span class="flex_name">    <el-tag v-if="bidInfo.tenderRule == 1" type="success" effect="plain">价低者得</el-tag>
+          <el-tag v-if="bidInfo.tenderRule == 2" effect="plain" >价高者得</el-tag></span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         开始时间 : <span class="flex_name"> {{bidInfo.startTime}} </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         截止时间 :  <span class="flex_name">{{bidInfo.endTime}}
+                                    </span>
+                       </el-col>
+                    </el-row>
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="24" class="flex_text">
+                            备注:<span class="flex_name">{{bidInfo.tenderRemark}}</span>
+                       </el-col>
+                    </el-row>
+                  </el-card>
+                   <el-card class="box-card" shadow="nerver">
+                        <div slot="header" class="clearfix">
+                          <span class="topClass"> 所有标的</span>
+                        </div>
+                      <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
+                        <el-tab-pane label="标的详情" name="first">
+
+                          <div class="head-container" style="margin: 30px 0 10px 0;">
+                            <span style="fontSize:13px">品种</span>
+                              <el-input
+                                v-model="param.breeds"
+                                clearable
+                                placeholder="请输入产品名称"
+                                style="width: 200px;"
+                                size="small"
+                                class="filter-item"
+                                @keyup.enter.native="getParamFexd"
+                                @clear="getParamFexd"
+                              />
+                            <span style="fontSize:13px;marginLeft:20px">产地</span>
+                              <el-input
+                                v-model="param.comesFrom"
+                                clearable
+                                placeholder="请输入产品名称"
+                                style="width: 200px;"
+                                size="small"
+                                class="filter-item"
+                                @keyup.enter.native="getParamFexd"
+                                @clear="getParamFexd"
+                              />
+                            <!-- <span style="fontSize:13px;marginLeft:20px">交付方式</span>
+                               <el-select v-model="param.deliveryMethod" style="width:200px;" size="small"  @keyup.enter.native="getParamFexd" @clear="getParamFexd" clearable filterable placeholder="请选择交付方式">
+                                  <el-option
+                                    v-for="item in deliveryMethod"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id"
+                                  />
+                                </el-select>
+                            <span style="fontSize:13px;marginLeft:20px">等级</span>
+                              <el-select v-model="param.level" size="small" style="width: 200px;"  @keyup.enter.native="getParamFexd" @clear="getParamFexd" clearable filterable placeholder="请选择等级">
+                                  <el-option
+                                    v-for="item in level"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id"
+                                  />
+                                </el-select> -->
+                            <!-- <span style="fontSize:13px;marginLeft:30px;">是否作废</span>
+                            <el-select v-model="param.rawIsTender" size="small"  @keyup.enter.native="getParamFexd" @clear="getParamFexd" clearable placeholder="请选择">
+                                <el-option  label="未作废" value="0"> </el-option>
+                                <el-option  label="已作废" value="1"> </el-option>
+                              </el-select> -->
+                            <span style="fontSize:13px;marginLeft:20px">发标时间</span>
+                              <el-date-picker
+                                v-model="applyDateStart"
+                                size="small"
+                                type="datetimerange"
+                                style="width: 400px;"
+                                range-separator="-"
+                                clearable
+                                value-format="yyyy-MM-dd HH:mm:ss"
+                                :default-time="['00:00:00', '23:59:59']"
+                                start-placeholder="开始日期"
+                                end-placeholder="结束日期"
+                              @change="onApplyDate"
+                              @clear="onApplyDate"
+                              />
+                              <div style="text-align: right;margin-right:40px">
+                                   <el-button class="filter-item" style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="getParamFexd">搜索</el-button>
+                              </div>
+                          <div style="height:20px"></div>
+                          <el-table center :data="Paramdata" :header-cell-style="{ background: '#f5f7fa', }" border v-loading="tableLoading" stripe style="width: 100%;">
+
+                            <!-- <el-table-column prop="rawTenderId" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="processingCode" width="150" label="标的编码" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="trustBuyLocation" width="160"  label="委托收购库点" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="concreteStorageLocation"  width="150"  label="实际存储库点" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="warehouseNumber"   label="仓号" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="comesFrom"   label="产地" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="produceAge"  width="120" label="生产年限" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="breeds"   label="品种" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="level"   label="等级" :show-overflow-tooltip="true" align="center" />
+                             <el-table-column prop="appendix" label="回执" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link :disabled="scope.row.receiptPathUrl ? false : true" :href="scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+                                </template>
+                              </el-table-column>
+
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                             <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                            </template>
+                          </el-table-column>
+
+                           <el-table-column prop="logisticsIsTender" label="是否投标" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                <el-tag v-if="scope.row.processingIsTender == 0" type="info">未投标</el-tag>
+                                <el-tag v-if="scope.row.processingIsTender == 1" type="warning">有投标</el-tag>
+                              </template>
+                            </el-table-column>
+                          <el-table-column prop="tenderLogisticsRule" label="中标规则" width="100" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.rule == 1" type="success" effect="plain">价低者得</el-tag>
+                                  <el-tag v-if="scope.row.rule == 2" effect="plain" >价高者得</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="quantity"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="nearFutureWater"  label="近期水分%" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="nearFutureImpurity"  label="近期杂质%" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="riceRatio"  label="整精米率%" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="normalLeavingCapacity"  label="承储库日正常出库能力" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deliveryMethod" label="常用出库方式" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.retrievalWay == 1" >铁路</el-tag>
+                                  <el-tag v-if="scope.row.retrievalWay == 2" >公路</el-tag>
+                                  <el-tag v-if="scope.row.retrievalWay == 3" >水路</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="leavingCapacityForty" width="100" label="是否具备40吨以上大型运输车辆装车计量能力" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="specialRailwayLine" width="100" label="有无铁路专用线" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="storageFoggy" width="100" label="是否露天储存" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="distanceStation" width="100" label="距最近车站码头距离km" :show-overflow-tooltip="true" align="center" />
+                             <el-table-column prop="deliveryMethod" label="储粮形态" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.storageForm == 1" >包装</el-tag>
+                                  <el-tag v-if="scope.row.storageForm == 2" >散装</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="sampleLookTime" label="看样日期" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="ifSoothSaveConfirmSample"  label="是否由实际存储库点确认看样单" :show-overflow-tooltip="true" align="center" />
+                        
+
+                            <el-table-column prop="startTime" width="152" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="endTime" width="152" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="createTime" label="创建时间"  width="152" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+                 
+                          </el-table>
+                          <div class="pagination">
+                            <el-pagination
+                              :current-page.sync="param.current"
+                              :page-size="param.size"
+                              layout="total, sizes, prev, pager, next, jumper"
+                              :total="total1"
+                              :page-sizes="[10, 20, 30, 50]"
+                              background
+                              @size-change="handleSizeChangeParam"
+                              @current-change="handleCurrentChangeParam"
+                            />
+                          </div>
+                  <!-- <div style="height:60px"></div> -->
+                    </div>
+
+                </el-tab-pane>
+                <el-tab-pane label="投标详情" name="second">
+                   <!-- <el-card class="box-card" shadow="nerver"> -->
+                      <!-- <div slot="header" class="clearfix">
+                        <span class="topClass">投标详情</span>
+                      </div> -->
+                              <ckTable ref="ckTable" @change="costPlannedAmountChange($event)"></ckTable>
+                   <!-- </el-card> -->
+                </el-tab-pane>
+              </el-tabs>
+             
+                      </el-card>
+          <el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '投标' : '修标'" width="50%">
+                      <el-form ref="form" :model="form" :rules="rules1" label-width="80px">
+                        <el-form-item label="货物名称">
+                           <!-- <span>{{form.biddingLogisticsRemark}}</span> -->
+                           <el-tag>{{form.goodsName}}</el-tag>
+                            <!-- <el-input  v-model="form.goodsName" style="width:50%" readonly></el-input> -->
+                        </el-form-item>
+                         <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="始发车站" prop="departureStation">
+                              <el-input v-model="form.departureStation" style="width: 80%;" placeholder="请输入始发车站"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="目的车站" prop="destinationStation">
+                                <el-input v-model="form.destinationStation" style="width: 80%;" placeholder="请输入目的车站"></el-input>
+                              </el-form-item>
+                          </el-col>
+                         </el-row>
+                        
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="包装方式" prop="packingWay">
+                              <el-select v-model="form.packingWay" style="width: 80%;"  filterable placeholder="请选择包装方式">
+                                  <el-option
+                                    v-for="item in packingWay"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id"
+                                  />
+                                </el-select>
+                            </el-form-item>
+                           </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                           <el-form-item label="运输方式" prop="transportMode">
+                             <el-select v-model="form.transportMode" style="width: 80%;"  filterable placeholder="请选择包装方式">
+                                <el-option
+                                  v-for="item in transportMode"
+                                  :key="item.id"
+                                  :label="item.name"
+                                  :value="item.id"
+                                />
+                              </el-select>
+                           </el-form-item>
+                        </el-col>
+                        </el-row>
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="数量" prop="quantity">
+                              <el-input v-model="form.quantity" readonly style="width: 80%;" placeholder="数量"><template slot="append">(吨)</template></el-input>
+                           <!-- <span style="fontSize:16px" effect="plain">{{form.quantity}} (吨)</span> -->
+                            <!-- <el-input v-model="form.quantity" style="width: 80%;" placeholder="请输入数量"></el-input> -->
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="投标价格" prop="logisticsBiddingPrice">
+                              <el-input v-model="form.logisticsBiddingPrice" style="width: 80%;" placeholder="请输入金额"><template slot="append">(吨/元)</template></el-input>
+                              <!-- <el-input v-model="form.logisticsBiddingPrice" @input="onlogistiicsPrice" style="width: 80%;" placeholder="请输入金额"><template slot="append">(吨/元)</template></el-input> -->
+                              <!-- <div style="color:#909399;fontSize:15px"> * <span style="color:#909399;fontSize:13px;position: relative;top:-5px">最大价格 {{form.transportUnitPrice}} </span> </div> -->
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                            <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="合计" prop="quantity">
+                              <el-input  :value="form.logisticsBiddingPrice ? (form.quantity *form.logisticsBiddingPrice).toFixed(4) : 0" readonly style="width: 80%;" placeholder="请输入金额"><template slot="append">(元)</template></el-input>
+                           <!-- <span style="fontSize:16px"  effect="plain">{{}} (吨/元)</span> -->
+                           <!-- <el-tag  style="fontSize:14px"  effect="plain">{{form.logisticsBiddingPrice=="NAN" ? (form.quantity *form.logisticsBiddingPrice).toFixed(4) : 0}} (吨/元)</el-tag> -->
+                            <!-- <el-input v-model="form.quantity" style="width: 80%;" placeholder="请输入数量"></el-input> -->
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                               <el-form-item label="上传凭证" >
+                              <el-upload
+                                  class="upload-demo"
+                                  :limit="1"
+                                  :on-preview="handlePreview"
+                                  :on-change="handleChange"
+                                  :on-remove="handleRemove"
+                                  :before-remove="beforeRemove"
+                                  :on-exceed="handleExceed"
+                                  :action="BASE_API+'/common/bidding/voucher'"
+                                  name="multipartFile"
+                                  list-type="text"
+                                  :file-list="fileList"
+                                  multiple
+                                >
+                                    <el-button class="el-icon-upload" >上传凭证</el-button>
+                                </el-upload>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="联系电话" prop="phone">
+                            <el-input v-model="form.phone" style="width: 80%;" placeholder="请输入联系电话"></el-input>
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="备注" prop="biddingLogisticsRemark">
+                                <el-input
+                                  v-model="form.biddingLogisticsRemark"
+                                  type="textarea"
+                                  style="width: 93%;"
+                                  :autosize="{ minRows: 2, maxRows: 10}"
+                                  maxlength="500"
+                                  show-word-limit
+                                  placeholder="请输入内容"
+                                />
+                              </el-form-item>
+                          </el-col>
+                        </el-row>
+                      </el-form>
+                      <div slot="footer" class="dialog-footer">
+                        <el-button @click="dialog = false">取消</el-button>
+                        <el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
+                      </div>
+                    </el-dialog>
+            
+                   <div slot="footer" class="paginationParam" style="paddingRight:">
+                    <!-- <el-button @click="viewDialog = false">取消</el-button> -->
+                    <el-button :loading="loading" type="primary" @click="viewDialog = false">返回</el-button>
+                  </div>
+
+                         <el-dialog :title="goodsName" width="90%" center :visible.sync="dialogTableVisible" append-to-body>
+                               <ckDialog ref="ckDialog"></ckDialog>
+                          </el-dialog>
+
+    </el-dialog>
+    </div>
+</template>
+
+<script>
+
+import {  getTenderProcessing } from '@/api/bid'
+import { Notification, MessageBox } from 'element-ui'
+
+import ckTable from './table.vue'
+import ckDialog from './dialog.vue'
+export default {
+   components:{
+    ckTable,
+    ckDialog
+  },
+  data() {
+    const checkTel = (rule, value, callback) => {
+      if (value == null) {
+        callback(new Error('请选择附件'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      form: {
+      },
+      data: [{}],
+      active:0,
+      BASE_API: process.env.BASE_API,
+      dialog: false,
+      loading: false,
+      delLoading: false,
+      tableLoading:false,
+      viewDialog: false,
+      isAdd: false,
+      currentPage: 1,
+      pageSize: 10,
+      total: 0, // 总数量
+      rules1:{
+        departureStation:[
+          { required: true, message: '始发车站不为空', trigger: 'blur' },
+        ],
+         destinationStation:[
+          { required: true, message: '目的车站不为空', trigger: 'blur' },
+        ],
+         logisticsBiddingPrice:[
+          { required: true, message: '投标价格不为空', trigger: 'blur' },
+        ],
+         packingWay:[
+          { required: true, message: '包装方式不为空', trigger: 'blur' },
+        ],
+         phone:[
+          { required: true, message: '联系电话不为空', trigger: 'blur' },
+        ],
+         transportMode:[
+          { required: true, message: '运输方式不为空', trigger: 'blur' },
+        ],
+      },
+      rules: {
+
+        price: [
+          { required: true, message: '报价金额不为空', trigger: 'blur' },
+        ],
+        appendix: [
+          // { type:"array",required: true, message: '附件不为空', trigger: 'blur' },
+          { validator: checkTel, trigger: 'blur' }
+        ]
+      },
+      query: {
+        type: '',
+        value: '',
+         tenderRule:"",
+        tenderType:"",
+        startTime:"",
+        endTime:""
+      },
+      fileList: [],
+      param: {
+        current: 1,
+        size: 10
+      },
+      total1: 0,
+      Paramdata: [],
+      applyDateStart:[],
+      dialogTableData:[],
+       level:[
+        {id:1,name:"二级"},
+        {id:2,name:"三级"},
+
+      ],
+      deliveryMethod:[
+        {id:1,name:"自提"},
+        {id:2,name:"送货到厂"},
+      ],
+      packingWay:[],
+      transportMode:[
+        {id:1,name:"汽运"},
+        {id:2,name:"火车运输"},
+        {id:3,name:"船运"},
+        {id:4,name:"汽运/火车运输/船运"},
+        {id:5,name:"汽运/火车运输"},
+        {id:6,name:"汽运/船运"},
+      ],
+       activeName: 'first',
+       dialogTableVisible:false,
+       goodsName:"",
+       bidInfo:{}
+    }
+  },
+  created() {
+    // this.getDictData()
+  },
+  methods: {
+    // 投标详情 向父元素传递数据
+    costPlannedAmountChange(val){
+      console.log(val,"我是val")
+ 
+      this.dialogTableVisible = true
+      setTimeout(() => {
+        this.goodsName = val.goodsName
+      // //  this.$refs.ckDialog.historyValue = 0
+      //  this.$refs.ckDialog.goodsName = ""
+      //  this.$refs.ckDialog.priceData = val
+      // this.$refs.ckDialog.getTenantList()
+      //   console.log(this.$refs.ckDialog)
+       this.goodsName = val.goodsName
+          this.$refs.ckDialog.historyValue = 0
+          this.$refs.ckDialog.goodsName = ""
+          this.$refs.ckDialog.priceData = val
+          this.$refs.ckDialog.handleFind()
+      }, 300);
+    },
+    // 价格投标不能大于合计
+    onlogistiicsPrice(val){
+      console.log(val)
+       if(val>this.form.transportUnitPrice){
+         this.form.logisticsBiddingPrice = this.form.transportUnitPrice
+         console.log("我是大于")
+       }
+       if(val.indexOf('.') !== -1 && val == '.'){
+         this.form.logisticsBiddingPrice =0
+       }
+       if(val== "+" || val== "-"){
+         this.form.logisticsBiddingPrice = 0
+       }
+       if(val<0){
+         this.form.logisticsBiddingPrice = 0
+       }
+    },
+    onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.param.startTime =this.applyDateStart[0]
+              this.param.endTime = this.applyDateStart[1]
+            }else{
+              this.param.startTime =""
+              this.param.endTime =""
+            }
+
+      this.getParamFexd()
+    },
+    next() {
+      console.log(this.$refs.ckTable)
+        if (this.active++ > 2) this.active = 0;
+        this.dialogTableData = this.$refs.ckTable.SelectionList
+      },
+      handleSelectionChange(row){
+        
+      },
+    // 获取详情
+    getDictData: function() {
+      this.loading = true
+        const params = new URLSearchParams()
+      params.append('current', this.currentPage)
+      params.append('size', this.pageSize)
+      params.append('tenderType', this.query.tenderType)
+      params.append('tenderTitle', this.query.value)
+      params.append('tenderRule', this.query.tenderRule)
+      params.append('startTime',this.query.startTime )
+      params.append('endTime', this.query.endTime)
+
+      getTableList(params).then(res => {
+          console.log(res)
+        // this.data = res.data.data.records
+        let data = res.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于投标结束时间,已结束")
+          }
+
+          return res
+        })
+        this.data = data
+        this.total = res.data.data.total
+        this.loading = false
+      })
+    },
+
+    // 搜索
+    handleFind: function() {
+      this.currentPage = 1
+      this.getDictData()
+    },
+
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.voucherFile = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+          this.form.voucherFile = file.response.data.filePath
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+          this.fileList = []
+        }
+      }
+    },
+    // 点击文件列表中已上传的文件时的钩子
+    handlePreview(file) {
+      console.log(file, 'file1')
+      // window.location.href = file.url
+    },
+    handleExceed(files, fileList) {
+      this.$message.warning(`当前限制选择 1 个附件,本次选择了 ${files.length} 个文件`)
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${file.name}?`)
+    },
+    // 下载
+    onLoad(row) {
+      // const params = new URLSearchParams()
+      // params.append('path', row)
+      const a = document.createElement('a')
+      // a.href= /bidding/load
+      const url = window.location.origin + process.env.BASE_API + '/bidding/load?path=' + encodeURIComponent(row)
+      a.href = url
+      a.click()
+    },
+
+    // 字典名称提交动作
+    doSubmit() {
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          if (this.isAdd) {
+            // 新增字典
+            console.log(this.form)
+            this.loading = true
+            getQueryAdd(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.loading = false
+              this.getDictData()
+              this.$refs['form'].resetFields()
+            }).catch(err => {
+              this.loading = false
+            })
+          } else {
+            // 更新字典
+            getQueryEdit(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.getDictData()
+            })
+          }
+        }
+      })
+    },
+    // 添加字典
+    handleAdd: function(row) {
+      this.dialog = true
+      this.isAdd = true
+      this.form = {}
+      this.fileList = []
+      this.form.tenderLogisticsId = row.logisticsBidId
+      this.form.tenderParentId = this.param.tenderParentId
+      this.form.quantity = row.goodsNumber
+      this.form.goodsName = row.goodsName
+      this.form.transportUnitPrice = row.transportUnitPrice
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+    },
+    // 编辑字典
+    handleEdit: function(row) {
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+      this.dialog = true
+      this.isAdd = false
+      this.form = row.bidding
+      this.form.priceQuotes = row.priceQuotes
+      if (this.form.appendix) {
+        let name = this.form.appendix.split('bidding/')
+        name = name.pop()
+        // let name = data.appendix.replace(/(.*\/)*([^.]+).*/ig, "$2");
+        this.fileList = [{ name: name, url: this.form.appendix }]
+      }
+    },
+    handleClick(row,val){
+      console.log(row,val)
+      if(row.name == "second"){
+       this.$refs.ckTable.tenderParentId = this.param.tenderParentId
+        // this.$refs.ckTable.getTenantList()
+        this.$refs.ckTable.productName = ""
+        this.$refs.ckTable.handleFind()
+      }
+    },
+
+    // 所有标的搜索
+    getParamFexd(){
+      this.param.current = 1
+      this.getParam()
+    },
+    // 所有标的列表数据
+    getParam() {
+      const data = this.param
+      this.tableLoading = true
+      getTenderProcessing(data).then((res) => {
+       console.log(this.bidInfo, 'bidInfo')
+        let data = res.data.data.records
+         data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于投标结束时间,待处理")
+          }
+
+          return res
+        })
+        this.Paramdata = data
+        this.tableLoading = false
+        this.total1 = res.data.data.total
+      })
+    },
+
+    // 换页
+    handleCurrentChange: function(val) {
+      this.currentPage = val
+      this.getDictData()
+    },
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.getDictData()
+    },
+    handleCurrentChangeParam(val) {
+      this.param.current = val
+      this.getParam()
+    },
+    handleSizeChangeParam(val) {
+      this.param.size = val
+      this.getParam()
+    }
+  }
+}
+</script>
+<style scoped lang="scss">
+/* 去掉上传附件时候的过度效果 */
+  ::v-deep .el-upload-list__item{transition: none !important;}
+  ::v-deep .el-textarea__inner{
+  padding-bottom: 36px;
+}
+.btn_fixed{
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  padding: 15px 50px;
+  width: 100%;
+  text-align: right;
+  background: #f5f5f5;
+
+}
+.ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+.paginationParam{
+  // position: fixed;
+  // bottom: 50px;
+  bottom: 0;
+  left: 0;
+  line-height: 80px;
+  width: 100%;
+  // left: 45%;
+  // text-align: right;
+  z-index: 999;
+  background: #fff;
+}
+/deep/ .el-tabs__item{
+  font-size: 16px !important;
+  // padding: 35px  ;
+}
+.el-card {
+  border: 0px solid #fff;
+}
+.clearfix {
+    line-height: 20px;
+    font-size: 18px;
+    font-weight: 600;
+    color: #409EFF;
+}
+/deep/.el-dialog.is-fullscreen {
+
+    background-color: #f5f7f9;
+}
+.box-card{
+  margin-bottom: 20px;
+  .row-bg{
+  padding: 15px 40px 0 40px;
+  .flex_text{
+    line-height: 50px;
+    color: #8C8C8C;
+    font-size: 14px;
+    // border:1px solid red;
+    // font-weight: 600;
+  }
+  .flex_name{
+    font-size: 14px;
+    padding-left: 25px;
+    color: #575757;
+    font-weight: 550;
+  }
+}
+}
+/deep/ .el-card__body{
+  padding: 20px 0;
+}
+/deep/.el-tabs__nav-wrap::after {
+
+    background-color: #dfe4ed00;  
+}
+/deep/ .el-dialog--center .el-dialog__body {
+    text-align: initial;
+    padding: 25px 25px 0px 30px;
+}
+
+/deep/ .el-tabs--border-card{
+  // border-top:1px ;
+  border-bottom: 0px;
+
+ box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.5)
+}
+
+</style>
+

+ 188 - 20
src/views/client/record.vue

@@ -32,6 +32,14 @@
         @click="handleAdd"
       >新增客户
       </el-button>
+      <el-button
+        class="filter-item"
+        size="small"
+        type="primary"
+        icon="el-icon-upload"
+        @click="handleBatchAdd"
+      >批量导入
+      </el-button>
     </div>
     <el-table v-loading="loading" :data="tableData" style="width: 100%">
       <el-table-column label="序号" fixed="left" width="60" align="center">
@@ -63,19 +71,33 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="公司类型" align="center" width="250" :show-overflow-tooltip="true">
+      <el-table-column label="投标类型" align="center" width="250" :show-overflow-tooltip="true">
         <template slot-scope="scope">
-          <span>{{ scope.row.customerTypeDetails }}</span>
-          <!-- <span v-if="scope.row.customerTypeDetails === 1" size="small">有限责任公司(自然人独资)</span>
-            <span v-if="scope.row.customerTypeDetails === 2" size="small">有限责任公司(自然人投资或控股)</span>
-            <span v-if="scope.row.customerTypeDetails === 3" size="small">股份有限公司</span>
-            <span v-if="scope.row.customerTypeDetails === 4" size="small">有限合伙企业</span>
-            <span v-if="scope.row.customerTypeDetails === 5" size="small">外商独资公司</span>
-            <span v-if="scope.row.customerTypeDetails === 6" size="small">个人独资企业</span>
+          <span v-if="scope.row.customerBidType === 1" size="small">物流</span>
+            <span v-if="scope.row.customerBidType === 2" size="small">原料</span>
+            <span v-if="scope.row.customerBidType === 3" size="small">销售</span>
+            <span v-if="scope.row.customerBidType === 4" size="small">加工承揽</span>
+            <span v-if="scope.row.customerBidType === 0" size="small">未知</span>
+           <!--  <span v-if="scope.row.customerTypeDetails === 6" size="small">个人独资企业</span>
             <span v-if="scope.row.customerTypeDetails === 7" size="small">国有独资公司</span>
             <span v-if="scope.row.customerTypeDetails === 8" size="small">其他</span> -->
         </template>
       </el-table-column>
+
+      <el-table-column label="公司类型" align="center" width="250" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <!-- <span>{{ scope.row.customerTypeDetails }}</span> -->
+          <span v-if="scope.row.type === 1" size="small">有限责任公司(自然人独资)</span>
+            <span v-if="scope.row.type === 2" size="small">有限责任公司(自然人投资或控股)</span>
+            <span v-if="scope.row.type === 3" size="small">股份有限公司</span>
+            <span v-if="scope.row.type === 4" size="small">有限合伙企业</span>
+            <span v-if="scope.row.type === 5" size="small">外商独资公司</span>
+            <span v-if="scope.row.type === 6" size="small">个人独资企业</span>
+            <span v-if="scope.row.type === 7" size="small">国有独资公司</span>
+            <span v-if="scope.row.type === 8" size="small">其他</span>
+            <span v-if="scope.row.type === 0" size="small">未知</span>
+        </template>
+      </el-table-column>
       <el-table-column label="法定代表人" width="250" align="center" :show-overflow-tooltip="true">
         <template slot-scope="scope">
           <span>{{ scope.row.legalPerson }}</span>
@@ -153,6 +175,53 @@
       /> -->
     </div>
 
+    <!-- 批量上传 -->
+       <el-dialog
+      title="批量添加客户"
+      width="45%"
+      :visible.sync="batchVisible"
+      :close-on-click-modal="false"
+    >
+    <!-- <span slot="footer" class="dialog-footer">
+        <el-button :size="size" @click="batchVisible = false">取消</el-button>
+        <el-button :size="size" type="primary" @click="batchVisible">确定</el-button>
+      </span> -->
+      <div style="padding:35px 0">
+          <el-row type="flex" class="row-bg" justify="center" >
+            <el-col :span="9">
+              <div class="grid-content bg-purple" style="text-align: center;">
+                <div>1、下载子设备模板,填写信息</div>
+                <i class="el-icon-document"></i>
+                <br/>
+                <el-button @click="onFile">下载模板</el-button>
+              </div>
+            </el-col>
+          <div style="border-right:0.5px solid #eee"></div>
+            <el-col :span="9">
+              <div class="grid-content bg-purple-light" style="text-align: center;">
+                <div>2、上传填写好的文件</div>
+                <i class="el-icon-document"></i>
+                <el-upload
+                  :action="BASE_API+'/customer/batch'"
+                  :on-preview="handlePreview"
+                  :on-change="handleChange"
+                  name="multipartFile"
+                  :on-remove="handleRemove"
+                  :before-remove="beforeRemove"
+                  :on-exceed="handleExceed"
+                  :on-error="hanndleErr"
+                  multiple
+                  :limit="3"
+                  :file-list="fileList">
+                  <el-button >上传文件</el-button>
+                </el-upload>
+              </div>
+            </el-col>
+          </el-row>
+      </div>
+      
+        </el-dialog>
+
     <!-- 新增修改界面 -->
     <el-dialog
       :title="isEditForm ? '编辑' : '新增'"
@@ -192,6 +261,18 @@
                   </el-col>
           </el-row>
           <el-row :gutter="20">
+              <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+               <el-form-item label="投标类型" prop="customerBidType" :label-width="formLabelWidth">
+                    <el-select v-model="dataForm.customerBidType" style="width:100%"  clearable value-key="areaId" filterable placeholder="请选择投标类型">
+                      <el-option
+                        v-for="item in customerBidType"
+                        :key="item.id"
+                        :label="item.name"
+                        :value="item.id"
+                      />
+                    </el-select>
+                  </el-form-item>
+              </el-col>
               <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
                   <el-form-item label="公司类型" prop="type" :label-width="formLabelWidth">
                     <el-select v-model="dataForm.type" style="width:100%"  clearable value-key="areaId" filterable placeholder="请选择公司类型">
@@ -204,18 +285,20 @@
                     </el-select>
                   </el-form-item>
               </el-col>
+
               <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
                 <el-form-item label="法定代表人" prop="legalPerson" :label-width="formLabelWidth">
                   <el-input v-model="dataForm.legalPerson" style="width:100%" placeholder="请输入法人" />
                 </el-form-item>
               </el-col>
-              <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+         
+          </el-row>
+           <el-row :gutter="20">
+               <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
                  <el-form-item label="经营范围" prop="businessScope" :label-width="formLabelWidth">
                     <el-input v-model="dataForm.businessScope" style="width:100%" placeholder="请输入经营范围" />
                   </el-form-item>
               </el-col>
-          </el-row>
-           <el-row :gutter="20">
               <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
                  <el-form-item label="注册资本" prop="registeredCapital" :label-width="formLabelWidth">
                     <el-input v-model="dataForm.registeredCapital" style="width:100%" placeholder="请输入注册资本" />
@@ -226,8 +309,11 @@
                     <el-input v-model="dataForm.residence" style="width:100%" placeholder="请输入住所" />
                   </el-form-item>
               </el-col>
+
+          </el-row>
+           <el-row :gutter="20">
               <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
-                  <el-form-item label="成立日期" prop="dateOfEstablishment" :label-width="formLabelWidth">
+                   <el-form-item label="成立日期" prop="dateOfEstablishment" :label-width="formLabelWidth">
                     <el-date-picker
                       v-model="dataForm.dateOfEstablishment"
                       type="date"
@@ -238,8 +324,6 @@
                     />
                   </el-form-item>
               </el-col>
-          </el-row>
-           <el-row :gutter="20">
               <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
                   <el-form-item label="营业日期" prop="businessDate" :label-width="formLabelWidth">
                     <el-date-picker
@@ -252,8 +336,7 @@
                     />
                   </el-form-item>
               </el-col>
-              <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
-              </el-col>
+     
               <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
               </el-col>
           </el-row>
@@ -314,7 +397,8 @@
 
 <script>
 import { Listarea } from '@/api/dataForm'
-import { customerList, addCustomer, editCustomer, deleteCustomer,userRoles } from '@/api/record'
+import { customerList, addCustomer, editCustomer, deleteCustomer,userRoles,apiFile } from '@/api/record'
+import { Notification, MessageBox } from 'element-ui'
 import { parseTime } from '@/utils/index'
 import { getUserInfo,vailUserName } from '@/api/user'
 
@@ -357,9 +441,17 @@ export default {
         { id: 5, name: '外商独资公司' },
         { id: 6, name: '个人独资企业' },
         { id: 7, name: '国有独资公司' },
-        { id: 8, name: '其他' }
+        { id: 8, name: '其他' },
+        // {id:0,name:"未知"},
 
       ],
+      customerBidType:[
+        {id:1,name:"物流"},
+        {id:2,name:"原料"},
+        {id:3,name:"销售"},
+        {id:4,name:"加工承揽"},
+        // {id:0,name:"未知"},
+      ],
       areaList: [],
       query: {
         name: ''
@@ -376,6 +468,9 @@ export default {
         customerName: [
           { required: true, message: '请输入客户名称', trigger: 'blur' }
         ],
+        customerBidType: [
+          { required: true, message: '请选择投标类型', trigger: 'blur' }
+        ],
         phone: [
           { required: true, message: '请输入手机号', trigger: 'blur' },
           { validator: checkTel, trigger: 'change' }
@@ -399,15 +494,22 @@ export default {
         //   { required: true, message: "请选择角色", trigger: "change" },
         // ],
       },
+
+
       loading: false,
       dialogVisible: false,
-      roles:[]
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      fileUrl:"",
 
     }
   },
   created() {
     this.getTenantList()
     this.onRoles()
+    this.getFile()  //获取模板地址
     console.log('res')
   },
   methods: {
@@ -428,12 +530,68 @@ export default {
         this.total = response.data.data.total
       })
     },
+    // 获取模板url
+    getFile(){
+      apiFile().then((res)=>{
+        console.log(res)
+        this.fileUrl = res.data.data.path
+      })
+    },
+     // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.appendix = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+          // this.form.appendix = file.response.data
+          Notification({
+          title: '成功',
+          type: 'success'
+        });
+          this.fileList = []
+          this.batchVisible = false
+          this.getTenantList()
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+          this.fileList = []
+        }
+      }
+    },
+    // 点击文件列表中已上传的文件时的钩子
+    handlePreview(file) {
+      console.log(file, 'file1')
+
+      // window.location.href = file.url
+    },
+    handleExceed(files, fileList) {
+      this.$message.warning(`当前限制选择 1 个附件,本次选择了 ${files.length} 个文件`)
+    },
+    hanndleErr(err, files, fileList) {
+      console.log(err, 'err')
+      console.log(files, 'err')
+      console.log(fileList, 'err')
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${file.name}?`)
+    },
     onRoles(){
       userRoles().then((res)=>{
         console.log(res)
         this.roles = res.data.data
       })
     },
+    onFile(){
+        // let url = "https://fire-development.oss-cn-beijing.aliyuncs.com/bid/dev/客户批量上传模板.xlsx"
+        window.open(this.fileUrl, '_self');
+    },
     // 验证手机号
     checkMobile(str) {
       const reg = /^1[3456789]\d{9}$/
@@ -460,6 +618,10 @@ export default {
     //     this.dialogVisible = true
     //     console.log(row)
     // },
+    // 批量添加客户
+    handleBatchAdd(){
+      this.batchVisible = true
+    },
     // 显示新增界面
     handleAdd: function() {
       this.isEditForm = false
@@ -545,7 +707,8 @@ export default {
 }
 </script>
 
-<style scoped lang="scss">
+<style scoped lang="scss" >
+
    .el-dropdown-link {
     cursor: pointer;
     color: #1282f3;
@@ -564,6 +727,11 @@ export default {
     font-size: 17px;
   }
 }
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
 /deep/.el-card__body {
   padding: 20px 10px 0 10px !important;
 }

+ 427 - 0
src/views/tender/copy.vue

@@ -0,0 +1,427 @@
+<template>
+  <div class="app-container">
+
+    <div class="head-container" style="margin: 10px 0 10px 0;">
+      <!-- 搜索 -->
+      <el-input
+        v-model="query.title"
+        clearable
+        placeholder="请输入标题"
+        style="width: 200px;"
+        size="small"
+        class="filter-item"
+      />
+      <el-button class="filter-item" size="small" type="primary" icon="el-icon-search" plain @click="handleFind">搜索</el-button>
+    </div>
+    <!--表格渲染-->
+    <el-table v-loading="loading" :data="data" style="width: 100%;">
+      <el-table-column label="序号" fixed="left" width="60" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.$index + 1 }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column prop="title" label="标题" align="center" :show-overflow-tooltip="true" />
+
+      <el-table-column label="状态" width="100" align="center">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.tenderStatus ==1">进行中</el-tag>
+          <el-tag v-if="scope.row.tenderStatus ==2" type="info">已结束</el-tag>
+          <el-tag v-if="scope.row.tenderStatus ==3" type="danger">已作废</el-tag>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="结果" width="100" align="center">
+        <template slot-scope="scope">
+          <!-- {{scope.row.bidding.status}} -->
+          <el-tag v-if="scope.row.status == null" type="info">未参与</el-tag>
+          <el-tag v-if="scope.row.status == 0" type="warning">已提交</el-tag>
+          <el-tag v-if="scope.row.status == 1" type="success">已中标</el-tag>
+          <el-tag v-if="scope.row.status == 2" type="danger">未中标</el-tag>
+        </template>
+      </el-table-column>
+
+      <el-table-column prop="description" width="100" :show-overflow-tooltip="true" label="报价方式" align="center">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.priceQuotes == 1" color="#5783E6" style="border-color:#5783E6" effect="dark">总价</el-tag>
+          <el-tag v-if="scope.row.priceQuotes == 2" effect="dark" color="#82C497" style="border-color:#82C497">单价</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column prop="remarks" label="备注" align="center" :show-overflow-tooltip="true" />
+      <el-table-column prop="appendix" width="100" label="附件" align="center">
+        <template slot-scope="scope">
+          <!-- <el-link type="primary" :href="scope.row.appendix">查看</el-link> -->
+          <el-button type="text" @click="onLoad(scope.row.appendix)">下载</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column prop="endTime" width="160" label="截止时间" align="center" />
+
+      <el-table-column label="操作" width="250" align="center">
+        <template slot-scope="scope">
+          <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == null" slot="reference" type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == 0" slot="reference" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">改标</el-button>
+          <el-button v-if="scope.row.tenderStatus == 2 || scope.row.tenderStatus == 3" slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">投标详情</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        :current-page.sync="currentPage"
+        :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total"
+        background
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+    </div>
+
+    <!--新增-->
+    <el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '投标' : '修标'" width="50%">
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="报价方式">
+          <!-- <el-radio v-model="form.priceQuotes" disabled :label="1">总价</el-radio>
+            <el-radio v-model="form.priceQuotes" disabled :label="2">单价</el-radio> -->
+          <el-tag v-if="form.priceQuotes == 1">总价</el-tag>
+          <el-tag v-if="form.priceQuotes == 2">单价</el-tag>
+        </el-form-item>
+        <el-form-item label="报价" prop="price">
+          <el-input v-model="form.price" style="width: 250px;" placeholder="请输入金额"><template slot="append">元</template></el-input>
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input
+            v-model="form.remarks"
+            type="textarea"
+            style="width: 370px;"
+            :autosize="{ minRows: 2, maxRows: 10}"
+            maxlength="500"
+            show-word-limit
+            placeholder="请输入内容"
+          />
+        </el-form-item>
+        <el-form-item label="附件" :required="true" prop="appendix">
+          <el-upload
+            class="upload-demo"
+            drag
+            :limit="1"
+            :on-preview="handlePreview"
+            :on-change="handleChange"
+            :on-remove="handleRemove"
+            :before-remove="beforeRemove"
+            :on-exceed="handleExceed"
+            :action="BASE_API+'/bidding/upload'"
+            list-type="text"
+            :file-list="fileList"
+            multiple
+          >
+            <i class="el-icon-upload" />
+            <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+            <!-- <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div> -->
+          </el-upload>
+        </el-form-item>
+
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialog = false">取消</el-button>
+        <el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 详情 -->
+    <el-dialog :append-to-body="true" :visible.sync="viewDialog" title="投标详情" width="90%" center>
+      <el-table center :data="Paramdata" style="width: 100%;">
+
+        <el-table-column prop="customerName" label="客户名称" align="center" />
+
+        <el-table-column label="报价方式" align="center">
+          <template slot-scope="scope">
+            <el-tag v-if="scope.row.priceQuotes == 1" color="#5783E6" style="border-color:#5783E6" effect="dark">总价</el-tag>
+            <el-tag v-if="scope.row.priceQuotes == 2" effect="dark" color="#82C497" style="border-color:#82C497">单价</el-tag>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="price" :show-overflow-tooltip="true" label="报价金额" align="center" >
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.price | toThousandFilter }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="remarks" label="备注" :show-overflow-tooltip="true" align="center" />
+        <el-table-column prop="appendix" label="附件" align="center" width="100">
+          <template slot-scope="scope">
+            <!-- <el-link type="primary" :href="scope.row.appendix">查看</el-link> -->
+            <el-button type="text" v-if="scope.row.appendix" @click="onLoad(scope.row.appendix)">下载</el-button>
+            <el-button type="text" v-else disabled>下载</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column prop="createTime" label="投极时间" align="center" />
+        <el-table-column prop="userName" label=" 投标帐号" align="center" />
+        <el-table-column prop="status" label=" 投标结果" align="center">
+          <template slot-scope="scope">
+            <el-tag v-if="scope.row.status == null" type="info">未参与</el-tag>
+            <el-tag v-if="scope.row.status == 0" type="warning">已提交</el-tag>
+            <el-tag v-if="scope.row.status == 1" type="success">已中标</el-tag>
+            <el-tag v-if="scope.row.status == 2" type="danger">未中标</el-tag>
+          <!-- <span v-if="scope.row.status == 0">已提交</span>
+          <span v-if="scope.row.status == 1">中标</span>
+          <span v-if="scope.row.status == 2">未中标</span> -->
+          </template>
+        </el-table-column>
+
+      </el-table>
+      <div class="pagination">
+        <el-pagination
+          :current-page.sync="param.page"
+          :page-size="param.size"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="total1"
+          :page-sizes="[10, 20, 30, 50]"
+          background
+          @size-change="handleSizeChangeParam"
+          @current-change="handleCurrentChangeParam"
+        />
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="viewDialog = false">取消</el-button>
+        <el-button :loading="loading" type="primary" @click="viewDialog = false">确认</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+
+</template>
+
+<script>
+import { getTableList, getQueryAdd, getQueryEdit, getQueryId } from '@/api/tender'
+import { Notification, MessageBox } from 'element-ui'
+
+export default {
+  data() {
+    const checkTel = (rule, value, callback) => {
+      console.log(rule)
+      console.log(value)
+      console.log(callback)
+      if (value == null) {
+        callback(new Error('请选择附件'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      form: {
+      },
+      data: [],
+      BASE_API: process.env.BASE_API,
+      dialog: false,
+      loading: false,
+      delLoading: false,
+      viewDialog: false,
+      isAdd: false,
+      currentPage: 1,
+      pageSize: 10,
+      total: 0, // 总数量
+      rules: {
+
+        price: [
+          { required: true, message: '报价金额不为空', trigger: 'blur' },
+        ],
+        appendix: [
+          // { type:"array",required: true, message: '附件不为空', trigger: 'blur' },
+          { validator: checkTel, trigger: 'blur' }
+        ]
+      },
+      query: {
+        type: '',
+        value: ''
+      },
+      fileList: [],
+      param: {
+        page: 1,
+        size: 10
+      },
+      total1: 0,
+      Paramdata: []
+    }
+  },
+  created() {
+    this.getDictData()
+  },
+  methods: {
+    // 发布时间
+    oncustom() {
+
+    },
+    // 获取详情
+    getDictData: function() {
+      this.loading = true
+      const params = {
+        page: this.currentPage,
+        size: this.pageSize,
+        title: this.query.title
+      }
+      getTableList(params).then(res => {
+        console.log(res)
+        this.data = res.data.data.records
+        this.total = res.data.data.total
+        this.loading = false
+      })
+    },
+
+    // 搜索
+    handleFind: function() {
+      this.currentPage = 1
+      this.getDictData()
+    },
+
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.appendix = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+          this.form.appendix = file.response.data
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+          this.fileList = []
+        }
+      }
+    },
+    // 点击文件列表中已上传的文件时的钩子
+    handlePreview(file) {
+      console.log(file, 'file1')
+      // window.location.href = file.url
+    },
+    handleExceed(files, fileList) {
+      this.$message.warning(`当前限制选择 1 个附件,本次选择了 ${files.length} 个文件`)
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${file.name}?`)
+    },
+    // 下载
+    onLoad(row) {
+      // const params = new URLSearchParams()
+      // params.append('path', row)
+      const a = document.createElement('a')
+      // a.href= /bidding/load
+      const url = window.location.origin + process.env.BASE_API + '/bidding/load?path=' + encodeURIComponent(row)
+      a.href = url
+      a.click()
+    },
+
+    // 字典名称提交动作
+    doSubmit() {
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          if (this.isAdd) {
+            // 新增字典
+            this.loading = true
+            getQueryAdd(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.loading = false
+              this.getDictData()
+              this.$refs['form'].resetFields()
+            }).catch(err => {
+              this.loading = false
+            })
+          } else {
+            // 更新字典
+            getQueryEdit(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.getDictData()
+            })
+          }
+        }
+      })
+    },
+    // 添加字典
+    handleAdd: function(row) {
+      this.dialog = true
+      this.isAdd = true
+      this.form = {}
+      this.fileList = []
+      this.form.tenderId = row.id
+      this.form.priceQuotes = row.priceQuotes
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+    },
+    // 编辑字典
+    handleEdit: function(row) {
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+      this.dialog = true
+      this.isAdd = false
+      this.form = row.bidding
+      this.form.priceQuotes = row.priceQuotes
+      if (this.form.appendix) {
+        let name = this.form.appendix.split('bidding/')
+        name = name.pop()
+        // let name = data.appendix.replace(/(.*\/)*([^.]+).*/ig, "$2");
+        this.fileList = [{ name: name, url: this.form.appendix }]
+      }
+    },
+    handleView(row) {
+      this.param.tenderId = row.id
+      this.param.page = 1
+      this.getParam()
+      this.viewDialog = true
+    },
+    getParam() {
+      const data = this.param
+      getQueryId(data).then((res) => {
+        console.log(res.data.data.records, '')
+        this.Paramdata = res.data.data.records
+        this.total1 = res.data.data.total
+      })
+    },
+
+    // 换页
+    handleCurrentChange: function(val) {
+      this.currentPage = val
+      this.getDictData()
+    },
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.getDictData()
+    },
+    handleCurrentChangeParam(val) {
+      this.param.page = val
+      this.getParam()
+    },
+    handleSizeChangeParam(val) {
+      this.param.size = val
+      this.getParam()
+    }
+  }
+}
+</script>
+<style scoped>
+/* 去掉上传附件时候的过度效果 */
+  ::v-deep .el-upload-list__item{transition: none !important;}
+  ::v-deep .el-textarea__inner{
+  padding-bottom: 36px;
+}
+</style>
+

+ 425 - 166
src/views/tender/index.vue

@@ -1,66 +1,112 @@
 <template>
   <div class="app-container">
 
-    <div class="head-container" style="margin: 10px 0 10px 0;">
+   <div class="head-container" style="margin: 10px 0 10px 0;">
       <!-- 搜索 -->
+      <span style="fontSize:13px">标题</span>
       <el-input
-        v-model="query.title"
+        v-model="query.value"
         clearable
         placeholder="请输入标题"
         style="width: 200px;"
         size="small"
         class="filter-item"
+        @keyup.enter.native="handleFind"
+         @clear="handleFind"
       />
-      <el-button class="filter-item" size="small" type="primary" icon="el-icon-search" plain @click="handleFind">搜索</el-button>
-    </div>
+      <!-- <span style="fontSize:13px;marginLeft:20px">招标类型</span>
+      <el-select v-model="query.tenderType" style="width: 200px;" @keyup.enter.native="handleFind" @clear="handleFind" size="small" clearable  value-key="areaId" filterable placeholder="请选择招标类型">
+        <el-option
+          v-for="item in tenderType"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        />
+      </el-select> -->
+
+        <!-- <span style="fontSize:13px;marginLeft:20px">招标规则</span>
+      <el-select v-model="query.tenderRule" style="width: 200px;" @keyup.enter.native="handleFind" @clear="handleFind" size="small" clearable  value-key="areaId" filterable placeholder="请选择招标规则">
+        <el-option
+          v-for="item in tenderRule"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        />
+      </el-select> -->
+
+    <span style="fontSize:13px;marginLeft:20px">开始时间</span>
+            <el-date-picker
+              v-model="applyDateStart"
+              size="mini"
+              type="datetimerange"
+              style="width: 400px;"
+              range-separator="-"
+              clearable
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :default-time="['00:00:00', '23:59:59']"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+             @change="onApplyDate"
+             @clear="onApplyDate"
+            />
+      </div>
+          <div style="float:right">
+           <el-button class="filter-item" size="small" type="primary" icon="el-icon-search"  @click="handleFind">搜索</el-button>
+      </div>
     <!--表格渲染-->
-    <el-table v-loading="loading" :data="data" style="width: 100%;">
+    <el-table v-loading="tableLoading" :data="data" style="width: 100%;">
       <el-table-column label="序号" fixed="left" width="60" align="center">
         <template slot-scope="scope">
           <span>{{ scope.$index + 1 }}</span>
         </template>
       </el-table-column>
 
-      <el-table-column prop="title" label="标题" align="center" :show-overflow-tooltip="true" />
+      <el-table-column prop="tenderTitle" label="标题" :show-overflow-tooltip="true" width="250" align="center" />
 
-      <el-table-column label="状态" width="100" align="center">
+      <el-table-column label="状态" align="center" width="100">
         <template slot-scope="scope">
-          <el-tag v-if="scope.row.tenderStatus ==1">进行中</el-tag>
-          <el-tag v-if="scope.row.tenderStatus ==2" type="info">已结束</el-tag>
-          <el-tag v-if="scope.row.tenderStatus ==3" type="danger">已作废</el-tag>
+          <el-tag effect="plain" v-if="scope.row.status ==1">进行中</el-tag>
+          <el-tag effect="plain" v-if="scope.row.status ==2" type="info">已结束</el-tag>
+          <el-tag effect="plain" v-if="scope.row.status ==3" type="danger">已作废</el-tag>
+          <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
         </template>
       </el-table-column>
 
-      <el-table-column label="结果" width="100" align="center">
-        <template slot-scope="scope">
-          <!-- {{scope.row.bidding.status}} -->
-          <el-tag v-if="scope.row.status == null" type="info">未参与</el-tag>
-          <el-tag v-if="scope.row.status == 0" type="warning">已提交</el-tag>
-          <el-tag v-if="scope.row.status == 1" type="success">已中标</el-tag>
-          <el-tag v-if="scope.row.status == 2" type="danger">未中标</el-tag>
+      <el-table-column prop="description" :show-overflow-tooltip="true" label="招标类型" width="100" align="center">
+        <template slot-scope="scope"> 
+          <el-tag v-if="scope.row.tenderType == 1"  >物流</el-tag>
+          <el-tag v-if="scope.row.tenderType == 2" >原料</el-tag>
+          <el-tag v-if="scope.row.tenderType == 3" >销售</el-tag>
+          <el-tag v-if="scope.row.tenderType == 4" >加工承揽</el-tag>
         </template>
       </el-table-column>
-
-      <el-table-column prop="description" width="100" :show-overflow-tooltip="true" label="报价方式" align="center">
+      <el-table-column prop="description" :show-overflow-tooltip="true" label="招标规则" width="100" align="center">
         <template slot-scope="scope">
-          <el-tag v-if="scope.row.priceQuotes == 1" color="#5783E6" style="border-color:#5783E6" effect="dark">总价</el-tag>
-          <el-tag v-if="scope.row.priceQuotes == 2" effect="dark" color="#82C497" style="border-color:#82C497">单价</el-tag>
+          <el-tag v-if="scope.row.tenderRule == 1" type="success" effect="plain">价低者得</el-tag>
+          <el-tag v-if="scope.row.tenderRule == 2" effect="plain" >价高者得</el-tag>
         </template>
       </el-table-column>
-      <el-table-column prop="remarks" label="备注" align="center" :show-overflow-tooltip="true" />
-      <el-table-column prop="appendix" width="100" label="附件" align="center">
+      <!-- <el-table-column prop="description" :show-overflow-tooltip="true" label="是否作废" width="100" align="center">
         <template slot-scope="scope">
-          <!-- <el-link type="primary" :href="scope.row.appendix">查看</el-link> -->
-          <el-button type="text" @click="onLoad(scope.row.appendix)">下载</el-button>
+          <el-tag v-if="scope.row.isInvalid == 1"  >正常</el-tag>
+          <el-tag v-if="scope.row.isInvalid == 2" type="danger" >已作废</el-tag>
         </template>
-      </el-table-column>
-      <el-table-column prop="endTime" width="160" label="截止时间" align="center" />
+      </el-table-column> -->
+      <!-- <el-table-column prop="fileUrl" label="附件" align="center" width="200">
+        <template slot-scope="scope">
+          <el-link :href="scope.row.fileUrl" type="primary" target="_target"><i class="el-icon-download"></i> 下载</el-link>
+        </template>
+      </el-table-column> -->
+      <el-table-column prop="startTime" label="开始时间" align="center" width="160" />
+      <el-table-column prop="endTime" label="截止时间" align="center" width="160" />
+      <el-table-column prop="tenderRemark" label="备注"  :show-overflow-tooltip="true" align="center" />
+
 
       <el-table-column label="操作" width="250" align="center">
         <template slot-scope="scope">
           <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == null" slot="reference" type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">投标</el-button>
           <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == 0" slot="reference" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">改标</el-button>
-          <el-button v-if="scope.row.tenderStatus == 2 || scope.row.tenderStatus == 3" slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">投标详情</el-button>
+          <el-button  slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">投标详情</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -78,117 +124,18 @@
       />
     </div>
 
-    <!--新增-->
-    <el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '投标' : '修标'" width="50%">
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="报价方式">
-          <!-- <el-radio v-model="form.priceQuotes" disabled :label="1">总价</el-radio>
-            <el-radio v-model="form.priceQuotes" disabled :label="2">单价</el-radio> -->
-          <el-tag v-if="form.priceQuotes == 1">总价</el-tag>
-          <el-tag v-if="form.priceQuotes == 2">单价</el-tag>
-        </el-form-item>
-        <el-form-item label="报价" prop="price">
-          <el-input v-model="form.price" style="width: 250px;" placeholder="请输入金额"><template slot="append">元</template></el-input>
-        </el-form-item>
-        <el-form-item label="备注" prop="remarks">
-          <el-input
-            v-model="form.remarks"
-            type="textarea"
-            style="width: 370px;"
-            :autosize="{ minRows: 2, maxRows: 10}"
-            maxlength="500"
-            show-word-limit
-            placeholder="请输入内容"
-          />
-        </el-form-item>
-        <el-form-item label="附件" :required="true" prop="appendix">
-          <el-upload
-            class="upload-demo"
-            drag
-            :limit="1"
-            :on-preview="handlePreview"
-            :on-change="handleChange"
-            :on-remove="handleRemove"
-            :before-remove="beforeRemove"
-            :on-exceed="handleExceed"
-            :action="BASE_API+'/bidding/upload'"
-            list-type="text"
-            :file-list="fileList"
-            multiple
-          >
-            <i class="el-icon-upload" />
-            <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-            <!-- <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div> -->
-          </el-upload>
-        </el-form-item>
-
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="dialog = false">取消</el-button>
-        <el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
-      </div>
-    </el-dialog>
-
-    <!-- 详情 -->
-    <el-dialog :append-to-body="true" :visible.sync="viewDialog" title="投标详情" width="90%" center>
-      <el-table center :data="Paramdata" style="width: 100%;">
-
-        <el-table-column prop="customerName" label="客户名称" align="center" />
-
-        <el-table-column label="报价方式" align="center">
-          <template slot-scope="scope">
-            <el-tag v-if="scope.row.priceQuotes == 1" color="#5783E6" style="border-color:#5783E6" effect="dark">总价</el-tag>
-            <el-tag v-if="scope.row.priceQuotes == 2" effect="dark" color="#82C497" style="border-color:#82C497">单价</el-tag>
-          </template>
-        </el-table-column>
-
-        <el-table-column prop="price" :show-overflow-tooltip="true" label="报价金额" align="center" >
-          <template slot-scope="scope">
-            <div>
-              {{ scope.row.price | toThousandFilter }}
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column prop="remarks" label="备注" :show-overflow-tooltip="true" align="center" />
-        <el-table-column prop="appendix" label="附件" align="center" width="100">
-          <template slot-scope="scope">
-            <!-- <el-link type="primary" :href="scope.row.appendix">查看</el-link> -->
-            <el-button type="text" v-if="scope.row.appendix" @click="onLoad(scope.row.appendix)">下载</el-button>
-            <el-button type="text" v-else disabled>下载</el-button>
-          </template>
-        </el-table-column>
-        <el-table-column prop="createTime" label="投极时间" align="center" />
-        <el-table-column prop="userName" label=" 投标帐号" align="center" />
-        <el-table-column prop="status" label=" 投标结果" align="center">
-          <template slot-scope="scope">
-            <el-tag v-if="scope.row.status == null" type="info">未参与</el-tag>
-            <el-tag v-if="scope.row.status == 0" type="warning">已提交</el-tag>
-            <el-tag v-if="scope.row.status == 1" type="success">已中标</el-tag>
-            <el-tag v-if="scope.row.status == 2" type="danger">未中标</el-tag>
-          <!-- <span v-if="scope.row.status == 0">已提交</span>
-          <span v-if="scope.row.status == 1">中标</span>
-          <span v-if="scope.row.status == 2">未中标</span> -->
-          </template>
-        </el-table-column>
-
-      </el-table>
-      <div class="pagination">
-        <el-pagination
-          :current-page.sync="param.page"
-          :page-size="param.size"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total1"
-          :page-sizes="[10, 20, 30, 50]"
-          background
-          @size-change="handleSizeChangeParam"
-          @current-change="handleCurrentChangeParam"
-        />
-      </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="viewDialog = false">取消</el-button>
-        <el-button :loading="loading" type="primary" @click="viewDialog = false">确认</el-button>
-      </div>
-    </el-dialog>
+    <!-- 投标详情 -->
+      <!-- 详情 -->
+    <div class="goodsNameCss">
+      <!-- 物流 -->
+          <ckTender ref="ckTender"></ckTender>
+      <!-- 销售 -->
+          <ckTender1 ref="ckTender1"></ckTender1>
+        <!-- 原料 -->
+          <ckTender2 ref="ckTender2"></ckTender2>
+        <!-- 生产加工 -->
+          <ckTender3 ref="ckTender3"></ckTender3>
+    </div>
 
   </div>
 
@@ -198,12 +145,20 @@
 import { getTableList, getQueryAdd, getQueryEdit, getQueryId } from '@/api/tender'
 import { Notification, MessageBox } from 'element-ui'
 
+import ckTender from "./tender/tender.vue"
+import ckTender1 from "./tender1/tender.vue"
+import ckTender2 from "./tender2/tender.vue"
+import ckTender3 from "./tender3/tender.vue"
+
 export default {
+  components:{
+    ckTender,
+    ckTender1,
+    ckTender2,
+    ckTender3,
+  },
   data() {
     const checkTel = (rule, value, callback) => {
-      console.log(rule)
-      console.log(value)
-      console.log(callback)
       if (value == null) {
         callback(new Error('请选择附件'))
       } else {
@@ -214,7 +169,9 @@ export default {
       form: {
       },
       data: [],
+      active:0,
       BASE_API: process.env.BASE_API,
+      tableLoading:false,
       dialog: false,
       loading: false,
       delLoading: false,
@@ -223,6 +180,24 @@ export default {
       currentPage: 1,
       pageSize: 10,
       total: 0, // 总数量
+      rules1:{
+        departureStation:[
+          { required: true, message: '始发车站不为空', trigger: 'blur' },
+        ],
+         destinationStation:[
+          { required: true, message: '目的车站不为空', trigger: 'blur' },
+        ],
+         logisticsBiddingPrice:[
+          { required: true, message: '投标价格不为空', trigger: 'blur' },
+        ],
+  
+         phone:[
+          { required: true, message: '联系电话不为空', trigger: 'blur' },
+        ],
+         transportMode:[
+          { required: true, message: '运输方式不为空', trigger: 'blur' },
+        ],
+      },
       rules: {
 
         price: [
@@ -235,36 +210,148 @@ export default {
       },
       query: {
         type: '',
-        value: ''
+        value: '',
+         tenderRule:"",
+        tenderType:"",
+        startTime:"",
+        endTime:""
       },
       fileList: [],
       param: {
-        page: 1,
+        current: 1,
         size: 10
       },
       total1: 0,
-      Paramdata: []
+      Paramdata: [],
+      applyDateStart:[],
+      dialogTableData:[],
+       tenderRule:[
+        {id:1,name:"价低者得"},
+        {id:2,name:"价高者得"},
+
+      ],
+      packingWay:[
+        {id:1,name:"散粮"},
+        {id:2,name:"袋装"},
+        {id:3,name:"散装"},
+        {id:4,name:"集装箱"},
+      ],
+      transportMode:[
+        {id:1,name:"汽运"},
+        {id:2,name:"火车运输"},
+        {id:3,name:"船运"},
+        {id:4,name:"汽运/火车运输/船运"},
+        {id:5,name:"汽运/火车运输"},
+        {id:6,name:"汽运/船运"},
+      ],
+       activeName: 'first',
+       dialogTableVisible:false,
+       goodsName:"",
+       bidInfo:{}
     }
   },
   created() {
     this.getDictData()
   },
   methods: {
-    // 发布时间
-    oncustom() {
+    // 投标详情 向父元素传递数据
+    costPlannedAmountChange(val){
+      console.log(val)
+ 
+      this.dialogTableVisible = true
+      setTimeout(() => {
+        this.goodsName = val.goodsName
+       this.$refs.ckDialog.priceData = val
+      this.$refs.ckDialog.getTenantList()
+        console.log(this.$refs.ckDialog)
+      }, 300);
+    },
+    // 价格投标不能大于合计
+    onlogistiicsPrice(val){
+      console.log(val)
+       if(val>this.form.transportUnitPrice){
+         this.form.logisticsBiddingPrice = this.form.transportUnitPrice
+         console.log("我是大于")
+       }
+       if(val.indexOf('.') !== -1 && val == '.'){
+         this.form.logisticsBiddingPrice =0
+       }
+       if(val== "+" || val== "-"){
+         this.form.logisticsBiddingPrice = 0
+       }
+       if(val<0){
+         this.form.logisticsBiddingPrice = 0
+       }
+    },
+    onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.query.startTime =this.applyDateStart[0]
+              this.query.endTime = this.applyDateStart[1]
+            }else{
+              this.query.startTime =""
+              this.query.endTime =""
+            }
 
+      this.handleFind()
     },
+    next() {
+      console.log(this.$refs.ckTable)
+        if (this.active++ > 2) this.active = 0;
+        this.dialogTableData = this.$refs.ckTable.SelectionList
+      },
+      handleSelectionChange(row){
+        
+      },
     // 获取详情
     getDictData: function() {
       this.loading = true
-      const params = {
-        page: this.currentPage,
-        size: this.pageSize,
-        title: this.query.title
-      }
+        const params = new URLSearchParams()
+      params.append('current', this.currentPage)
+      params.append('size', this.pageSize)
+      params.append('tenderType', this.query.tenderType)
+      params.append('tenderTitle', this.query.value)
+      params.append('tenderRule', this.query.tenderRule)
+      params.append('startTime',this.query.startTime )
+      params.append('endTime', this.query.endTime)
+
       getTableList(params).then(res => {
-        console.log(res)
-        this.data = res.data.data.records
+          console.log(res)
+        // this.data = res.data.data.records
+        let data = res.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于结束时间,已结束")
+          }
+
+          return res
+        })
+        this.data = data
         this.total = res.data.data.total
         this.loading = false
       })
@@ -278,7 +365,7 @@ export default {
 
     // 文件移除的时候
     handleRemove(file, fileList) {
-      this.form.appendix = ''
+      this.form.voucherFile = ''
       console.log(file, fileList, this.fileList, '移出')
     },
     // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
@@ -287,7 +374,7 @@ export default {
       if (file.response) {
         console.log(file.response, 'file')
         if (file.response.code == '200') {
-          this.form.appendix = file.response.data
+          this.form.voucherFile = file.response.data.filePath
         } else {
           Notification.error({
             title: file.response.msg,
@@ -325,6 +412,7 @@ export default {
         if (valid) {
           if (this.isAdd) {
             // 新增字典
+            console.log(this.form)
             this.loading = true
             getQueryAdd(this.form).then((res) => {
               if (res.data.code === 200) {
@@ -360,8 +448,11 @@ export default {
       this.isAdd = true
       this.form = {}
       this.fileList = []
-      this.form.tenderId = row.id
-      this.form.priceQuotes = row.priceQuotes
+      this.form.tenderLogisticsId = row.logisticsBidId
+      this.form.tenderParentId = this.param.tenderParentId
+      this.form.quantity = row.goodsNumber
+      this.form.goodsName = row.goodsName
+      this.form.transportUnitPrice = row.transportUnitPrice
       if (this.$refs['form']) {
         this.$refs['form'].resetFields()
       }
@@ -382,17 +473,109 @@ export default {
         this.fileList = [{ name: name, url: this.form.appendix }]
       }
     },
+    handleClick(row,val){
+      console.log(row,val)
+      if(row.name == "second"){
+       this.$refs.ckTable.tenderParentId = this.param.tenderParentId
+        this.$refs.ckTable.getTenantList()
+      }
+    },
     handleView(row) {
-      this.param.tenderId = row.id
-      this.param.page = 1
-      this.getParam()
-      this.viewDialog = true
+      let tenderType = row.tenderType
+      console.log(row.tenderType,"tenderType")
+      let param =  {
+        tenderParentId:row.tenderParentId,
+          current: 1,
+          size: 10
+        }
+      if(tenderType == 1){
+        this.$refs.ckTender.viewDialog = true
+         setTimeout(() => {
+            this.$refs.ckTender.activeName="first"
+            // this.$refs.ckTender.param.tenderParentId = row.tenderParentId
+            this.$refs.ckTender.bidInfo = row
+            this.$refs.ckTender.param = param
+            // this.$refs.ckTender.param.current = 1
+            this.$refs.ckTender.applyDateStart = []
+            this.$refs.ckTender.getParam()
+            console.log("物流")
+      }, 300);
+      }else if(tenderType == 2){
+         this.$refs.ckTender2.viewDialog = true
+         setTimeout(() => {
+            this.$refs.ckTender2.activeName="first"
+            // this.$refs.ckTender2.param.tenderParentId = row.tenderParentId
+            this.$refs.ckTender2.bidInfo = row
+            this.$refs.ckTender2.param = param
+            // this.$refs.ckTender2.param.current = 1
+            this.$refs.ckTender2.applyDateStart = []
+            this.$refs.ckTender2.getParam()
+         }, 300);
+        console.log("原料")
+      }else if(tenderType == 3){
+        this.$refs.ckTender1.viewDialog = true
+         setTimeout(() => {
+            this.$refs.ckTender1.activeName="first"
+            // this.$refs.ckTender1.param.tenderParentId = row.tenderParentId
+            this.$refs.ckTender1.bidInfo = row
+            this.$refs.ckTender1.param = param
+            // this.$refs.ckTender1.param.current = 1
+            this.$refs.ckTender1.applyDateStart = []
+            this.$refs.ckTender1.getParam()
+      }, 300);
+        console.log("销售")
+      }else if(tenderType == 4){
+        this.$refs.ckTender3.viewDialog = true
+         setTimeout(() => {
+            this.$refs.ckTender3.activeName="first"
+            // this.$refs.ckTender3.param.tenderParentId = row.tenderParentId
+            this.$refs.ckTender3.bidInfo = row
+            this.$refs.ckTender3.param = param
+            // this.$refs.ckTender3.param.current = 1
+            this.$refs.ckTender3.applyDateStart = []
+            this.$refs.ckTender3.getParam()
+      }, 300);
+        console.log("加工承揽")
+      }
     },
     getParam() {
       const data = this.param
+      this.tableLoading = true
       getQueryId(data).then((res) => {
-        console.log(res.data.data.records, '')
-        this.Paramdata = res.data.data.records
+       console.log(res.data.data.records, '')
+        let data = res.data.data.records
+         data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于结束时间,已结束")
+          }
+
+          return res
+        })
+        this.Paramdata = data
+        this.tableLoading = false
         this.total1 = res.data.data.total
       })
     },
@@ -407,7 +590,7 @@ export default {
       this.getDictData()
     },
     handleCurrentChangeParam(val) {
-      this.param.page = val
+      this.param.current = val
       this.getParam()
     },
     handleSizeChangeParam(val) {
@@ -417,11 +600,87 @@ export default {
   }
 }
 </script>
-<style scoped>
+<style scoped lang="scss">
 /* 去掉上传附件时候的过度效果 */
   ::v-deep .el-upload-list__item{transition: none !important;}
   ::v-deep .el-textarea__inner{
   padding-bottom: 36px;
 }
+.btn_fixed{
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  padding: 15px 50px;
+  width: 100%;
+  text-align: right;
+  background: #f5f5f5;
+
+}
+.ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+.paginationParam{
+  // position: fixed;
+  // bottom: 50px;
+  bottom: 0;
+  left: 0;
+  line-height: 80px;
+  width: 100%;
+  // left: 45%;
+  // text-align: right;
+  z-index: 999;
+  background: #fff;
+}
+/deep/ .el-tabs__item{
+  font-size: 16px !important;
+  // padding: 35px  ;
+}
+.el-card {
+  border: 0px solid #fff;
+}
+.clearfix {
+    line-height: 20px;
+    font-size: 18px;
+    font-weight: 600;
+    color: #409EFF;
+}
+/deep/.el-dialog.is-fullscreen {
+
+    background-color: #f5f7f9;
+}
+.box-card{
+  margin-bottom: 20px;
+  .row-bg{
+  padding: 15px 40px 0 40px;
+  .flex_text{
+    line-height: 50px;
+    color: #8C8C8C;
+    font-size: 14px;
+    // border:1px solid red;
+    // font-weight: 600;
+  }
+  .flex_name{
+    font-size: 14px;
+    padding-left: 25px;
+    color: #575757;
+    font-weight: 550;
+  }
+}
+}
+/deep/ .el-card__body{
+  padding: 20px 0;
+}
+/deep/.el-tabs__nav-wrap::after {
+
+    background-color: #dfe4ed00;  
+}
+
+
 </style>
 

+ 357 - 0
src/views/tender/tender/dialog.vue

@@ -0,0 +1,357 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <!-- <div>
+      <span style="font-size:14px">货物:</span>
+      <el-input
+        v-model="goodsName"
+        clearable
+        placeholder="请输入货物"
+        style="width: 200px;margin-bottom:20px"
+        size="small"
+         @keyup.enter.native="handleFind"
+         @clear="handleFind"
+        class="filter-item"
+      />
+
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+    </div> -->
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+
+      <el-table-column label="运输方式" prop="goodsName"   align="center" :show-overflow-tooltip="true">
+           <template slot-scope="scope">
+                            <span v-if="scope.row.transportMode == 1">汽运</span>
+                            <!-- <span v-if="scope.row.transportMode == 2">汽运</span> -->
+                            <span v-if="scope.row.transportMode == 2">火车运输</span>
+                            <span v-if="scope.row.transportMode == 3">船运</span>
+                            <span v-if="scope.row.transportMode == 4">汽运/火车运输/船运</span>
+                            <span v-if="scope.row.transportMode == 5">汽运/火车运输</span>
+                            <span v-if="scope.row.transportMode == 6">汽运/船运</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="投标价格" prop="logisticsBiddingPrice" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+
+      <el-table-column label="数量(吨)" prop="quantity" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="总价" prop="logisticsTotalPrice" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="联系电话" prop="phone" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+
+       <el-table-column  :show-overflow-tooltip="true" label="包装方式" width="100" align="center">
+        <template slot-scope="scope">
+            <span v-if="scope.row.packingWay == 0">未知</span> 
+            <span v-if="scope.row.packingWay == 1">散粮</span> 
+            <span v-if="scope.row.packingWay == 2">包粮</span> 
+            <!-- <span v-if="scope.row.packingWay == 2">袋装</span> 
+            <span v-if="scope.row.packingWay == 3">散装</span> 
+            <span v-if="scope.row.packingWay == 4">集装箱</span>  -->
+        </template>
+      </el-table-column>
+
+      <el-table-column label="始发车站" prop="departureStation" width="190" align="center" :show-overflow-tooltip="true">
+           <template slot-scope="scope">
+            <span >{{priceData.departureName}}</span> 
+        </template>
+      </el-table-column>
+      <el-table-column label="目的车站" prop="destinationStation" width="150" align="center" :show-overflow-tooltip="true">
+         <template slot-scope="scope">
+            <span >{{priceData.destinationName}}</span> 
+        </template>
+      </el-table-column>
+
+       <el-table-column label="状态" align="center" width="100">
+            <template slot-scope="scope">
+            <el-tag effect="plain" v-if="scope.row.biddingStatus == 5">已投递</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==6" type="info">审核中</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==7" type="warning">已中标</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==8" type="danger">未中标</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==9" type="danger">已作废</el-tag>
+            </template>
+       </el-table-column>
+
+      <el-table-column label="投标时间" prop="logisticsBiddingTime" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+
+      <el-table-column label="备注" prop="biddingLogisticsRemark" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+       <el-table-column label="操作" width="250" fixed="right" align="center">
+          <template slot-scope="scope">
+             <el-upload
+                    :disabled="scope.row.biddingStatus !=7"
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :before-upload="beforeUpload"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/bidding/receipt/' + scope.row.tenderLogisticsId +'/'+ priceData.tenderType"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                    accept=".zip"
+                  >
+                          <el-button :disabled="scope.row.biddingStatus !=7" class="el-icon-upload2" size="small" type="text" style="width:90px;fontSize:14px ">上传回执</el-button>
+                  </el-upload>
+          </template>
+       </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        current-page.sync="current"
+         :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getLogisticsInfo } from '@/api/tender'
+// import { Notification, MessageBox } from 'element-ui'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: {},
+      SelectionList:[],
+      goodsName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: 1,
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+       fileData:{},
+      roles:[],
+      startTime:"",
+      endTime:"",
+        isShow:true
+    }
+  },
+  created() {
+    // this.getTenantList()
+  },
+  methods: {
+       // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 格式限制
+    beforeUpload(file){ 
+      
+      var testmsg = file.name.substring(file.name.lastIndexOf(".") + 1);
+     const extension = testmsg === "zip"
+     if (!extension ) {
+       this.$message({
+         message: "上传文件只能是.zip格式!",
+         type: "warning",
+       });
+     }
+
+     return extension;
+
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+           this.$message({
+              message: '回执上传成功',
+              type: 'success'
+            });
+          // this.form.fileUrl = file.response.data.filePath
+          // this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+        }
+      }
+    },
+      onshow(){
+          this.isShow = !this.isShow
+      },
+    parseTime,
+    getTenantList: function() {
+        console.log(this.priceData)
+        const params = new URLSearchParams()
+      params.append('tenderParentId', this.priceData.tenderParentId)
+      params.append('tenderLogisticsId', this.priceData.logisticsBidId)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      this.loading =true
+      getLogisticsInfo(params).then(response => {
+        console.log(response)
+        this.loading = false
+         let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 投标时间
+          let startTime = this.priceData.endTime
+
+          const date = new Date(startTime)
+          const start = date.valueOf()         //开始时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          if(res.biddingStatus < 7){
+              console.log("我不满足")
+                if(time < start){
+                    res.biddingStatus = 5
+                    console.log("当前时间小于投标时间,已投递")
+                }else if(time > start){
+                    res.biddingStatus = 6
+                    console.log("当前时间小于投标时间,审核中")
+                }
+          }
+          return res
+        })
+        console.log(data)
+        this.tableData = data
+        console.log('1' + response.data.data.records)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = 1
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+.pagination{
+  padding-bottom: 30px;
+}
+</style>
+

+ 424 - 0
src/views/tender/tender/table.vue

@@ -0,0 +1,424 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <div>
+      <span style="fontSize:13px;marginLeft:20px">标的编码</span>
+        <el-input
+          v-model="logisticsCode"
+          clearable
+          placeholder="请输入标的编码"
+          style="width: 14%;"
+          size="small"
+          class="filter-item"
+          @keyup.enter.native="handleFind"
+          @clear="handleFind"
+        />
+      <span style="font-size:14px">货物名称:</span>
+      <el-input
+        v-model="goodsName"
+        clearable
+        placeholder="请输入货物"
+        style="width: 200px;margin-bottom:20px"
+        size="small"
+         @keyup.enter.native="handleFind"
+         @clear="handleFind"
+        class="filter-item"
+      />
+          <!-- <span style="fontSize:13px;marginLeft:20px">投标时间</span>
+            <el-date-picker
+              v-model="applyDateStart"
+              size="mini"
+              type="datetimerange"
+              style="width: 280px;"
+              range-separator="-"
+              clearable
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :default-time="['00:00:00', '23:59:59']"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+             @change="onApplyDate"
+             @clear="onApplyDate"
+            />
+ -->
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+    </div>
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+          <!-- <el-table-column type="expand" prop="biddingLogisticsInfoList">
+      <template slot-scope="props"> -->
+            <!-- <div  :key="index" style="background:rgb(245, 247, 250);padding:15px;margin:10px 0" v-if="isShow">
+                <el-row type="flex" class="row-bg">
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light" >运输方式: 
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 1">汽运</span> 
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 2">汽运</span>
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 3">火车运输</span>
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 4">船运</span>
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 5">汽运/火车运输/船运</span>
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 6">汽运/火车运输</span>
+                            <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 7">汽运/船运</span>
+                        </div>
+                    </el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">投标价格:{{props.row.biddingLogisticsInfoList[0].logisticsBiddingPrice}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">数量:{{props.row.biddingLogisticsInfoList[0].quantity}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">总价:{{props.row.biddingLogisticsInfoList[0].logisticsTotalPrice}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">联系电话:{{props.row.biddingLogisticsInfoList[0].phone}}</div></el-col>
+                </el-row>
+                <el-row type="flex" class="row-bg" style="margin-top:15px">
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light">包装方式:
+                           <span  v-if="props.row.biddingLogisticsInfoList[0].packingWay == 1">散粮</span> 
+                           <span v-if="props.row.biddingLogisticsInfoList[0].packingWay == 2">袋装</span> 
+                           <span v-if="props.row.biddingLogisticsInfoList[0].packingWay == 3">散装</span> 
+                           <span v-if="props.row.biddingLogisticsInfoList[0].packingWay == 4">集装箱</span> 
+                        </div>
+                    </el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">始发车站:{{props.row.biddingLogisticsInfoList[0].departureStation}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">目的车站:{{props.row.biddingLogisticsInfoList[0].destinationStation}}</div></el-col>
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light"> 状态:
+                                 <el-tag  v-if="props.row.biddingLogisticsInfoList[0].logisticsBiddingStatus == 5">已投递</el-tag>
+                                 <el-tag  v-if="props.row.biddingLogisticsInfoList[0].logisticsBiddingStatus == 6">审核中</el-tag>
+                                 <el-tag  v-if="props.row.biddingLogisticsInfoList[0].logisticsBiddingStatus == 7">已中标</el-tag>
+                                 <el-tag  v-if="props.row.biddingLogisticsInfoList[0].logisticsBiddingStatus == 8">未中标</el-tag>
+                         </div>
+                    </el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">投标时间:{{props.row.biddingLogisticsInfoList[0].logisticsBiddingTime}}</div></el-col>
+                </el-row>
+                <el-row type="flex" class="row-bg" style="margin-top:15px">
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light">备注:
+                            {{props.row.biddingLogisticsInfoList[0].logisticsRemark}}
+                        </div>
+                    </el-col>
+                </el-row>
+          </div> -->
+          <!-- <div v-for="(item,index) in props.row.biddingLogisticsInfoList" :key="index" style="background:rgb(245, 247, 250);padding:15px;margin:10px 0" >
+                <el-row type="flex" class="row-bg">
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light" >运输方式:
+                            <span v-if="item.transportMode == 1">汽运</span>
+                            <span v-if="item.transportMode == 2">汽运</span>
+                            <span v-if="item.transportMode == 3">火车运输</span>
+                            <span v-if="item.transportMode == 4">船运</span>
+                            <span v-if="item.transportMode == 5">汽运/火车运输/船运</span>
+                            <span v-if="item.transportMode == 6">汽运/火车运输</span>
+                            <span v-if="item.transportMode == 7">汽运/船运</span>
+                        </div>
+                    </el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">投标价格:{{item.logisticsBiddingPrice}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">数量:{{item.quantity}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">总价:{{item.logisticsTotalPrice}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">联系电话:{{item.phone}}</div></el-col>
+                </el-row>
+                <el-row type="flex" class="row-bg" style="margin-top:15px">
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light">包装方式:
+                           <span  v-if="item.packingWay == 1">散粮</span> 
+                           <span v-if="item.packingWay == 2">袋装</span> 
+                           <span v-if="item.packingWay == 3">散装</span> 
+                           <span v-if="item.packingWay == 4">集装箱</span> 
+                        </div>
+                    </el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">始发车站:{{item.departureStation}}</div></el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">目的车站:{{item.destinationStation}}</div></el-col>
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light"> 状态:
+                                 <el-tag  v-if="item.logisticsBiddingStatus == 5">已投递</el-tag>
+                                 <el-tag  v-if="item.logisticsBiddingStatus == 6">审核中</el-tag>
+                                 <el-tag  v-if="item.logisticsBiddingStatus == 7">已中标</el-tag>
+                                 <el-tag  v-if="item.logisticsBiddingStatus == 8">未中标</el-tag>
+                         </div>
+                    </el-col>
+                    <el-col :span="6"><div class="grid-content bg-purple">投标时间:{{item.logisticsBiddingTime}}</div></el-col>
+                </el-row>
+                <el-row type="flex" class="row-bg" style="margin-top:15px">
+                    <el-col :span="6">
+                        <div class="grid-content bg-purple-light">备注:
+                            {{item.logisticsRemark}}
+                        </div>
+                    </el-col>
+                </el-row>
+          </div> -->
+            <!-- <div @click="onshow">{{isShow ?"展开" : "收起"}}</div> -->
+      <!-- </template>
+    </el-table-column> -->
+       <el-table-column prop="logisticsCode" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" />
+
+      <el-table-column label="货物" prop="goodsName"  fixed="left"   align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+
+      <el-table-column label="数量(吨)" prop="goodsNumber" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+
+      <el-table-column label="始发地" prop="departureName" width="190" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="目的地" prop="destinationName" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="预估距离" prop="predictDistance" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <!-- <el-table-column label="单价" prop="transportUnitPrice" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column> -->
+      <el-table-column label="保证金" prop="deposit" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="状态" align="center" width="100">
+      <template slot-scope="scope">
+        <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+        <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+        <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+        <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+        <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+      </template>
+    </el-table-column>
+      <!-- <el-table-column prop="description" :show-overflow-tooltip="true" label="招标规则" width="100" align="center">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.tenderLogisticsRule == 1" type="success" effect="plain">价低者得</el-tag>
+          <el-tag v-if="scope.row.tenderLogisticsRule == 2" effect="plain" >价高者得</el-tag>
+        </template>
+      </el-table-column> -->
+      <el-table-column label="运输时间" prop="freightTime" width="200" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="投标开始时间" prop="startTime" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="投标结束时间" prop="endTime" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column label="投标备注" prop="logisticsRemark" width="150" align="center" :show-overflow-tooltip="true">
+      </el-table-column>
+        <el-table-column label="操作" width="250" fixed="right" align="center">
+        <template slot-scope="scope">
+          <!-- <el-button type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == null" slot="reference" type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == 0" slot="reference" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">改标</el-button> -->
+          <el-button  slot="reference" type="text" :disabled="scope.row.status !=3" icon="el-icon-plus" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button  slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">查看更多</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getLogisticsList } from '@/api/tender'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: [],
+      SelectionList:[],
+      goodsName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: 1,
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      startTime:"",
+      endTime:"",
+      logisticsCode:""
+        // dialogTableVisible:false
+    }
+  },
+  created() {
+    // this.getTenantList()
+    console.log('res')
+  },
+  methods: {
+    handleAdd(row){
+      this.$emit("onAdd",row)
+    },
+      handleView(row){
+          console.log("我被点击了")
+            this.$emit('change',row)
+        //   this.$parent.dialogTableVisible = true
+      },
+    parseTime,
+    getTenantList: function() {
+      this.loading = true
+      const params = new URLSearchParams()
+      params.append('tenderParentId', this.tenderParentId)
+      params.append('goodsName', this.goodsName)
+      params.append('logisticsCode', this.logisticsCode)
+      params.append('startTime', this.startTime)
+      params.append('endTime', this.endTime)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      getLogisticsList(params).then(response => {
+        console.log(response)
+        this.loading = false
+            let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于结束时间,待处理")
+          }
+
+          return res
+        })
+        this.tableData = data
+        console.log('1' + response.data.data.records)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = 1
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+
+</style>
+

+ 864 - 0
src/views/tender/tender/tender.vue

@@ -0,0 +1,864 @@
+<template>
+    <div>
+          <el-dialog :append-to-body="true" fullscreen :visible.sync="viewDialog" title="" center>
+                  <el-card class="box-card" shadow="nerver">
+                    <div slot="header" class="clearfix">
+                      <span class="topClass">基本信息</span>
+                    </div>
+
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                           标题 : <span class="flex_name"> {{bidInfo.tenderTitle}}</span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                           状态 : <span class="flex_name"> <el-tag effect="plain" v-if="bidInfo.status ==1">进行中</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==2" type="info">已结束</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==3" type="danger">已作废</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==4" type="warning">未开始</el-tag>
+                                </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         招标类型 :  <span class="flex_name"><el-tag v-if="bidInfo.tenderType == 1"  >物流</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 2" >原料</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 3" >销售</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 4" >加工承揽</el-tag>
+                                    </span>
+                       </el-col>
+                    </el-row>
+                     <el-row type="flex" class="row-bg">
+                       <!-- <el-col :span="8" class="flex_text">
+                         招标规则 : <span class="flex_name">    <el-tag v-if="bidInfo.tenderRule == 1" type="success" effect="plain">价低者得</el-tag>
+          <el-tag v-if="bidInfo.tenderRule == 2" effect="plain" >价高者得</el-tag></span>
+                       </el-col> -->
+                         <el-col :span="8" class="flex_text">
+                         开始时间 : <span class="flex_name"> {{bidInfo.startTime}} </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         截止时间 :  <span class="flex_name">{{bidInfo.endTime}}
+                                    </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                            备注:<span class="flex_name">{{bidInfo.tenderRemark}} </span>
+                       </el-col>
+                    </el-row>
+                    <el-row type="flex" class="row-bg">
+                     
+                    </el-row>
+                  </el-card>
+
+
+                  <el-card class="box-card" shadow="nerver">
+                        <div slot="header" class="clearfix">
+                          <span class="topClass">招标要求</span>
+                        </div>
+                        <div style="padding:15px 40px;line-height:30px;fontSize:15px">
+                          1、报价必须完整,报价单一经发出,投标方不得随意更改信息及报价表格式,不得插入、删除行或列,不得空报,一旦更改报价表格式,将视为废标处理; <br/>
+                          2、投标方有能力完成物流及相关运输服务、储存监管照片等资料的上传、梳理归档;有能力获取储存监控设备后自行安装和回收管理,办理相关影像资料的录入; <br/>
+                          3、运输过程中投标方需按国林源诚要求提供固定车队,所有车辆/船舶均安装GPS定位系统,主动配合完成车(船)载摄像头安装,并按照国林源诚相关要求完成物流监管系统的监管任务,自愿接受国林源诚统一运输管理; <br/>
+                          4、中标后必须在三天内完成一切出库手续,每天按所交付加工点的约定日接货量交付,如需转存、倒仓等操作需提前三个工作日以书面形式上报至国林源诚审批备案。作业费用由中标方自行承担。 <br/>
+                          5、中标方需提供的增值税专用发票为 9  %的道路运输发票。 <br/>
+                          6、如发生运输作业,运输损耗标准按照:按每车计算,不得超过每车货物数量的1 ‰。 <br/>
+                          7、在储存库点作业时,中标公司应有能力提供翻转平台或吊装机至储存库点作业。 <br/>
+                          8、中标方需按照国林源诚要求保证运输货物完好、不撒漏、防偷盗、防雨湿,如发生任何质量问题,将追究投标方违约责任。 <br/>
+                          <!-- 1、报价必须完整,报价单一经发出,投标方不得随意更改信息及报价表格式(联运需尽量提供分段分解价格),不得插入、删除行或列(联运分段标注除外),不得空报,一旦更改报价表格式,将视为废标处理; <br/>
+                          2、投标方有能力完成物流及相关运输服务、储存监管照片等资料的上传、梳理归档;有能力获取储存监控设备后自行安装和回收管理,办理相关影像资料的录入;  <br/>                                                                              
+                          3、运输过程中投标方需按国林源诚要求提供固定车队,所有车辆/船舶均安装GPS定位系统,主动配合完成车(船)载摄像头安装,并按照国林源诚相关要求完成物流监管系统的监管任务,自愿接受国林源诚统一运输管理;  <br/>                                                             
+                          4、如需转存、倒仓等操作需提前三个工作日以书面形式上报至国林源诚审批备案。作业价格为包干单价,含提送货费、保险费、税金以及市场风险全包等一切费用,报价一旦发出,视为报价有效,不做任何更改说明。<br/>
+                          5、中标方需提供的增值税专用发票为 9  %;若提供其它税率的发票,按中标价折扣运费税差。<br/>
+                          6、如发生运输作业,运输损耗标准按照:按每车计算,省内不得超过每车货物数量的1 ‰,省外不得超过每车货物数量的2‰。<br/>
+                          7、在储存库点作业时,中标公司应有能力提供翻转平台或吊装机至储存库点作业。<br/>                                                                  
+                          8、中标方需按照国林源诚要求保证运输货物完好、不撒漏、防偷盗、防雨湿,如发生任何质量问题,将追究投标方违约责任;<br/> -->
+                        </div>
+                  </el-card>
+
+
+                   <el-card class="box-card" shadow="nerver">
+                        <div slot="header" class="clearfix">
+                          <span class="topClass"> 所有标的</span>
+                        </div>
+                      <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
+                        <el-tab-pane label="标的详情" name="first">
+
+                          <div class="head-container" style="margin: 30px 0 10px 0;">
+                             <span style="fontSize:13px;marginLeft:20px">标的编码</span>
+                                          <el-input
+                                            v-model="param.logisticsCode"
+                                            clearable
+                                            placeholder="请输入标的编码"
+                                            style="width: 14%;"
+                                            size="small"
+                                            class="filter-item"
+                                            @keyup.enter.native="getParamFexd"
+                                            @clear="getParamFexd"
+                                          />
+                            <span style="fontSize:13px;marginLeft:20px">货物名称</span>
+                              <el-input
+                                v-model="param.goodsName"
+                                clearable
+                                placeholder="请输入货物名称"
+                                style="width: 200px;"
+                                size="small"
+                                class="filter-item"
+                                @keyup.enter.native="getParamFexd"
+                                @clear="getParamFexd"
+                              />
+                            </el-select>
+                            <span style="fontSize:13px;marginLeft:20px">发标时间</span>
+                              <el-date-picker
+                                v-model="applyDateStart"
+                                size="small"
+                                type="datetimerange"
+                                style="width: 400px;"
+                                range-separator="-"
+                                clearable
+                                value-format="yyyy-MM-dd HH:mm:ss"
+                                :default-time="['00:00:00', '23:59:59']"
+                                start-placeholder="开始日期"
+                                end-placeholder="结束日期"
+                              @change="onApplyDate"
+                              @clear="onApplyDate"
+                              />
+                          <el-button class="filter-item" style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="getParamFexd">搜索</el-button>
+                          <div style="height:20px"></div>
+                          <el-table center :data="Paramdata" :header-cell-style="{ background: '#f5f7fa', }" border v-loading="tableLoading" stripe style="width: 100%;">
+                             <el-table-column prop="logisticsCode" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="goodsName" fixed="left" label="货品名称" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="goodsNumber"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="departureName"  label="始发地" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="destinationName" label="目的地" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="predictDistance" label="预估运输距离(公里/海里)" width="128" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="transportUnitPrice" label="运输单价含税价(元/吨)"  width="120" :show-overflow-tooltip="true" align="center" /> -->
+                            <!-- <el-table-column prop="appendix" label="附件" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link v-if="scope.row.receiptPathUrl" :href="'http://view.officeapps.live.com/op/view.aspx?src='+scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 查看</el-link>
+                                </template>
+                              </el-table-column> -->
+                                <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                              <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                            </template>
+                          </el-table-column>
+                            <!-- <el-table-column prop="logisticsIsTender" label="是否投标" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                <el-tag v-if="scope.row.logisticsIsTender == 0" type="warning">未投标</el-tag>
+                                <el-tag v-if="scope.row.logisticsIsTender == 1" type="warning">有投标</el-tag>
+                              </template>
+                            </el-table-column> -->
+                            <el-table-column prop="tenderLogisticsRule" label="中标规则" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.tenderLogisticsRule == 1" type="success" effect="plain">价低者得</el-tag>
+                                  <el-tag v-if="scope.row.tenderLogisticsRule == 2" effect="plain" >价高者得</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column label="运输时间" prop="freightTime" width="200" align="center" :show-overflow-tooltip="true">
+                            </el-table-column>
+                            <el-table-column prop="startTime" label="投标起始时间"  width="152" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="endTime" label="投标结束时间"  width="152" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="createTime" label="创建时间"  width="152" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="logisticsRemark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column label="操作" width="150" align="center" fixed="right">
+                                <template slot-scope="scope">
+                                  <el-button  slot="reference" type="text" :disabled="scope.row.status !=3" icon="el-icon-plus" @click="handleAdd(scope.row)">投标</el-button>
+                                </template>
+                              </el-table-column>
+                          </el-table>
+                          <div class="pagination">
+                            <el-pagination
+                              :current-page.sync="param.current"
+                              :page-size="param.size"
+                              layout="total, sizes, prev, pager, next, jumper"
+                              :total="total1"
+                              :page-sizes="[10, 20, 30, 50]"
+                              background
+                              @size-change="handleSizeChangeParam"
+                              @current-change="handleCurrentChangeParam"
+                            />
+                          </div>
+                  <!-- <div style="height:60px"></div> -->
+                    </div>
+
+                </el-tab-pane>
+                <el-tab-pane label="投标详情" name="second">
+                   <!-- <el-card class="box-card" shadow="nerver"> -->
+                      <!-- <div slot="header" class="clearfix">
+                        <span class="topClass">投标详情</span>
+                      </div> -->
+                              <ckTable ref="ckTable" @change="costPlannedAmountChange($event)" @onAdd="changeAdd($event)"></ckTable>
+                   <!-- </el-card> -->
+                </el-tab-pane>
+              </el-tabs>
+             
+                      </el-card>
+          <el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '投标' : '修标'" width="50%">
+                      <el-form ref="form" :model="form" :rules="rules1" label-width="80px">
+                        <el-form-item label="货物名称">
+                           <!-- <span>{{form.biddingLogisticsRemark}}</span> -->
+                           <el-tag>{{form.goodsName}}</el-tag>
+                            <!-- <el-input  v-model="form.goodsName" style="width:50%" disabled readonly></el-input> -->
+                        </el-form-item>
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="始发地">
+                              <el-input v-model="form.departureName" readonly style="width: 80%;" placeholder="请输入始发地"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="目的地" >
+                                <el-input v-model="form.destinationName" readonly style="width: 80%;" placeholder="请输入目的地"></el-input>
+                              </el-form-item>
+                          </el-col>
+                         </el-row>
+                         <!-- <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="始发地" prop="departureStation">
+                              <el-input v-model="form.departureStation"  style="width: 80%;" placeholder="请输入始发地"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="目的地" prop="destinationStation">
+                                <el-input v-model="form.destinationStation"  style="width: 80%;" placeholder="请输入目的地"></el-input>
+                              </el-form-item>
+                          </el-col>
+                         </el-row> -->
+                        
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="包装方式" prop="packingWay">
+                              <el-select v-model="form.packingWay" style="width: 80%;"  filterable placeholder="请选择包装方式">
+                                  <el-option
+                                    v-for="item in packingWay"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id"
+                                  />
+                                </el-select>
+                            </el-form-item>
+                           </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                           <el-form-item label="运输方式" prop="transportMode">
+                             <el-select v-model="form.transportMode" style="width: 80%;"  filterable placeholder="请选择运输方式">
+                                <el-option
+                                  v-for="item in transportMode"
+                                  :key="item.id"
+                                  :label="item.name"
+                                  :value="item.id"
+                                />
+                              </el-select>
+                           </el-form-item>
+                        </el-col>
+                        </el-row>
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="数量" prop="quantity">
+                              <el-input v-model="form.quantity" readonly style="width: 80%;" placeholder="数量"><template slot="append">(吨)</template></el-input>
+                           <!-- <span style="fontSize:16px" effect="plain">{{form.quantity}} (吨)</span> -->
+                            <!-- <el-input v-model="form.quantity" style="width: 80%;" placeholder="请输入数量"></el-input> -->
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="投标价格" prop="logisticsBiddingPrice">
+                              <el-input v-model="form.logisticsBiddingPrice" style="width: 80%;" placeholder="请输入金额"><template slot="append">(吨/元)</template></el-input>
+                              <!-- <el-input v-model="form.logisticsBiddingPrice" @input="onlogistiicsPrice" style="width: 80%;" placeholder="请输入金额"><template slot="append">(吨/元)</template></el-input> -->
+                              <!-- <div style="color:#909399;fontSize:15px"> * <span style="color:#909399;fontSize:13px;position: relative;top:-5px">最大价格 {{form.transportUnitPrice}} </span> </div> -->
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                            <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="合计" prop="quantity">
+                              <el-input  :value="form.logisticsBiddingPrice ? (form.quantity *form.logisticsBiddingPrice).toFixed(4) : 0" readonly style="width: 80%;" placeholder="请输入金额"><template slot="append">(元)</template></el-input>
+                           <!-- <span style="fontSize:16px"  effect="plain">{{}} (吨/元)</span> -->
+                           <!-- <el-tag  style="fontSize:14px"  effect="plain">{{form.logisticsBiddingPrice=="NAN" ? (form.quantity *form.logisticsBiddingPrice).toFixed(4) : 0}} (吨/元)</el-tag> -->
+                            <!-- <el-input v-model="form.quantity" style="width: 80%;" placeholder="请输入数量"></el-input> -->
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                               <el-form-item label="上传凭证" >
+                              <el-upload
+                                  class="upload-demo"
+                                  :limit="1"
+                                  :on-preview="handlePreview"
+                                  :on-change="handleChange"
+                                  :on-remove="handleRemove"
+                                  :before-remove="beforeRemove"
+                                  :on-exceed="handleExceed"
+                                  :action="BASE_API+'/common/bidding/voucher'"
+                                  name="multipartFile"
+                                  list-type="text"
+                                  :file-list="fileList"
+                                  multiple
+                                >
+                                    <el-button class="el-icon-upload" >上传凭证</el-button>
+                                </el-upload>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="联系电话" prop="phone">
+                            <el-input v-model="form.phone" style="width: 80%;" maxlength="11" placeholder="请输入联系电话"></el-input>
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="备注" prop="biddingLogisticsRemark">
+                                <el-input
+                                  v-model="form.biddingLogisticsRemark"
+                                  type="textarea"
+                                  style="width: 93%;"
+                                  :autosize="{ minRows: 2, maxRows: 10}"
+                                  maxlength="500"
+                                  show-word-limit
+                                  placeholder="请输入内容"
+                                />
+                              </el-form-item>
+                          </el-col>
+                        </el-row>
+                      </el-form>
+                      <div slot="footer" class="dialog-footer">
+                        <el-button @click="dialog = false">取消</el-button>
+                        <el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
+                      </div>
+                    </el-dialog>
+            
+                   <div slot="footer" class="paginationParam" style="paddingRight:">
+                    <!-- <el-button @click="viewDialog = false">取消</el-button> -->
+                    <el-button  type="primary" @click="viewDialog = false">返回</el-button>
+                  </div>
+
+                    <el-dialog :title="goodsName" width="90%" center :visible.sync="dialogTableVisible" append-to-body>
+                          <ckDialog ref="ckDialog"></ckDialog>
+                    </el-dialog>
+
+    </el-dialog>
+    </div>
+</template>
+
+<script>
+
+import { getTableList, getQueryAdd, getQueryEdit, getQueryId } from '@/api/tender'
+import { Notification, MessageBox } from 'element-ui'
+
+import ckTable from './table.vue'
+import ckDialog from './dialog.vue'
+export default {
+   components:{
+    ckTable,
+    ckDialog
+  },
+  data() {
+    const checkTel = (rule, value, callback) => {
+      if (value == null) {
+        callback(new Error('请选择附件'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      form: {
+      },
+      data: [{}],
+      active:0,
+      BASE_API: process.env.BASE_API,
+      tableLoading:false,
+      dialog: false,
+      loading: false,
+      delLoading: false,
+      viewDialog: false,
+      isAdd: false,
+      currentPage: 1,
+      pageSize: 10,
+      total: 0, // 总数量
+      rules1:{
+        departureStation:[
+          { required: true, message: '始发车站不为空', trigger: 'blur' },
+        ],
+         destinationStation:[
+          { required: true, message: '目的车站不为空', trigger: 'blur' },
+        ],
+         logisticsBiddingPrice:[
+          { required: true, message: '投标价格不为空', trigger: 'blur' },
+        ],
+         packingWay:[
+          { required: true, message: '包装方式不为空', trigger: 'blur' },
+        ],
+         phone:[
+          { required: true, message: '联系电话不为空', trigger: 'blur' },
+        ],
+         transportMode:[
+          { required: true, message: '运输方式不为空', trigger: 'blur' },
+        ],
+      },
+      rules: {
+
+        price: [
+          { required: true, message: '报价金额不为空', trigger: 'blur' },
+        ],
+        appendix: [
+          // { type:"array",required: true, message: '附件不为空', trigger: 'blur' },
+          { validator: checkTel, trigger: 'blur' }
+        ]
+      },
+      query: {
+        type: '',
+        value: '',
+         tenderRule:"",
+        tenderType:"",
+        startTime:"",
+        endTime:""
+      },
+      fileList: [],
+      param: {
+        current: 1,
+        size: 10
+      },
+      total1: 0,
+      Paramdata: [],
+      applyDateStart:[],
+      dialogTableData:[],
+       tenderRule:[
+        {id:1,name:"价低者得"},
+        {id:2,name:"价高者得"},
+
+      ],
+      packingWay:[
+        {id:1,name:"散粮"},
+        {id:2,name:"包粮"},
+        // {id:2,name:"袋装"},
+        // {id:3,name:"散装"},
+        // {id:4,name:"集装箱"},
+      ],
+      transportMode:[
+        {id:1,name:"汽运"},
+        {id:2,name:"火车运输"},
+        {id:3,name:"船运"},
+        {id:4,name:"汽运/火车运输/船运"},
+        {id:5,name:"汽运/火车运输"},
+        {id:6,name:"汽运/船运"},
+      ],
+       activeName: 'first',
+       dialogTableVisible:false,
+       goodsName:"",
+       bidInfo:{}
+    }
+  },
+  created() {
+    this.getDictData()
+  },
+  methods: {
+    changeAdd(row){
+      console.log(row)
+      this.handleAdd(row)
+    },
+    // 投标详情 向父元素传递数据
+    costPlannedAmountChange(val){
+      console.log(val)
+ 
+      this.dialogTableVisible = true
+      setTimeout(() => {
+        this.goodsName = val.goodsName
+       this.$refs.ckDialog.priceData = val
+      this.$refs.ckDialog.handleFind()
+        console.log(this.$refs.ckDialog)
+      }, 300);
+    },
+    // 价格投标不能大于合计
+    onlogistiicsPrice(val){
+      console.log(val)
+       if(val>this.form.transportUnitPrice){
+         this.form.logisticsBiddingPrice = this.form.transportUnitPrice
+         console.log("我是大于")
+       }
+       if(val.indexOf('.') !== -1 && val == '.'){
+         this.form.logisticsBiddingPrice =0
+       }
+       if(val== "+" || val== "-"){
+         this.form.logisticsBiddingPrice = 0
+       }
+       if(val<0){
+         this.form.logisticsBiddingPrice = 0
+       }
+    },
+    onApplyDate(){
+ let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.param.startTime =this.applyDateStart[0]
+              this.param.endTime = this.applyDateStart[1]
+            }else{
+              this.param.startTime =""
+              this.param.endTime =""
+            }
+
+      this.handleFind()
+    },
+    next() {
+      console.log(this.$refs.ckTable)
+        if (this.active++ > 2) this.active = 0;
+        this.dialogTableData = this.$refs.ckTable.SelectionList
+      },
+      handleSelectionChange(row){
+        
+      },
+    // 获取详情
+    getDictData: function() {
+      this.loading = true
+        const params = new URLSearchParams()
+      params.append('current', this.currentPage)
+      params.append('size', this.pageSize)
+      params.append('tenderType', this.query.tenderType)
+      params.append('tenderTitle', this.query.value)
+      params.append('tenderRule', this.query.tenderRule)
+      params.append('startTime',this.query.startTime )
+      params.append('endTime', this.query.endTime)
+
+      getTableList(params).then(res => {
+          console.log(res)
+        // this.data = res.data.data.records
+        let data = res.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于结束时间,已结束")
+          }
+
+          return res
+        })
+        this.data = data
+        this.total = res.data.data.total
+        this.loading = false
+      })
+    },
+
+    // 搜索
+    handleFind: function() {
+      this.currentPage = 1
+      this.getDictData()
+    },
+
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.voucherFile = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+          this.form.voucherFile = file.response.data.filePath
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+          this.fileList = []
+        }
+      }
+    },
+    // 点击文件列表中已上传的文件时的钩子
+    handlePreview(file) {
+      console.log(file, 'file1')
+      // window.location.href = file.url
+    },
+    handleExceed(files, fileList) {
+      this.$message.warning(`当前限制选择 1 个附件,本次选择了 ${files.length} 个文件`)
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${file.name}?`)
+    },
+    // 下载
+    onLoad(row) {
+      // const params = new URLSearchParams()
+      // params.append('path', row)
+      const a = document.createElement('a')
+      // a.href= /bidding/load
+      const url = window.location.origin + process.env.BASE_API + '/bidding/load?path=' + encodeURIComponent(row)
+      a.href = url
+      a.click()
+    },
+
+    // 字典名称提交动作
+    doSubmit() {
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          if (this.isAdd) {
+            // 新增字典
+            console.log(this.form)
+            this.loading = true
+            getQueryAdd(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.loading = false
+              this.getDictData()
+              this.$refs['form'].resetFields()
+            }).catch(err => {
+              this.loading = false
+            })
+          } else {
+            // 更新字典
+            getQueryEdit(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.getDictData()
+            })
+          }
+        }
+      })
+    },
+    // 添加字典
+    handleAdd: function(row) {
+      this.dialog = true
+      this.isAdd = true
+      this.form = {}
+      this.fileList = []
+      this.form.tenderLogisticsId = row.logisticsBidId
+      this.form.tenderParentId = this.param.tenderParentId
+      this.form.quantity = row.goodsNumber
+      this.form.goodsName = row.goodsName
+      console.log(row) 
+      this.form.departureName = row.departureName;
+      this.form.destinationName = row.destinationName;
+      this.form.transportUnitPrice = row.transportUnitPrice
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+    },
+    // 编辑字典
+    handleEdit: function(row) {
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+      this.dialog = true
+      this.isAdd = false
+      this.form = row.bidding
+      this.form.priceQuotes = row.priceQuotes
+      if (this.form.appendix) {
+        let name = this.form.appendix.split('bidding/')
+        name = name.pop()
+        // let name = data.appendix.replace(/(.*\/)*([^.]+).*/ig, "$2");
+        this.fileList = [{ name: name, url: this.form.appendix }]
+      }
+    },
+    handleClick(row,val){
+      console.log(row,val)
+      if(row.name == "second"){
+       this.$refs.ckTable.tenderParentId = this.param.tenderParentId
+        this.$refs.ckTable.goodsName = ""
+        this.$refs.ckTable.handleFind()
+      }
+    },
+    handleView(row) {
+      let tenderType = row.tenderType
+      if(tenderType == 1){
+        this.$refs.ckTender.viewDialog = true
+         setTimeout(() => {
+            this.$refs.ckTender.activeName="first"
+            this.$refs.ckTender.param.tenderParentId = row.tenderParentId
+            this.$refs.ckTender.bidInfo = row
+            this.$refs.ckTender.param.current = 1
+            this.$refs.ckTender.getParam()
+            console.log("物流")
+      }, 300);
+      }else if(tenderType == 3){
+        this.saleViewDialog = true
+        console.log("销售")
+      }
+    },
+    getParamFexd(){
+      this.param.current = 1
+      this.getParam()
+    },
+    getParam() {
+      const data = this.param
+      this.tableLoading = true
+      getQueryId(data).then((res) => {
+       console.log(res.data.data.records, '')
+        let data = res.data.data.records
+         data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于结束时间,待处理")
+          }
+
+          return res
+        })
+        this.Paramdata = data
+        this.tableLoading = false
+        this.total1 = res.data.data.total
+      })
+    },
+
+    // 换页
+    handleCurrentChange: function(val) {
+      this.currentPage = val
+      this.getDictData()
+    },
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.getDictData()
+    },
+    handleCurrentChangeParam(val) {
+      this.param.current = val
+      this.getParam()
+    },
+    handleSizeChangeParam(val) {
+      this.param.size = val
+      this.getParam()
+    }
+  }
+}
+</script>
+<style scoped lang="scss">
+/* 去掉上传附件时候的过度效果 */
+  ::v-deep .el-upload-list__item{transition: none !important;}
+  ::v-deep .el-textarea__inner{
+  padding-bottom: 36px;
+}
+.btn_fixed{
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  padding: 15px 50px;
+  width: 100%;
+  text-align: right;
+  background: #f5f5f5;
+
+}
+.ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+.paginationParam{
+  // position: fixed;
+  // bottom: 50px;
+  bottom: 0;
+  left: 0;
+  line-height: 80px;
+  width: 100%;
+  // left: 45%;
+  // text-align: right;
+  z-index: 999;
+  background: #fff;
+}
+/deep/ .el-tabs__item{
+  font-size: 16px !important;
+  // padding: 35px  ;
+}
+.el-card {
+  border: 0px solid #fff;
+}
+.clearfix {
+    line-height: 20px;
+    font-size: 18px;
+    font-weight: 600;
+    color: #409EFF;
+}
+/deep/.el-dialog.is-fullscreen {
+
+    background-color: #f5f7f9;
+}
+.box-card{
+  margin-bottom: 20px;
+  .row-bg{
+  padding: 15px 40px 0 40px;
+  .flex_text{
+    line-height: 50px;
+    color: #8C8C8C;
+    font-size: 14px;
+    // border:1px solid red;
+    // font-weight: 600;
+  }
+  .flex_name{
+    font-size: 14px;
+    padding-left: 25px;
+    color: #575757;
+    font-weight: 550;
+  }
+}
+}
+/deep/ .el-card__body{
+  padding: 20px 0;
+}
+/deep/.el-tabs__nav-wrap::after {
+
+    background-color: #dfe4ed00;  
+}
+/deep/ .el-dialog--center .el-dialog__body {
+    text-align: initial;
+    padding: 25px 25px 0px 30px;
+}
+
+/deep/ .el-tabs--border-card{
+  // border-top:1px ;
+  border-bottom: 0px;
+
+ box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.5)
+}
+</style>
+

+ 317 - 0
src/views/tender/tender1/dialog.vue

@@ -0,0 +1,317 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+                            <el-table-column prop="customerName" fixed="left" label="产品名称" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="tenderSaleId" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" />
+
+                            <el-table-column prop="quantity"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="biddingPrice"  width="90" label="投标价格(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="totalPrice" width="90" label="总价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="phone" width="170" label="联系电话" :show-overflow-tooltip="true" align="center" />
+                             <!-- <el-table-column prop="appendix" label="凭证" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link :disabled="scope.row.voucherFile ? false : true" :href="scope.row.voucherFile" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+                                </template>
+                              </el-table-column> -->
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus == 5">已投递</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==6" type="info">审核中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==7" type="warning">已中标</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==8" type="danger">未中标</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==9" type="danger">已作废</el-tag>
+                            </template>
+                          </el-table-column>
+                            <el-table-column prop="biddingTime" label="投标时间"  width="152" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+                   <el-table-column label="操作" width="250" fixed="right" align="center">
+          <template slot-scope="scope">
+             <el-upload
+                    :disabled="scope.row.biddingStatus !=7"
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :before-upload="beforeUpload"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/bidding/receipt/' + scope.row.tenderSaleId +'/'+ priceData.tenderType"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                    accept=".zip"
+                  >
+                          <el-button @click="handleUpload" :disabled="scope.row.biddingStatus !=7" class="el-icon-upload2" size="small" type="text" style="width:90px;fontSize:14px ">上传回执</el-button>
+                  </el-upload>
+          </template>
+       </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+          current-page.sync="current"
+         :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getBiddingSaleInfo,getCustomerName } from '@/api/tender'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: {},
+      SelectionList:[],
+      goodsName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      history:[
+        {id:0,name:"否"},
+        {id:1,name:"是"}
+      ],
+      historyValue:"",
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: 1,
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      userDataList:[],
+      startTime:"",
+      endTime:"",
+        isShow:true
+    }
+  },
+  created() {
+    this.onCustmerName()
+    console.log('res')
+  },
+  methods: {
+        // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 格式限制
+    beforeUpload(file){ 
+      
+      var testmsg = file.name.substring(file.name.lastIndexOf(".") + 1);
+     const extension = testmsg === "zip"
+     if (!extension ) {
+       this.$message({
+         message: "上传文件只能是.zip格式!",
+         type: "warning",
+       });
+     }
+
+     return extension;
+
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+           this.$message({
+              message: '回执上传成功',
+              type: 'success'
+            });
+          // this.form.fileUrl = file.response.data.filePath
+          // this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+        }
+      }
+    },
+    onCustmerName(){
+        getCustomerName().then((res)=>{
+            console.log(res)
+            this.userDataList = res.data.data
+        })
+    },
+      onshow(){
+          this.isShow = !this.isShow
+      },
+    parseTime,
+    getTenantList: function() {
+        console.log(this.priceData)
+      const params = new URLSearchParams()
+      // params.append('customerId', this.goodsName)
+      // params.append('isHistory', this.historyValue)
+      params.append('tenderParentId', this.priceData.tenderParentId)
+      params.append('tenderSaleId', this.priceData.tenderSaleId)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      this.loading =true
+      getBiddingSaleInfo(params).then(response => {
+        console.log(response)
+        this.loading = false
+         let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 投标时间
+          let startTime = this.priceData.endTime
+
+          const date = new Date(startTime)
+          const start = date.valueOf()         //开始时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          if(res.biddingStatus < 7){
+              console.log("我不满足")
+                if(time < start){
+                    res.biddingStatus = 5
+                    console.log("当前时间小于投标时间,已投递")
+                }else if(time > start){
+                    res.biddingStatus = 6
+                    console.log("当前时间小于投标时间,审核中")
+                }
+          }
+          return res
+        })
+        console.log(data)
+        this.tableData = data
+        console.log('1' + response.data.data)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = 1
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+.pagination{
+  padding-bottom: 30px;
+}
+</style>
+

+ 299 - 0
src/views/tender/tender1/table.vue

@@ -0,0 +1,299 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <div>
+      <span style="font-size:14px">产品名称:</span>
+      <el-input
+        v-model="productName"
+        clearable
+        placeholder="请输入产品"
+        style="width: 200px;margin-bottom:20px"
+        size="small"
+         @keyup.enter.native="handleFind"
+         @clear="handleFind"
+        class="filter-item"
+      />
+          <!-- <span style="fontSize:13px;marginLeft:20px">投标时间</span>
+            <el-date-picker
+              v-model="applyDateStart"
+              size="mini"
+              type="datetimerange"
+              style="width: 280px;"
+              range-separator="-"
+              clearable
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :default-time="['00:00:00', '23:59:59']"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+             @change="onApplyDate"
+             @clear="onApplyDate"
+            />
+ -->
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+    </div>
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+
+     <el-table-column prop="tenderCode" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="productName" fixed="left" label="产品名称" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="productEncode" width="150" label="产品内部编码" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="processingLocation"   label="加工地点(所在加工厂) " :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="number"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="lowestPrice"  width="90" label="最低价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="highestPrice" width="90" label="最高价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="biddingStartPrice" width="100" label="投标起价(元)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deposit" width="100" label="履约保证金" :show-overflow-tooltip="true" align="center" />
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                             <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                            </template>
+                          </el-table-column>
+                          <!-- <el-table-column prop="tenderSaleRule" width="100" label="中标规则" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.tenderSaleRule == 1" type="success" effect="plain">价低者得</el-tag>
+                                  <el-tag v-if="scope.row.tenderSaleRule == 2" effect="plain" >价高者得</el-tag>
+                              </template>
+                            </el-table-column> -->
+                            <el-table-column prop="startTime" width="152" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="endTime" width="152" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="createTime" label="创建时间"  width="152" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="saleRemark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+        <el-table-column label="操作" width="250" fixed="right" align="center">
+        <template slot-scope="scope">
+          <!-- <el-button type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == null" slot="reference" type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == 0" slot="reference" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">改标</el-button> -->
+          <el-button  slot="reference" type="text" :disabled="scope.row.status !=3" icon="el-icon-plus" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button  slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">查看更多</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getBiddingSaleList } from '@/api/tender'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: [],
+      SelectionList:[],
+      productName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: '1',
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      startTime:"",
+      endTime:"",
+        // dialogTableVisible:false
+    }
+  },
+  created() {
+    // this.getTenantList()
+    console.log('res')
+  },
+  methods: {
+        handleAdd(row){
+      this.$emit("onAdd",row)
+    },
+      handleView(row){
+          console.log("我被点击了")
+            this.$emit('change',row)
+        //   this.$parent.dialogTableVisible = true
+      },
+    parseTime,
+    getTenantList: function() {
+      this.loading = true
+      const params = new URLSearchParams()
+      params.append('tenderParentId', this.tenderParentId)
+      params.append('productName', this.productName)
+      // params.append('startTime', this.startTime)
+      // params.append('endTime', this.endTime)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      getBiddingSaleList(params).then(response => {
+        console.log(response)
+        this.loading = false
+          let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+          if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于投标结束时间,待处理")
+          }
+          return res
+        })
+        this.tableData = data
+        console.log('1' + response.data.data.records)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = '1'
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+
+</style>
+

+ 922 - 0
src/views/tender/tender1/tender.vue

@@ -0,0 +1,922 @@
+<template>
+    <div>
+          <el-dialog :append-to-body="true" fullscreen :visible.sync="viewDialog" title="" center>
+                  <el-card class="box-card" shadow="nerver">
+                    <div slot="header" class="clearfix">
+                      <span class="topClass">基本信息</span>
+                    </div>
+
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                           标题 : <span class="flex_name"> {{bidInfo.tenderTitle}}</span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                           状态 : <span class="flex_name"> <el-tag effect="plain" v-if="bidInfo.status ==1">进行中</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==2" type="info">已结束</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==3" type="danger">已作废</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==4" type="warning">未开始</el-tag>
+                                </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         招标类型 :  <span class="flex_name"><el-tag v-if="bidInfo.tenderType == 1"  >物流</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 2" >原料</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 3" >销售</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 4" >加工承揽</el-tag>
+                                    </span>
+                       </el-col>
+                    </el-row>
+                     <el-row type="flex" class="row-bg">
+                       <!-- <el-col :span="8" class="flex_text">
+                         招标规则 : <span class="flex_name">    <el-tag v-if="bidInfo.tenderRule == 1" type="success" effect="plain">价低者得</el-tag>
+          <el-tag v-if="bidInfo.tenderRule == 2" effect="plain" >价高者得</el-tag></span>
+                       </el-col> -->
+                         <el-col :span="8" class="flex_text">
+                         开始时间 : <span class="flex_name"> {{bidInfo.startTime}} </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         截止时间 :  <span class="flex_name">{{bidInfo.endTime}}
+                                    </span>
+                       </el-col>
+                        <el-col :span="8" class="flex_text">
+                            备注:<span class="flex_name">{{bidInfo.tenderRemark}}</span>
+                       </el-col>
+                    </el-row>
+                    <el-row type="flex" class="row-bg">
+                      
+                    </el-row>
+                  </el-card>
+                   <el-card class="box-card" shadow="nerver">
+                        <div slot="header" class="clearfix">
+                          <span class="topClass"> 所有标的</span>
+                        </div>
+                      <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
+                        <el-tab-pane label="标的详情" name="first">
+
+                          <div class="head-container" style="margin: 30px 0 10px 0;">
+                            <span style="fontSize:13px">产品名称</span>
+                              <el-input
+                                v-model="param.productName"
+                                clearable
+                                placeholder="请输入产品名称"
+                                style="width: 200px;"
+                                size="small"
+                                class="filter-item"
+                                @keyup.enter.native="getParamFexd"
+                                @clear="getParamFexd"
+                              />
+                            <span style="fontSize:13px;marginLeft:20px">编码</span>
+                              <el-input
+                                v-model="param.productEncode"
+                                clearable
+                                placeholder="请输入编码"
+                                style="width: 200px;"
+                                size="small"
+                                class="filter-item"
+                                @keyup.enter.native="getParamFexd"
+                                @clear="getParamFexd"
+                              />
+                            <!-- <span style="fontSize:13px;marginLeft:20px">加工地点</span>
+                              <el-input
+                                v-model="param.processingLocation"
+                                clearable
+                                placeholder="请输入加工地点"
+                                style="width: 200px;"
+                                size="small"
+                                class="filter-item"
+                                @keyup.enter.native="getParamFexd"
+                                @clear="getParamFexd"
+                              /> -->
+                            <span style="fontSize:13px;marginLeft:20px">发标时间</span>
+                              <el-date-picker
+                                v-model="applyDateStart"
+                                size="small"
+                                type="datetimerange"
+                                style="width: 400px;"
+                                range-separator="-"
+                                clearable
+                                value-format="yyyy-MM-dd HH:mm:ss"
+                                :default-time="['00:00:00', '23:59:59']"
+                                start-placeholder="开始日期"
+                                end-placeholder="结束日期"
+                              @change="onApplyDate"
+                              @clear="onApplyDate"
+                              />
+                              <div style="text-align: right;margin-right:40px">
+                                   <el-button class="filter-item" style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="getParamFexd">搜索</el-button>
+                              </div>
+                          <div style="height:20px"></div>
+                          <el-table center :data="Paramdata" :header-cell-style="{ background: '#f5f7fa', }" border v-loading="tableLoading" stripe style="width: 100%;">
+
+                            <el-table-column prop="tenderCode" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="productName" fixed="left" label="产品名称" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="productEncode" width="150" label="产品内部编码" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="processingLocation"   label="加工地点(所在加工厂) " :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="number"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="lowestPrice"  width="90" label="最低价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="highestPrice" width="90" label="最高价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="biddingStartPrice" width="100" label="投标起价(元)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deposit" width="100" label="履约保证金" :show-overflow-tooltip="true" align="center" />
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                             <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                            </template>
+                          </el-table-column>
+                          <el-table-column prop="tenderSaleRule" width="100" label="中标规则" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.tenderSaleRule == 1" type="success" effect="plain">价低者得</el-tag>
+                                  <el-tag v-if="scope.row.tenderSaleRule == 2" effect="plain" >价高者得</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="startTime" width="152" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="endTime" width="152" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="createTime" label="创建时间"  width="152" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="saleRemark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column label="操作" width="150" align="center" fixed="right">
+                                <template slot-scope="scope">
+                                  <el-button  slot="reference" type="text" :disabled="scope.row.status !=3" icon="el-icon-plus" @click="handleAdd(scope.row)">投标</el-button>
+                                  <!-- <el-button  slot="reference" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)">投标</el-button> -->
+                                </template>
+                              </el-table-column>
+                          </el-table>
+                          <div class="pagination">
+                            <el-pagination
+                              :current-page.sync="param.current"
+                              :page-size="param.size"
+                              layout="total, sizes, prev, pager, next, jumper"
+                              :total="total1"
+                              :page-sizes="[10, 20, 30, 50]"
+                              background
+                              @size-change="handleSizeChangeParam"
+                              @current-change="handleCurrentChangeParam"
+                            />
+                          </div>
+                  <!-- <div style="height:60px"></div> -->
+                    </div>
+
+                          </el-tab-pane>
+                          <el-tab-pane label="投标详情" name="second">
+                            <!-- <el-card class="box-card" shadow="nerver"> -->
+                                <!-- <div slot="header" class="clearfix">
+                                  <span class="topClass">投标详情</span>
+                                </div> -->
+                                        <ckTable ref="ckTable" @change="costPlannedAmountChange($event)" @onAdd="changeAdd($event)"></ckTable>
+                            <!-- </el-card> -->
+                          </el-tab-pane>
+                        </el-tabs>
+                      </el-card>
+
+          <el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="dialog" :title="isAdd ? '投标' : '修标'" width="50%">
+                      <el-form ref="form" :model="form" :rules="rules1" label-width="80px">
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="产品名称">
+                              <!-- <span>{{form.biddingLogisticsRemark}}</span> -->
+                              <el-tag>{{form.goodsName}}</el-tag>
+                                <!-- <el-input  v-model="form.goodsName" style="width:50%" readonly></el-input> -->
+                            </el-form-item>
+                              </el-col>
+                              <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                                  <el-form-item label="产品编码">
+                                    <el-tag>{{form.tenderCode}}</el-tag>
+                                  </el-form-item>
+                              </el-col>
+                        </el-row>
+
+                           <!-- <el-form-item label="数量" prop="quantity">
+                              <el-input v-model="form.quantity" readonly style="width: 70%;"  placeholder="数量"><template slot="append">(吨)</template></el-input>
+                          </el-form-item>
+
+                          <el-form-item label="合计" prop="quantity">
+                              <el-input  :value="form.biddingPrice ? (form.quantity *form.biddingPrice).toFixed(4) : 0" readonly style="width: 70%;" placeholder="请输入金额"><template slot="append">(元)</template></el-input>
+
+                          </el-form-item>
+
+                          <el-form-item label="投标价格" prop="biddingPrice">
+                            <div  class="mo-input--number">
+                              <el-input-number style="width:100%" v-model="form.biddingPrice"  step-strictly controls-position="right" :step="form.biddingStartPrice" :min="form.lowestPrice"  :max="form.highestPrice"></el-input-number>
+                               <div class="define-append">(吨/元)</div>
+                             </div>
+
+                              <div style="color:#909399;fontSize:15px"> * <span style="color:#909399;fontSize:13px;position: relative;top:-5px">价格范围:{{form.lowestPrice}} ~ {{form.highestPrice}}(元),起价:{{form.biddingStartPrice}}(元) </span> </div>
+
+                            </el-form-item>
+                            <el-form-item label="上传凭证" >
+                              <el-upload
+                                  class="upload-demo"
+                                  :limit="1"
+                                  :on-preview="handlePreview"
+                                  :on-change="handleChange"
+                                  :on-remove="handleRemove"
+                                  :before-remove="beforeRemove"
+                                  :on-exceed="handleExceed"
+                                  :action="BASE_API+'/common/bidding/voucher'"
+                                  name="multipartFile"
+                                  list-type="text"
+                                  :file-list="fileList"
+                                  multiple
+                                >
+                                    <el-button class="el-icon-upload" >上传凭证</el-button>
+                                </el-upload>
+                            </el-form-item>
+
+           
+                         <el-form-item label="联系电话" prop="phone">
+                            <el-input v-model="form.phone" style="width: 73%;" placeholder="请输入联系电话"></el-input>
+                          </el-form-item>
+                          <el-form-item label="备注" prop="biddingLogisticsRemark">
+                                <el-input
+                                  v-model="form.remark"
+                                  type="textarea"
+                                  style="width: 73%;"
+                                  :autosize="{ minRows: 2, maxRows: 10}"
+                                  maxlength="500"
+                                  show-word-limit
+                                  placeholder="请输入内容"
+                                />
+                              </el-form-item> -->
+
+                            
+                       <el-row :gutter="20" style="margin-top:20px">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="数量" prop="quantity">
+                              <el-input v-model="form.quantity" readonly style="width: 80%;" placeholder="数量"><template slot="append">(吨)</template></el-input>
+                     
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="投标价格" prop="biddingPrice">
+                             <div  class="mo-input--number">
+                              <!-- <el-input-number style="width:100%" @change="handleNumberChange" v-model.number="form.biddingPrice"  step-strictly controls-position="right"  :min="form.lowestPrice"  :max="form.highestPrice"></el-input-number> -->
+                              <el-input-number style="width:100%" @change="handleNumberChange" v-model.number="form.biddingPrice"  controls-position="right" :step="form.biddingStartPrice" :min="form.lowestPrice"  :max="form.highestPrice"></el-input-number>
+                              <!-- <el-input-number style="width:100%" @change="handleNumberChange" v-model.number="biddingPrice"  step-strictly controls-position="right" :step="13" :min="208"  :max="308"></el-input-number> -->
+                               <div class="define-append">(吨/元)</div>
+                             </div>
+                              <div style="color:#909399;fontSize:15px"> * <span style="color:#909399;fontSize:13px;position: relative;top:-5px">价格范围:{{form.lowestPrice}} ~ {{form.highestPrice}}(元),起价:{{form.biddingStartPrice}}(元) </span> </div>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+                              
+                               <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="合计" prop="quantity">
+                              <el-input  :value="form.biddingPrice ? (form.quantity *form.biddingPrice).toFixed(4) : 0" readonly style="width: 80%;" placeholder="请输入金额"><template slot="append">(元)</template></el-input>
+                         
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                               <el-form-item label="上传凭证" prop="voucherFile" class="is-required">
+                              <el-upload
+                                  class="upload-demo"
+                                  :limit="1"
+                                  :on-preview="handlePreview"
+                                  :on-change="handleChange"
+                                  :on-remove="handleRemove"
+                                  :before-remove="beforeRemove"
+                                  :on-exceed="handleExceed"
+                                  :action="BASE_API+'/common/bidding/voucher'"
+                                  name="multipartFile"
+                                  list-type="text"
+                                  :file-list="fileList"
+                                  multiple
+                                >
+                                    <el-button class="el-icon-upload" >上传凭证</el-button>
+                                </el-upload>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                        <el-row :gutter="20" style="margin-top:20px">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="联系电话" >
+                            <el-input v-model="form.phone" style="width: 80%;" maxlength="11" placeholder="请输入联系电话"></el-input>
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="备注" prop="biddingLogisticsRemark">
+                                <el-input
+                                  v-model="form.remark"
+                                  type="textarea"
+                                  style="width: 93%;"
+                                  :autosize="{ minRows: 2, maxRows: 10}"
+                                  maxlength="500"
+                                  show-word-limit
+                                  placeholder="请输入内容"
+                                />
+                              </el-form-item>
+                          </el-col>
+                        </el-row>
+                      </el-form>
+                      <div slot="footer" class="dialog-footer">
+                        <el-button @click="dialog = false">取消</el-button>
+                        <el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
+                      </div>
+                    </el-dialog>
+            
+                   <div slot="footer" class="paginationParam" style="paddingRight:">
+                    <!-- <el-button @click="viewDialog = false">取消</el-button> -->
+                    <el-button :loading="loading" type="primary" @click="viewDialog = false">返回</el-button>
+                  </div>
+
+                         <el-dialog :title="goodsName" width="90%" center :visible.sync="dialogTableVisible" append-to-body>
+                               <ckDialog ref="ckDialog"></ckDialog>
+                          </el-dialog>
+
+    </el-dialog>
+    </div>
+</template>
+
+<script>
+
+import { getTableList, getSaleAdd, getQueryEdit, getSaleId } from '@/api/tender'
+import { Notification, MessageBox } from 'element-ui'
+
+import ckTable from './table.vue'
+import ckDialog from './dialog.vue'
+export default {
+   components:{
+    ckTable,
+    ckDialog
+  },
+  data() {
+    const checkTel = (rule, value, callback) => {
+      if (value == null) {
+        callback(new Error('请选择附件'))
+      } else {
+        callback()
+      }
+    }
+     const checkTel1 = (rule, value, callback) => {
+      console.log(this.form.voucherFile)
+      console.log(value, 'value')
+      if (this.form.voucherFile == null || this.form.voucherFile == '') {
+        callback(new Error('请选择凭证'))
+        console.log('没过')
+      } else {
+        callback()
+        console.log('过')
+      }
+    }
+    return {
+      form: {
+        voucherFile:"",
+        biddingPrice:0
+      },
+      data: [{}],
+      active:0,
+      BASE_API: process.env.BASE_API,
+      dialog: false,
+      loading: false,
+      delLoading: false,
+      tableLoading:false,
+      viewDialog: false,
+      isAdd: false,
+      currentPage: 1,
+      pageSize: 10,
+      total: 0, // 总数量
+      rules1:{
+        departureStation:[
+          { required: true, message: '始发车站不为空', trigger: 'blur' },
+        ],
+         destinationStation:[
+          { required: true, message: '目的车站不为空', trigger: 'blur' },
+        ],
+         biddingPrice:[
+          { required: true, message: '投标价格不为空', trigger: 'blur' },
+        ],
+         packingWay:[
+          { required: true, message: '包装方式不为空', trigger: 'blur' },
+        ],
+         phone:[
+          { required: true, message: '联系电话不为空', trigger: 'blur' },
+        ],
+         transportMode:[
+          { required: true, message: '运输方式不为空', trigger: 'blur' },
+        ],
+         voucherFile: [
+          { validator: checkTel1, trigger: 'change' }
+        ]
+      },
+      rules: {
+
+        price: [
+          { required: true, message: '报价金额不为空', trigger: 'blur' },
+        ],
+        appendix: [
+          // { type:"array",required: true, message: '附件不为空', trigger: 'blur' },
+          { validator: checkTel, trigger: 'blur' }
+        ]
+      },
+      query: {
+        type: '',
+        value: '',
+         tenderRule:"",
+        tenderType:"",
+        startTime:"",
+        endTime:""
+      },
+      fileList: [],
+      param: {
+        current: 1,
+        size: 10
+      },
+      total1: 0,
+      Paramdata: [],
+      applyDateStart:[],
+      dialogTableData:[],
+       tenderRule:[
+        {id:1,name:"价低者得"},
+        {id:2,name:"价高者得"},
+
+      ],
+      packingWay:[
+        {id:1,name:"散粮"},
+        {id:2,name:"袋装"},
+        {id:3,name:"散装"},
+        {id:4,name:"集装箱"},
+      ],
+      transportMode:[
+        {id:1,name:"汽运"},
+        {id:2,name:"火车运输"},
+        {id:3,name:"船运"},
+        {id:4,name:"汽运/火车运输/船运"},
+        {id:5,name:"汽运/火车运输"},
+        {id:6,name:"汽运/船运"},
+      ],
+       activeName: 'first',
+       dialogTableVisible:false,
+       goodsName:"",
+       bidInfo:{},
+       biddingPrice:null,
+      biddingStartPrice:null,
+      lowestPrice :null,
+      highestPrice:null
+    }
+  },
+  created() {
+    // this.getDictData()
+  },
+  methods: {
+     changeAdd(row){
+      console.log(row)
+      this.handleAdd(row)
+    },
+    // 投标详情 向父元素传递数据
+    costPlannedAmountChange(val){
+      console.log(val)
+ 
+      this.dialogTableVisible = true
+      setTimeout(() => {
+        this.goodsName = val.goodsName
+       this.$refs.ckDialog.priceData = val
+      this.$refs.ckDialog.handleFind()
+        console.log(this.$refs.ckDialog)
+      }, 300);
+    },
+    handleNumberChange(val,row){
+      console.log(val,row)
+      // if(val > row){
+      //   console.log("我是加")
+      //   this.form.biddingPrice =  row + this.form.biddingStartPrice 
+      // }else if (val < row){
+      //   console.log("我是减")
+      //   this.form.biddingPrice =  row - this.form.biddingStartPrice     
+      // }
+    },
+    // 价格投标不能大于合计
+    onlogistiicsPrice(val){
+      console.log(val)
+       if(val>this.form.transportUnitPrice){
+         this.form.logisticsBiddingPrice = this.form.transportUnitPrice
+         console.log("我是大于")
+       }
+       if(val.indexOf('.') !== -1 && val == '.'){
+         this.form.logisticsBiddingPrice =0
+       }
+       if(val== "+" || val== "-"){
+         this.form.logisticsBiddingPrice = 0
+       }
+       if(val<0){
+         this.form.logisticsBiddingPrice = 0
+       }
+    },
+    onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.param.startTime =this.applyDateStart[0]
+              this.param.endTime = this.applyDateStart[1]
+            }else{
+              this.param.startTime =""
+              this.param.endTime =""
+            }
+
+      this.getParamFexd()
+    },
+    next() {
+      console.log(this.$refs.ckTable)
+        if (this.active++ > 2) this.active = 0;
+        this.dialogTableData = this.$refs.ckTable.SelectionList
+      },
+      handleSelectionChange(row){
+        
+      },
+    // 获取详情
+    getDictData: function() {
+      this.loading = true
+        const params = new URLSearchParams()
+      params.append('current', this.currentPage)
+      params.append('size', this.pageSize)
+      params.append('tenderType', this.query.tenderType)
+      params.append('tenderTitle', this.query.value)
+      params.append('tenderRule', this.query.tenderRule)
+      params.append('startTime',this.query.startTime )
+      params.append('endTime', this.query.endTime)
+
+      getTableList(params).then(res => {
+          console.log(res)
+        // this.data = res.data.data.records
+        let data = res.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于结束时间,已结束")
+          }
+
+          return res
+        })
+        this.data = data
+        this.total = res.data.data.total
+        this.loading = false
+      })
+    },
+
+    // 搜索
+    handleFind: function() {
+      this.currentPage = 1
+      this.getDictData()
+    },
+
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.voucherFile = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+          this.form.voucherFile = file.response.data.filePath
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+          this.fileList = []
+        }
+      }
+    },
+    // 点击文件列表中已上传的文件时的钩子
+    handlePreview(file) {
+      console.log(file, 'file1')
+      // window.location.href = file.url
+    },
+    handleExceed(files, fileList) {
+      this.$message.warning(`当前限制选择 1 个附件,本次选择了 ${files.length} 个文件`)
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${file.name}?`)
+    },
+    // 下载
+    onLoad(row) {
+      // const params = new URLSearchParams()
+      // params.append('path', row)
+      const a = document.createElement('a')
+      // a.href= /bidding/load
+      const url = window.location.origin + process.env.BASE_API + '/bidding/load?path=' + encodeURIComponent(row)
+      a.href = url
+      a.click()
+    },
+
+    // 字典名称提交动作
+    doSubmit() {
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          if (this.isAdd) {
+            // 新增字典
+            console.log(this.form)
+            this.loading = true
+            getSaleAdd(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.loading = false
+              // this.getDictData()
+              this.$refs['form'].resetFields()
+            }).catch(err => {
+              this.loading = false
+            })
+          } else {
+            // 更新字典
+            getQueryEdit(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.getDictData()
+            })
+          }
+        }
+      })
+    },
+    // 添加字典
+    handleAdd: function(row) {
+  
+      this.form = {}
+      this.fileList = []
+
+      this.form.tenderSaleId = row.tenderSaleId
+      this.form.tenderParentId = this.param.tenderParentId
+      this.form.quantity = row.number
+      this.form.goodsName = row.productName
+      this.form.tenderCode = row.tenderCode
+      this.$set(this.form, "biddingPrice", row.lowestPrice)
+      this.form.biddingStartPrice = row.biddingStartPrice
+      this.form.lowestPrice = row.lowestPrice
+        // this.form.highestPrice = row.highestPrice
+      this.$set(this.form, "highestPrice", row.highestPrice)
+      // this.form.biddingPrice =  row.lowestPrice
+
+       this.dialog = true
+      this.isAdd = true
+
+      console.log(row,"row")
+      console.log(this.form)
+          
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+    },
+    // 编辑字典
+    handleEdit: function(row) {
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+      this.dialog = true
+      this.isAdd = false
+      this.form = row.bidding
+      this.form.priceQuotes = row.priceQuotes
+      if (this.form.appendix) {
+        let name = this.form.appendix.split('bidding/')
+        name = name.pop()
+        // let name = data.appendix.replace(/(.*\/)*([^.]+).*/ig, "$2");
+        this.fileList = [{ name: name, url: this.form.appendix }]
+      }
+    },
+    handleClick(row,val){
+      console.log(row,val)
+      if(row.name == "second"){
+       this.$refs.ckTable.tenderParentId = this.param.tenderParentId
+        this.$refs.ckTable.productName =""
+        this.$refs.ckTable.handleFind()
+      }
+    },
+    handleView(row) {
+      let tenderType = row.tenderType
+      if(tenderType == 1){
+        this.$refs.ckTender.viewDialog = true
+         setTimeout(() => {
+            this.$refs.ckTender.activeName="first"
+            this.$refs.ckTender.param.tenderParentId = row.tenderParentId
+            this.$refs.ckTender.bidInfo = row
+            this.$refs.ckTender.param.current = 1
+            this.$refs.ckTender.getParam()
+            console.log("物流")
+      }, 300);
+      }else if(tenderType == 3){
+        this.saleViewDialog = true
+        console.log("销售")
+      }
+    },
+    // 所有标的搜索
+    getParamFexd(){
+      this.param.current = 1
+      this.getParam()
+    },
+    // 所有标的列表数据
+    getParam() {
+      const data = this.param
+      this.tableLoading = true
+      getSaleId(data).then((res) => {
+       console.log(res.data.data.records, '')
+        let data = res.data.data.records
+         data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于结束时间,待处理")
+          }
+
+          return res
+        })
+        this.Paramdata = data
+        this.tableLoading = false
+        this.total1 = res.data.data.total
+      })
+    },
+
+    // 换页
+    handleCurrentChange: function(val) {
+      this.currentPage = val
+      this.getDictData()
+    },
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.getDictData()
+    },
+    handleCurrentChangeParam(val) {
+      this.param.current = val
+      this.getParam()
+    },
+    handleSizeChangeParam(val) {
+      this.param.size = val
+      this.getParam()
+    }
+  }
+}
+</script>
+<style scoped lang="scss">
+/* 去掉上传附件时候的过度效果 */
+  ::v-deep .el-upload-list__item{transition: none !important;}
+  ::v-deep .el-textarea__inner{
+  padding-bottom: 36px;
+}
+.btn_fixed{
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  padding: 15px 50px;
+  width: 100%;
+  text-align: right;
+  background: #f5f5f5;
+
+}
+.ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+.paginationParam{
+  // position: fixed;
+  // bottom: 50px;
+  bottom: 0;
+  left: 0;
+  line-height: 80px;
+  width: 100%;
+  // left: 45%;
+  // text-align: right;
+  z-index: 999;
+  background: #fff;
+}
+/deep/ .el-tabs__item{
+  font-size: 16px !important;
+  // padding: 35px  ;
+}
+.el-card {
+  border: 0px solid #fff;
+}
+.clearfix {
+    line-height: 20px;
+    font-size: 18px;
+    font-weight: 600;
+    color: #409EFF;
+}
+/deep/.el-dialog.is-fullscreen {
+
+    background-color: #f5f7f9;
+}
+.box-card{
+  margin-bottom: 20px;
+  .row-bg{
+  padding: 15px 40px 0 40px;
+  .flex_text{
+    line-height: 50px;
+    color: #8C8C8C;
+    font-size: 14px;
+    // border:1px solid red;
+    // font-weight: 600;
+  }
+  .flex_name{
+    font-size: 14px;
+    padding-left: 25px;
+    color: #575757;
+    font-weight: 550;
+  }
+}
+}
+/deep/ .el-card__body{
+  padding: 20px 0;
+}
+/deep/.el-tabs__nav-wrap::after {
+
+    background-color: #dfe4ed00;  
+}
+/deep/ .el-dialog--center .el-dialog__body {
+    text-align: initial;
+    padding: 25px 25px 0px 30px;
+}
+/deep/ .el-tabs--border-card{
+  // border-top:1px ;
+  border-bottom: 0px;
+
+ box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.5)
+}
+
+.mo-input--number {
+    border: 1px solid #DCDFE6;
+    width: 70%;
+    display: flex;
+    border-radius: 4px;
+    .el-input-number--mini{
+      flex: 1;
+    }
+    ::v-deep .el-input__inner{
+      border: none!important;
+    }
+  }
+
+
+.define-append{
+   background-color: #F5F7FA;
+    color: #909399;
+    vertical-align: middle;
+    display: table-cell;
+    position: relative;
+    border-left: 1px solid #DCDFE6;
+    border-radius: 4px;
+    padding: 0 20px;
+    // width: 1px;
+    white-space: nowrap;
+  }
+
+</style>
+

+ 358 - 0
src/views/tender/tender2/dialog.vue

@@ -0,0 +1,358 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <!-- <div class="" style="margin: 10px 0 30px 0;">
+      <span style="font-size:14px">客户名称:</span>
+      <el-select v-model="goodsName" filterable style="width: 200px;" clearable size="small" placeholder="请选择" @clear="handleFind">
+            <el-option v-for="item in userDataList" :key="item.customerId" :label="item.customerName" :value="item.customerId" />
+          </el-select>
+      <span style="font-size:14px;margin-left:20px">是否为历史记录:</span>
+       <el-select v-model="historyValue" style="width: 200px;" @keyup.enter.native="handleFind" @clear="handleFind" size="small" clearable  value-key="areaId" filterable placeholder="请选择">
+        <el-option
+          v-for="item in history"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        />
+      </el-select> 
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+    </div>
+-->
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+                            <el-table-column prop="customerName" width="170" fixed="left" label="产品名称" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="rawTenderId" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" />
+
+                            <el-table-column prop="quantity"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="biddingPrice"  width="90" label="投标价格(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="totalPrice" width="90" label="总价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="priceProvision"  width="100" label="价格条款" :show-overflow-tooltip="true" align="center" >
+                                <template slot-scope="scope">
+                                    <span v-if="scope.row.priceProvision ==1"> 港口平仓价</span>
+                                    <span v-if="scope.row.priceProvision ==2"> 到厂价</span>
+                                    <span v-if="scope.row.priceProvision ==3"> 自提价</span>
+                                </template>
+                            </el-table-column>
+                                 <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus == 5">已投递</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==6" type="info">审核中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==7" type="warning">已中标</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==8" type="danger">未中标</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.biddingStatus ==9" type="danger">已作废</el-tag>
+                            </template>
+                          </el-table-column>
+                            <el-table-column prop="dateManufacture" label="生产日期"  width="152" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deliveryStartTime" width="170" label="交货开始" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deliveryEndTime" width="170" label="交货结束" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deliveryLocation" width="170" label="交货地点" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="invoiceRate"  label="发票税率(%)" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <span>{{scope.row.invoiceRate}}</span> <span v-if="scope.row.invoiceRate"> %</span>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop=""  width="90" label="发票种类" :show-overflow-tooltip="true" align="center" >
+                                <template slot-scope="scope">
+                                    <span v-if="scope.row.invoiceType ==1"> 普票</span>
+                                    <span v-if="scope.row.invoiceType ==2"> 专票</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="phone" width="170" label="联系电话" :show-overflow-tooltip="true" align="center" />
+                             <!-- <el-table-column prop="appendix" label="凭证" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link :disabled="scope.row.voucherFile ? false : true" :href="scope.row.voucherFile" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
+                                </template>
+                              </el-table-column> -->
+                        
+                            <el-table-column prop="biddingTime" label="投标时间"  width="152" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+                       <el-table-column label="操作" width="250" fixed="right" align="center">
+          <template slot-scope="scope">
+             <el-upload
+                    :disabled="scope.row.biddingStatus !=7"
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :before-upload="beforeUpload"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/bidding/receipt/' + scope.row.rawTenderId +'/'+ priceData.tenderType"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                    accept=".zip"
+                  >
+                          <el-button @click="handleUpload" :disabled="scope.row.biddingStatus !=7" class="el-icon-upload2" size="small" type="text" style="width:90px;fontSize:14px ">上传回执</el-button>
+                  </el-upload>
+          </template>
+       </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+         current-page.sync="current"
+         :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getBiddingRowInfo,getCustomerName } from '@/api/tender'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: {},
+      SelectionList:[],
+      goodsName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      history:[
+        {id:0,name:"否"},
+        {id:1,name:"是"}
+      ],
+      historyValue:"",
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: '1',
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      userDataList:[],
+      startTime:"",
+      endTime:"",
+        isShow:true
+    }
+  },
+  created() {
+    this.onCustmerName()
+    console.log('res')
+  },
+  methods: {
+        // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 格式限制
+    beforeUpload(file){ 
+      
+      var testmsg = file.name.substring(file.name.lastIndexOf(".") + 1);
+     const extension = testmsg === "zip"
+     if (!extension ) {
+       this.$message({
+         message: "上传文件只能是.zip格式!",
+         type: "warning",
+       });
+     }
+
+     return extension;
+
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+           this.$message({
+              message: '回执上传成功',
+              type: 'success'
+            });
+          // this.form.fileUrl = file.response.data.filePath
+          // this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+        }
+      }
+    },
+    onCustmerName(){
+        getCustomerName().then((res)=>{
+            console.log(res)
+            this.userDataList = res.data.data
+        })
+    },
+      onshow(){
+          this.isShow = !this.isShow
+      },
+    parseTime,
+    getTenantList: function() {
+        console.log(this.priceData)
+      const params = new URLSearchParams()
+      // params.append('customerId', this.goodsName)
+      // params.append('isHistory', this.historyValue)
+      params.append('tenderParentId', this.priceData.tenderParentId)
+      params.append('rawTenderId', this.priceData.rawTenderId)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      this.loading =true
+      getBiddingRowInfo(params).then(response => {
+        console.log(response)
+        this.loading = false
+         let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 投标时间
+          let startTime = this.priceData.endTime
+
+          const date = new Date(startTime)
+          const start = date.valueOf()         //开始时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          if(res.biddingStatus < 7){
+              console.log("我不满足")
+                if(time < start){
+                    res.biddingStatus = 5
+                    console.log("当前时间小于投标时间,已投递")
+                }else if(time > start){
+                    res.biddingStatus = 6
+                    console.log("当前时间小于投标时间,审核中")
+                }
+          }
+          return res
+        })
+        console.log(data)
+        this.tableData = data
+        console.log('1' + response.data.data)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = '1'
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+.pagination{
+  padding-bottom: 30px;
+}
+</style>
+

+ 312 - 0
src/views/tender/tender2/table.vue

@@ -0,0 +1,312 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <div>
+      <span style="font-size:14px">品种:</span>
+      <el-input
+        v-model="goodsName"
+        clearable
+        placeholder="请输入货物"
+        style="width: 200px;margin-bottom:20px"
+        size="small"
+         @keyup.enter.native="handleFind"
+         @clear="handleFind"
+        class="filter-item"
+      />
+          <!-- <span style="fontSize:13px;marginLeft:20px">投标时间</span>
+            <el-date-picker
+              v-model="applyDateStart"
+              size="mini"
+              type="datetimerange"
+              style="width: 280px;"
+              range-separator="-"
+              clearable
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :default-time="['00:00:00', '23:59:59']"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+             @change="onApplyDate"
+             @clear="onApplyDate"
+            />
+ -->
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+    </div>
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+     
+    <el-table-column prop="tenderRawCode" width="150" label="标的编码" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="breeds"   label="品种" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="number"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="unitPrice" width="100" label="单价(元/吨)" :show-overflow-tooltip="true" align="center" /> -->
+                              <el-table-column prop="deliveryMethod" width="100" label="交付方式" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.deliveryMethod == 1" type="success" effect="plain">自提</el-tag>
+                                  <el-tag v-if="scope.row.deliveryMethod == 2" effect="plain" >送货到厂</el-tag>
+                              </template>
+                            </el-table-column>
+                              <el-table-column prop="deliveryMethod" label="等级" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.level == 5" >二级</el-tag>
+                                  <el-tag v-if="scope.row.level == 6" >三级</el-tag>
+                              </template>
+                            </el-table-column>
+                             <!-- <el-table-column prop="appendix" label="回执" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link v-if="scope.row.receiptPathUrl" :href="'http://view.officeapps.live.com/op/view.aspx?src='+scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 查看</el-link>
+                                </template>
+                              </el-table-column> -->
+
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                             <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                            </template>
+                          </el-table-column>
+                          <!-- <el-table-column prop="tenderLogisticsRule" label="中标规则" width="100" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.rule == 1" type="success" effect="plain">价低者得</el-tag>
+                                  <el-tag v-if="scope.row.rule == 2" effect="plain" >价高者得</el-tag>
+                              </template>
+                            </el-table-column> -->
+                            <el-table-column prop="startTime" width="152" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="endTime" width="152" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="createTime" label="创建时间"  width="152" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+        <el-table-column label="操作" width="250" fixed="right" align="center">
+        <template slot-scope="scope">
+          <!-- <el-button type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == null" slot="reference" type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button v-if="scope.row.tenderStatus == 1 && scope.row.status == 0" slot="reference" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">改标</el-button> -->
+          <el-button  slot="reference" type="text" :disabled="scope.row.status !=3" icon="el-icon-plus" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button  slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">查看更多</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getTenderRawList } from '@/api/tender'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: [],
+      SelectionList:[],
+      goodsName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: 1,
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      startTime:"",
+      endTime:"",
+        // dialogTableVisible:false
+    }
+  },
+  created() {
+    // this.getTenantList()
+    console.log('res')
+  },
+  methods: {
+      handleAdd(row){
+      this.$emit("onAdd",row)
+    },
+      handleView(row){
+          console.log("我被点击了")
+            this.$emit('change',row)
+        //   this.$parent.dialogTableVisible = true
+      },
+    parseTime,
+    getTenantList: function() {
+      this.loading = true
+      const params = new URLSearchParams()
+      params.append('tenderParentId', this.tenderParentId)
+      params.append('breeds', this.goodsName)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      getTenderRawList(params).then(response => {
+        console.log(response)
+        this.loading = false
+          let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+           if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于结束时间,待处理")
+          }
+          return res
+        })
+
+   
+        this.tableData = data
+        console.log('1' + response.data.data.records)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = 1
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+
+</style>
+

+ 887 - 0
src/views/tender/tender2/tender.vue

@@ -0,0 +1,887 @@
+<template>
+    <div>
+          <el-dialog :append-to-body="true" fullscreen :visible.sync="viewDialog" title="" center>
+                  <el-card class="box-card" shadow="nerver">
+                    <div slot="header" class="clearfix">
+                      <span class="topClass">基本信息</span>
+                    </div>
+
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                           标题 : <span class="flex_name"> {{bidInfo.tenderTitle}}</span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                           状态 : <span class="flex_name"> <el-tag effect="plain" v-if="bidInfo.status ==1">进行中</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==2" type="info">已结束</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==3" type="danger">已作废</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==4" type="warning">未开始</el-tag>
+                                </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         招标类型 :  <span class="flex_name"><el-tag v-if="bidInfo.tenderType == 1"  >物流</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 2" >原料</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 3" >销售</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 4" >加工承揽</el-tag>
+                                    </span>
+                       </el-col>
+                    </el-row>
+                     <el-row type="flex" class="row-bg">
+                       <!-- <el-col :span="8" class="flex_text">
+                         招标规则 : <span class="flex_name">    <el-tag v-if="bidInfo.tenderRule == 1" type="success" effect="plain">价低者得</el-tag>
+          <el-tag v-if="bidInfo.tenderRule == 2" effect="plain" >价高者得</el-tag></span>
+                       </el-col> -->
+                         <el-col :span="8" class="flex_text">
+                         开始时间 : <span class="flex_name"> {{bidInfo.startTime}} </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         截止时间 :  <span class="flex_name">{{bidInfo.endTime}}
+                                    </span>
+                       </el-col>
+                       <el-col :span="8" class="flex_text">
+                            备注:<span class="flex_name">{{bidInfo.tenderRemark}}</span>
+                       </el-col>
+                    </el-row>
+                    <el-row type="flex" class="row-bg">
+                       
+                    </el-row>
+                  </el-card>
+                   <el-card class="box-card" shadow="nerver">
+                        <div slot="header" class="clearfix">
+                          <span class="topClass"> 所有标的</span>
+                        </div>
+                      <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
+                        <el-tab-pane label="标的详情" name="first">
+
+                          <div class="head-container" style="margin: 30px 0 10px 0;">
+                            <span style="fontSize:13px">品种</span>
+                              <el-input
+                                v-model="param.breeds"
+                                clearable
+                                placeholder="请输入产品名称"
+                                style="width: 200px;"
+                                size="small"
+                                class="filter-item"
+                                @keyup.enter.native="getParamFexd"
+                                @clear="getParamFexd"
+                              />
+                            <span style="fontSize:13px;marginLeft:20px">交付方式</span>
+                               <el-select v-model="param.deliveryMethod" style="width:200px;" size="small"  @keyup.enter.native="getParamFexd" @clear="getParamFexd" clearable filterable placeholder="请选择交付方式">
+                                  <el-option
+                                    v-for="item in deliveryMethod"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id"
+                                  />
+                                </el-select>
+                            <span style="fontSize:13px;marginLeft:20px">等级</span>
+                              <el-select v-model="param.level" size="small" style="width: 200px;"  @keyup.enter.native="getParamFexd" @clear="getParamFexd" clearable filterable placeholder="请选择等级">
+                                  <el-option
+                                    v-for="item in level"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id"
+                                  />
+                                </el-select>
+                            <span style="fontSize:13px;marginLeft:20px">发标时间</span>
+                              <el-date-picker
+                                v-model="applyDateStart"
+                                size="small"
+                                type="datetimerange"
+                                style="width: 400px;"
+                                range-separator="-"
+                                clearable
+                                value-format="yyyy-MM-dd HH:mm:ss"
+                                :default-time="['00:00:00', '23:59:59']"
+                                start-placeholder="开始日期"
+                                end-placeholder="结束日期"
+                              @change="onApplyDate"
+                              @clear="onApplyDate"
+                              />
+                              <div style="text-align: right;margin-right:40px">
+                                   <el-button class="filter-item" style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="getParamFexd">搜索</el-button>
+                              </div>
+                          <div style="height:20px"></div>
+                          <el-table center :data="Paramdata" :header-cell-style="{ background: '#f5f7fa', }" border v-loading="tableLoading" stripe style="width: 100%;">
+
+                            <!-- <el-table-column prop="rawTenderId" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="tenderRawCode" width="150" label="标的编码" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="breeds"   label="品种" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="number"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="unitPrice" width="100" label="单价(元/吨)" :show-overflow-tooltip="true" align="center" /> -->
+                              <el-table-column prop="deliveryMethod" width="100" label="交付方式" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.deliveryMethod == 1" type="success" effect="plain">自提</el-tag>
+                                  <el-tag v-if="scope.row.deliveryMethod == 2" effect="plain" >送货到厂</el-tag>
+                              </template>
+                            </el-table-column>
+                              <el-table-column prop="deliveryMethod" label="等级" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.level == 5" >二级</el-tag>
+                                  <el-tag v-if="scope.row.level == 6" >三级</el-tag>
+                              </template>
+                            </el-table-column>
+                             <!-- <el-table-column prop="appendix" label="回执" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link v-if="scope.row.receiptPathUrl" :href="'http://view.officeapps.live.com/op/view.aspx?src='+scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 查看</el-link>
+                                </template>
+                              </el-table-column> -->
+
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                             <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                            </template>
+                          </el-table-column>
+                          <el-table-column prop="tenderLogisticsRule" label="中标规则" width="100" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.rule == 1" type="success" effect="plain">价低者得</el-tag>
+                                  <el-tag v-if="scope.row.rule == 2" effect="plain" >价高者得</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="startTime" width="152" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="endTime" width="152" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="createTime" label="创建时间"  width="152" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column label="操作" width="150" align="center" fixed="right">
+                                <template slot-scope="scope">
+                                  <el-button  slot="reference" type="text" :disabled="scope.row.status !=3" icon="el-icon-plus" @click="handleAdd(scope.row)">投标</el-button>
+                                </template>
+                              </el-table-column>
+                          </el-table>
+                          <div class="pagination">
+                            <el-pagination
+                              :current-page.sync="param.current"
+                              :page-size="param.size"
+                              layout="total, sizes, prev, pager, next, jumper"
+                              :total="total1"
+                              :page-sizes="[10, 20, 30, 50]"
+                              background
+                              @size-change="handleSizeChangeParam"
+                              @current-change="handleCurrentChangeParam"
+                            />
+                          </div>
+                  <!-- <div style="height:60px"></div> -->
+                    </div>
+
+                </el-tab-pane>
+                <el-tab-pane label="投标详情" name="second">
+                   <!-- <el-card class="box-card" shadow="nerver"> -->
+                      <!-- <div slot="header" class="clearfix">
+                        <span class="topClass">投标详情</span>
+                      </div> -->
+                              <ckTable ref="ckTable" @change="costPlannedAmountChange($event)" @onAdd="changeAdd($event)"></ckTable>
+                   <!-- </el-card> -->
+                </el-tab-pane>
+              </el-tabs>
+             
+                      </el-card>
+          <el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '投标' : '修标'" width="50%">
+                      <el-form ref="form" :model="form" :rules="rules1" label-width="80px">
+                       <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="品种">
+                              <el-tag>{{form.breeds}}</el-tag>
+                            </el-form-item>
+                              </el-col>
+                              <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                                  <el-form-item label="产品编码">
+                                    <el-tag>{{form.tenderRawCode}}</el-tag>
+                                  </el-form-item>
+                              </el-col>
+                        </el-row>
+
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="数量" prop="quantity">
+                              <el-input v-model="form.quantity" readonly style="width: 80%;" placeholder="数量"><template slot="append">(吨)</template></el-input>
+                           <!-- <span style="fontSize:16px" effect="plain">{{form.quantity}} (吨)</span> -->
+                            <!-- <el-input v-model="form.quantity" style="width: 80%;" placeholder="请输入数量"></el-input> -->
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="投标价格" prop="biddingPrice">
+                              <el-input v-model="form.biddingPrice" style="width: 80%;" placeholder="请输入金额"><template slot="append">(吨/元)</template></el-input>
+                              <!-- <el-input v-model="form.logisticsBiddingPrice" @input="onlogistiicsPrice" style="width: 80%;" placeholder="请输入金额"><template slot="append">(吨/元)</template></el-input> -->
+                              <!-- <div style="color:#909399;fontSize:15px"> * <span style="color:#909399;fontSize:13px;position: relative;top:-5px">最大价格 {{form.transportUnitPrice}} </span> </div> -->
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                            <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="合计" prop="quantity">
+                              <el-input  :value="form.biddingPrice ? (form.quantity *form.biddingPrice).toFixed(4) : 0" readonly style="width: 80%;" placeholder="请输入金额"><template slot="append">(元)</template></el-input>
+                           <!-- <span style="fontSize:16px"  effect="plain">{{}} (吨/元)</span> -->
+                           <!-- <el-tag  style="fontSize:14px"  effect="plain">{{form.logisticsBiddingPrice=="NAN" ? (form.quantity *form.logisticsBiddingPrice).toFixed(4) : 0}} (吨/元)</el-tag> -->
+                            <!-- <el-input v-model="form.quantity" style="width: 80%;" placeholder="请输入数量"></el-input> -->
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                               <el-form-item label="价格条款" prop="priceProvision">
+                              <el-select v-model="form.priceProvision" style="width: 80%;"  filterable placeholder="请选择价格条款">
+                                  <el-option
+                                    v-for="item in priceProvision"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id"
+                                  />
+                                </el-select>
+                            </el-form-item>
+                 
+                          </el-col>
+                        </el-row>
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="发票税率" prop="invoiceRate">
+                              <el-input v-model="form.invoiceRate"  style="width: 80%;" placeholder="发票税率"><template slot="append">%</template></el-input>
+                           <!-- <span style="fontSize:16px" effect="plain">{{form.quantity}} (吨)</span> -->
+                            <!-- <el-input v-model="form.quantity" style="width: 80%;" placeholder="请输入数量"></el-input> -->
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="发票种类" prop="invoiceType">
+                              <el-select v-model="form.invoiceType" style="width: 80%;"  filterable placeholder="请选择发票种类">
+                                  <el-option
+                                    v-for="item in invoiceType"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id"
+                                  />
+                                </el-select>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+                        
+                         <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="生产日期" prop="dateManufacture">
+                              <el-date-picker
+                                  style="width: 80%;"
+                                   value-format="yyyy-MM-dd"
+                                  v-model="form.dateManufacture"
+                                  type="date"
+                                  placeholder="选择日期">
+                                </el-date-picker>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="交货日期" >
+                               <el-date-picker
+                                  v-model="deliveryDate"
+                                  :clearable="false"
+                                  type="daterange"
+                                  style="width: 80%;"
+                                  range-separator="-"
+                                  value-format="yyyy-MM-dd"
+                                  start-placeholder="开始日期"
+                                  end-placeholder="结束日期"
+                                @change="ondeliveryDate"
+                                 placeholder="选择日期"
+                                />
+                              </el-form-item>
+                          </el-col>
+                         </el-row>
+
+
+
+                        
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="交货地点" prop="deliveryLocation">
+                                <el-input v-model="form.deliveryLocation" style="width: 80%;" placeholder="请输入交货地点"></el-input>
+                              </el-form-item>
+                           </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="联系电话" >
+                                <el-input v-model="form.phone" style="width: 80%;" maxlength="11" placeholder="请输入联系电话"></el-input>
+                              </el-form-item>
+                        </el-col>
+                        </el-row>
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                                      <el-form-item label="上传凭证" >
+                              <el-upload
+                                  class="upload-demo"
+                                  :limit="1"
+                                  :on-preview="handlePreview"
+                                  :on-change="handleChange"
+                                  :on-remove="handleRemove"
+                                  :before-remove="beforeRemove"
+                                  :on-exceed="handleExceed"
+                                  :action="BASE_API+'/common/bidding/voucher'"
+                                  name="multipartFile"
+                                  list-type="text"
+                                  :file-list="fileList"
+                                  multiple
+                                >
+                                    <el-button class="el-icon-upload" >上传凭证</el-button>
+                                </el-upload>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="备注" prop="biddingLogisticsRemark">
+                                <el-input
+                                  v-model="form.remark"
+                                  type="textarea"
+                                  style="width: 93%;"
+                                  :autosize="{ minRows: 2, maxRows: 10}"
+                                  maxlength="500"
+                                  show-word-limit
+                                  placeholder="请输入内容"
+                                />
+                              </el-form-item>
+                          </el-col>
+                        </el-row>
+                      </el-form>
+                      <div slot="footer" class="dialog-footer">
+                        <el-button @click="dialog = false">取消</el-button>
+                        <el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
+                      </div>
+                    </el-dialog>
+            
+                   <div slot="footer" class="paginationParam" style="paddingRight:">
+                    <!-- <el-button @click="viewDialog = false">取消</el-button> -->
+                    <el-button :loading="loading" type="primary" @click="viewDialog = false">返回</el-button>
+                  </div>
+
+                         <el-dialog :title="goodsName" width="90%" center :visible.sync="dialogTableVisible" append-to-body>
+                               <ckDialog ref="ckDialog"></ckDialog>
+                          </el-dialog>
+
+    </el-dialog>
+    </div>
+</template>
+
+<script>
+
+import {  getTenderRaw,getRawAdd } from '@/api/tender'
+import { Notification, MessageBox } from 'element-ui'
+
+import ckTable from './table.vue'
+import ckDialog from './dialog.vue'
+export default {
+   components:{
+    ckTable,
+    ckDialog
+  },
+  data() {
+    const checkTel = (rule, value, callback) => {
+      if (value == null) {
+        callback(new Error('请选择附件'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      form: {
+      },
+      data: [{}],
+      active:0,
+      deliveryDate:[],
+      BASE_API: process.env.BASE_API,
+      dialog: false,
+      loading: false,
+      delLoading: false,
+      tableLoading:false,
+      viewDialog: false,
+      isAdd: false,
+      currentPage: 1,
+      pageSize: 10,
+      total: 0, // 总数量
+      rules1:{
+        dateManufacture:[
+          { required: true, message: '生产日期不为空', trigger: 'blur' },
+        ],
+         deliveryStartTime:[
+          { required: true, message: '交货日期不为空', trigger: 'blur' },
+        ],
+         biddingPrice:[
+          { required: true, message: '投标价格不为空', trigger: 'blur' },
+        ],
+         deliveryLocation:[
+          { required: true, message: '交货地点不为空', trigger: 'blur' },
+        ],
+         invoiceRate:[
+          { required: true, message: '发票率不为空', trigger: 'blur' },
+        ],
+         invoiceType:[
+          { required: true, message: '发票种类不为空', trigger: 'blur' },
+        ],
+         priceProvision:[
+          { required: true, message: '价格条款不为空', trigger: 'blur' },
+        ],
+      },
+      rules: {
+
+        price: [
+          { required: true, message: '报价金额不为空', trigger: 'blur' },
+        ],
+        appendix: [
+          // { type:"array",required: true, message: '附件不为空', trigger: 'blur' },
+          { validator: checkTel, trigger: 'blur' }
+        ]
+      },
+      query: {
+        type: '',
+        value: '',
+         tenderRule:"",
+        tenderType:"",
+        startTime:"",
+        endTime:""
+      },
+      fileList: [],
+      param: {
+        current: 1,
+        size: 10
+      },
+      total1: 0,
+      Paramdata: [],
+      applyDateStart:[],
+      dialogTableData:[],
+       level:[
+        {id:5,name:"二级"},
+        {id:6,name:"三级"},
+
+      ],
+      deliveryMethod:[
+        {id:1,name:"自提"},
+        {id:2,name:"送货到厂"},
+      ],
+      packingWay:[],
+      transportMode:[
+        {id:1,name:"汽运"},
+        {id:2,name:"火车运输"},
+        {id:3,name:"船运"},
+        {id:4,name:"汽运/火车运输/船运"},
+        {id:5,name:"汽运/火车运输"},
+        {id:6,name:"汽运/船运"},
+      ],
+      priceProvision:[
+        {id:1,name:"港口平仓价"},
+        {id:2,name:"到厂价"},
+        {id:3,name:"自提价"},
+      ],
+      invoiceType:[
+        {id:1,name:"普票"},
+        {id:2,name:"专票"},
+      ],
+       activeName: 'first',
+       dialogTableVisible:false,
+       goodsName:"",
+       bidInfo:{}
+    }
+  },
+  created() {
+    // this.getDictData()
+  },
+  methods: {
+     changeAdd(row){
+      console.log(row)
+      this.handleAdd(row)
+    },
+    // 投标详情 向父元素传递数据
+    costPlannedAmountChange(val){
+      console.log(val)
+ 
+      this.dialogTableVisible = true
+      setTimeout(() => {
+        this.goodsName = val.goodsName
+       this.$refs.ckDialog.priceData = val
+      this.$refs.ckDialog.handleFind()
+        console.log(this.$refs.ckDialog)
+      }, 300);
+    },
+    // 价格投标不能大于合计
+    onlogistiicsPrice(val){
+      console.log(val)
+       if(val>this.form.transportUnitPrice){
+         this.form.logisticsBiddingPrice = this.form.transportUnitPrice
+         console.log("我是大于")
+       }
+       if(val.indexOf('.') !== -1 && val == '.'){
+         this.form.logisticsBiddingPrice =0
+       }
+       if(val== "+" || val== "-"){
+         this.form.logisticsBiddingPrice = 0
+       }
+       if(val<0){
+         this.form.logisticsBiddingPrice = 0
+       }
+    },
+    ondeliveryDate(){
+      console.log(this.deliveryDate)
+      this.form.deliveryStartTime = this.deliveryDate[0]
+      this.form.deliveryEndTime = this.deliveryDate[1]
+    },
+    onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.param.startTime =this.applyDateStart[0]
+              this.param.endTime = this.applyDateStart[1]
+            }else{
+              this.param.startTime =""
+              this.param.endTime =""
+            }
+
+      this.getParamFexd()
+    },
+    next() {
+      console.log(this.$refs.ckTable)
+        if (this.active++ > 2) this.active = 0;
+        this.dialogTableData = this.$refs.ckTable.SelectionList
+      },
+      handleSelectionChange(row){
+        
+      },
+    // 获取详情
+    getDictData: function() {
+      this.loading = true
+        const params = new URLSearchParams()
+      params.append('current', this.currentPage)
+      params.append('size', this.pageSize)
+      params.append('tenderType', this.query.tenderType)
+      params.append('tenderTitle', this.query.value)
+      params.append('tenderRule', this.query.tenderRule)
+      params.append('startTime',this.query.startTime )
+      params.append('endTime', this.query.endTime)
+
+      getTableList(params).then(res => {
+          console.log(res)
+        // this.data = res.data.data.records
+        let data = res.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于结束时间,已结束")
+          }
+
+          return res
+        })
+        this.data = data
+        this.total = res.data.data.total
+        this.loading = false
+      })
+    },
+
+    // 搜索
+    handleFind: function() {
+      this.currentPage = 1
+      this.getDictData()
+    },
+
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.voucherFile = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+          this.form.voucherFile = file.response.data.filePath
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+          this.fileList = []
+        }
+      }
+    },
+    // 点击文件列表中已上传的文件时的钩子
+    handlePreview(file) {
+      console.log(file, 'file1')
+      // window.location.href = file.url
+    },
+    handleExceed(files, fileList) {
+      this.$message.warning(`当前限制选择 1 个附件,本次选择了 ${files.length} 个文件`)
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${file.name}?`)
+    },
+    // 下载
+    onLoad(row) {
+      // const params = new URLSearchParams()
+      // params.append('path', row)
+      const a = document.createElement('a')
+      // a.href= /bidding/load
+      const url = window.location.origin + process.env.BASE_API + '/bidding/load?path=' + encodeURIComponent(row)
+      a.href = url
+      a.click()
+    },
+
+    // 字典名称提交动作
+    doSubmit() {
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          if (this.isAdd) {
+            // 新增字典
+            console.log(this.form)
+            this.loading = true
+            getRawAdd(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.loading = false
+              this.getDictData()
+              this.$refs['form'].resetFields()
+            }).catch(err => {
+              this.loading = false
+            })
+          } else {
+            // 更新字典
+            getQueryEdit(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.getDictData()
+            })
+          }
+        }
+      })
+    },
+    // 添加字典
+    handleAdd: function(row) {
+      this.dialog = true
+      this.isAdd = true
+      this.form = {}
+      this.fileList = []
+      this.deliveryDate = []
+      this.form.breeds = row.breeds
+      this.form.tenderRawCode = row.tenderRawCode
+      this.form.rawTenderId = row.rawTenderId
+      this.form.tenderParentId = this.param.tenderParentId
+      this.form.quantity = row.number
+      
+
+      // this.form.goodsName = row.goodsName
+      // this.form.transportUnitPrice = row.transportUnitPrice
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+    },
+    // 编辑字典
+    handleEdit: function(row) {
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+      this.dialog = true
+      this.isAdd = false
+      this.form = row.bidding
+      this.form.priceQuotes = row.priceQuotes
+      if (this.form.appendix) {
+        let name = this.form.appendix.split('bidding/')
+        name = name.pop()
+        // let name = data.appendix.replace(/(.*\/)*([^.]+).*/ig, "$2");
+        this.fileList = [{ name: name, url: this.form.appendix }]
+      }
+    },
+    handleClick(row,val){
+      console.log(row,val)
+      if(row.name == "second"){
+       this.$refs.ckTable.tenderParentId = this.param.tenderParentId
+        this.$refs.ckTable.goodsName = ""
+        this.$refs.ckTable.handleFind()
+      }
+    },
+
+    // 所有标的搜索
+    getParamFexd(){
+      this.param.current = 1
+      this.getParam()
+    },
+    // 所有标的列表数据
+    getParam() {
+      const data = this.param
+      this.tableLoading = true
+      getTenderRaw(data).then((res) => {
+       console.log(this.bidInfo, 'bidInfo')
+        let data = res.data.data.records
+         data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于结束时间,待处理")
+          }
+
+          return res
+        })
+        this.Paramdata = data
+        this.tableLoading = false
+        this.total1 = res.data.data.total
+      })
+    },
+
+    // 换页
+    handleCurrentChange: function(val) {
+      this.currentPage = val
+      this.getDictData()
+    },
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.getDictData()
+    },
+    handleCurrentChangeParam(val) {
+      this.param.current = val
+      this.getParam()
+    },
+    handleSizeChangeParam(val) {
+      this.param.size = val
+      this.getParam()
+    }
+  }
+}
+</script>
+<style scoped lang="scss">
+/* 去掉上传附件时候的过度效果 */
+  ::v-deep .el-upload-list__item{transition: none !important;}
+  ::v-deep .el-textarea__inner{
+  padding-bottom: 36px;
+}
+.btn_fixed{
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  padding: 15px 50px;
+  width: 100%;
+  text-align: right;
+  background: #f5f5f5;
+
+}
+.ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+.paginationParam{
+  // position: fixed;
+  // bottom: 50px;
+  bottom: 0;
+  left: 0;
+  line-height: 80px;
+  width: 100%;
+  // left: 45%;
+  // text-align: right;
+  z-index: 999;
+  background: #fff;
+}
+/deep/ .el-tabs__item{
+  font-size: 16px !important;
+  // padding: 35px  ;
+}
+.el-card {
+  border: 0px solid #fff;
+}
+.clearfix {
+    line-height: 20px;
+    font-size: 18px;
+    font-weight: 600;
+    color: #409EFF;
+}
+/deep/.el-dialog.is-fullscreen {
+
+    background-color: #f5f7f9;
+}
+.box-card{
+  margin-bottom: 20px;
+  .row-bg{
+  padding: 15px 40px 0 40px;
+  .flex_text{
+    line-height: 50px;
+    color: #8C8C8C;
+    font-size: 14px;
+    // border:1px solid red;
+    // font-weight: 600;
+  }
+  .flex_name{
+    font-size: 14px;
+    padding-left: 25px;
+    color: #575757;
+    font-weight: 550;
+  }
+}
+}
+/deep/ .el-card__body{
+  padding: 20px 0;
+}
+/deep/.el-tabs__nav-wrap::after {
+
+    background-color: #dfe4ed00;  
+}
+/deep/ .el-dialog--center .el-dialog__body {
+    text-align: initial;
+    padding: 25px 25px 0px 30px;
+}
+
+/deep/ .el-tabs--border-card{
+  // border-top:1px ;
+  border-bottom: 0px;
+
+ box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.5)
+}
+
+</style>
+

+ 314 - 0
src/views/tender/tender3/dialog.vue

@@ -0,0 +1,314 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+        <el-table-column prop="processingCode" width="150" label="标的编码" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="comesFrom"   label="产地" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="breeds"   label="品种" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="level"   label="等级" :show-overflow-tooltip="true" align="center" />
+
+            <el-table-column label="状态" align="center" width="100">
+            <template slot-scope="scope">
+              <el-tag effect="plain" v-if="scope.row.biddingStatus == 5">已投递</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==6" type="info">审核中</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==7" type="warning">已中标</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==8" type="danger">未中标</el-tag>
+            <el-tag effect="plain" v-if="scope.row.biddingStatus ==9" type="danger">已作废</el-tag>
+            </template>
+          </el-table-column>
+            <el-table-column prop="storageAssistFee" width="100" label="出库辅助费" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="rentalFee"  label="租赁费" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="processFee"  label="加工费" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="biddingPrice" width="100" label="投标价格" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="quantity"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="phone" width="152" label="联系电话" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="biddingTime" label="投标时间"  width="152" :show-overflow-tooltip="true" align="center" />
+            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+                  <el-table-column label="操作" width="250" fixed="right" align="center">
+          <template slot-scope="scope">
+             <el-upload
+                    :disabled="scope.row.biddingStatus !=7"
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :before-upload="beforeUpload"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/bidding/receipt/' + scope.row.tenderProcessingId +'/'+ priceData.tenderType"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                    accept=".zip"
+                  >
+                          <el-button @click="handleUpload" :disabled="scope.row.biddingStatus !=7" class="el-icon-upload2" size="small" type="text" style="width:90px;fontSize:14px ">上传回执</el-button>
+                  </el-upload>
+          </template>
+       </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+         current-page.sync="current"
+         :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getBiddingList,getCustomerName } from '@/api/bid'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: {},
+      SelectionList:[],
+      goodsName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      history:[
+        {id:0,name:"否"},
+        {id:1,name:"是"}
+      ],
+      historyValue:0,
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: 1,
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      userDataList:[],
+      startTime:"",
+      endTime:"",
+        isShow:true
+    }
+  },
+  created() {
+    this.onCustmerName()
+    console.log('res')
+  },
+  methods: {
+        // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 格式限制
+    beforeUpload(file){ 
+      
+      var testmsg = file.name.substring(file.name.lastIndexOf(".") + 1);
+     const extension = testmsg === "zip"
+     if (!extension ) {
+       this.$message({
+         message: "上传文件只能是.zip格式!",
+         type: "warning",
+       });
+     }
+
+     return extension;
+
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+           this.$message({
+              message: '回执上传成功',
+              type: 'success'
+            });
+          // this.form.fileUrl = file.response.data.filePath
+          // this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+        }
+      }
+    },
+    onCustmerName(){
+        getCustomerName().then((res)=>{
+            console.log(res)
+            this.userDataList = res.data.data
+        })
+    },
+      onshow(){
+          this.isShow = !this.isShow
+      },
+    parseTime,
+    getTenantList: function() {
+        console.log(this.priceData)
+      const params = new URLSearchParams()
+      params.append('tenderParentId', this.priceData.tenderParentId)
+      params.append('biddingProcessingId', this.priceData.tenderProcessingId)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      this.loading =true
+      getBiddingList(params).then(response => {
+        console.log(response)
+        this.loading = false
+         let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 投标时间
+          let startTime = this.priceData.endTime
+
+          const date = new Date(startTime)
+          const start = date.valueOf()         //开始时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          if(res.biddingStatus < 7){
+              console.log("我不满足")
+                if(time < start){
+                    res.biddingStatus = 5
+                    console.log("当前时间小于投标时间,已投递")
+                }else if(time > start){
+                    res.biddingStatus = 6
+                    console.log("当前时间小于投标时间,审核中")
+                }
+          }
+          return res
+        })
+        console.log(data)
+        this.tableData = data
+        console.log('1' + response.data.data.records)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = 1
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+.pagination{
+  padding-bottom: 30px;
+}
+</style>
+

+ 325 - 0
src/views/tender/tender3/table.vue

@@ -0,0 +1,325 @@
+<template>
+  <div class="" style="margin: 30px 0 10px 0;">
+    <!-- 查询和其他操作 -->
+    <div>
+      <span style="font-size:14px">品种:</span>
+      <el-input
+        v-model="productName"
+        clearable
+        placeholder="请输入品种"
+        style="width: 200px;margin-bottom:20px"
+        size="small"
+         @keyup.enter.native="handleFind"
+         @clear="handleFind"
+        class="filter-item"
+      />
+          <!-- <span style="fontSize:13px;marginLeft:20px">投标时间</span>
+            <el-date-picker
+              v-model="applyDateStart"
+              size="mini"
+              type="datetimerange"
+              style="width: 280px;"
+              range-separator="-"
+              clearable
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :default-time="['00:00:00', '23:59:59']"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+             @change="onApplyDate"
+             @clear="onApplyDate"
+            />
+ -->
+
+
+      <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
+      </el-button>
+    </div>
+
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+
+           <!-- <el-table-column prop="rawTenderId" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="processingCode" width="150" label="标的编码" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="warehouseNumber"   label="仓号" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="comesFrom"   label="产地" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="produceAge"  width="120" label="生产年限" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="breeds"   label="品种" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="level"   label="等级" :show-overflow-tooltip="true" align="center" />
+                             <!-- <el-table-column prop="appendix" label="回执" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link v-if="scope.row.receiptPathUrl" :href="'http://view.officeapps.live.com/op/view.aspx?src='+scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 查看</el-link>
+                                </template>
+                              </el-table-column> -->
+
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                             <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                            </template>
+                          </el-table-column>
+
+                          <!-- <el-table-column prop="processingIsTender" label="是否投标" width="100" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.processingIsTender == 0" type="success" effect="plain">是</el-tag>
+                                  <el-tag v-if="scope.row.processingIsTender == 1" effect="plain" >否</el-tag>
+                              </template>
+                            </el-table-column> -->
+                        
+                            <el-table-column prop="quantity"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="nearFutureWater"  label="近期水分%" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="nearFutureImpurity"  label="近期杂质%" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="riceRatio"  label="整精米率%" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="normalLeavingCapacity"  label="承储库日正常出库能力" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deliveryMethod" label="常用出库方式" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.retrievalWay == 1" >铁路</el-tag>
+                                  <el-tag v-if="scope.row.retrievalWay == 2" >公路</el-tag>
+                                  <el-tag v-if="scope.row.retrievalWay == 3" >水路</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="leavingCapacityForty" width="100" label="是否具备40吨以上大型运输车辆装车计量能力" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="specialRailwayLine" width="100" label="有无铁路专用线" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="storageFoggy" width="100" label="是否露天储存" :show-overflow-tooltip="true" align="center" />
+                             <el-table-column prop="deliveryMethod" label="储粮形态" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.storageForm == 1" >包装</el-tag>
+                                  <el-tag v-if="scope.row.storageForm == 2" >散装</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="sampleLookTime" label="看样日期" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="ifSoothSaveConfirmSample"  label="是否由实际存储库点确认看样单" :show-overflow-tooltip="true" align="center" />
+
+
+                            <el-table-column prop="startTime" width="152" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="endTime" width="152" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+        <el-table-column label="操作" width="250" fixed="right" align="center">
+        <template slot-scope="scope">
+
+          <el-button  slot="reference" type="text" :disabled="scope.row.status !=3" icon="el-icon-plus" @click="handleAdd(scope.row)">投标</el-button>
+          <el-button  slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">查看更多</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!--分页-->
+    <div class="pagination">
+      <el-pagination
+        :current-page="current"
+        :page-sizes="[1,10, 20, 30, 50]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+
+    </div>
+
+
+
+
+  </div>
+</template>
+
+<script>
+import { Listarea } from '@/api/dataForm'
+import { parseTime } from '@/utils/index'
+import { getTenderInfoList } from '@/api/tender'
+
+export default {
+  data() {
+    return {
+    //   size: 'small',
+      tableData: [],
+      priceData: [],
+      SelectionList:[],
+      productName: '',
+      tenderParentId: '',
+      applyDateStart:[],
+      customerType: [
+        { id: 1, name: '有限责任公司(自然人独资)' },
+        { id: 2, name: '有限责任公司(自然人投资或控股)' },
+        { id: 3, name: '股份有限公司' },
+        { id: 4, name: '有限合伙企业' },
+        { id: 5, name: '外商独资公司' },
+        { id: 6, name: '个人独资企业' },
+        { id: 7, name: '国有独资公司' },
+        { id: 8, name: '其他' }
+
+      ],
+      areaList: [],
+      query: {
+        goodsName: '',
+        tenderParentId:""
+      },
+      formLabelWidth: '90px',
+      isEditForm: false,
+      current: '1',
+      size: 10,
+      total: 0, // 总数量
+      dataForm: {
+      },
+
+      loading: false,
+      dialogVisible: false,
+      batchVisible:false,
+       BASE_API: process.env.BASE_API,
+       fileList: [],
+      roles:[],
+      startTime:"",
+      endTime:"",
+        // dialogTableVisible:false
+    }
+  },
+  created() {
+    // this.getTenantList()
+    console.log('res')
+  },
+  methods: {
+        handleAdd(row){
+      this.$emit("onAdd",row)
+    },
+      handleView(row){
+          console.log("我被点击了")
+            this.$emit('change',row)
+        //   this.$parent.dialogTableVisible = true
+      },
+    parseTime,
+    getTenantList: function() {
+      this.loading = true
+      const params = new URLSearchParams()
+      params.append('tenderParentId', this.tenderParentId)
+      params.append('breeds', this.productName)
+      params.append('current', this.current)
+      params.append('size', this.size)
+      getTenderInfoList(params).then(response => {
+        console.log(response)
+        this.loading = false
+          let data = response.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+          if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于投标结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于投标结束时间,待处理")
+          }
+          return res
+        })
+        this.tableData = data
+        console.log('1' + response.data.data.records)
+        this.total = response.data.data.total
+      })
+    },
+   onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.startTime =this.applyDateStart[0]
+              this.endTime = this.applyDateStart[1]
+            }else{
+              this.startTime =""
+              this.endTime =""
+            }
+
+      this.getTenantList()
+    },
+
+    handleFind: function() {
+      this.current = '1'
+      this.getTenantList()
+    },
+    handleSizeChange: function(val) {
+      this.size = val
+      this.getTenantList()
+    },
+    // 换页
+    handleCurrentChange: function(val) {
+      const page = val.toString()
+      this.current = page
+      this.getTenantList()
+    },
+    // 查看
+    // lookRecord:function(row){
+    //     this.lookCord=row
+    //     this.dialogVisible = true
+    //     console.log(row)
+    // },
+   handleOneChange(row,i){
+       console.log(row,i)
+       this.$refs.multipleTable.toggleRowSelection(row);
+   },
+    handleSelectionChange(row){
+        console.log(row)
+        this.SelectionList = row
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" >
+    .ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+   .el-dropdown-link {
+    cursor: pointer;
+    color: #1282f3;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-scrollbar__wrap {
+   overflow-y: hidden;
+}
+
+.el-card {
+  border: 0px solid #fff;
+  .topClass{
+    font-weight: 600;
+    font-size: 17px;
+  }
+}
+.el-icon-document{
+  font-size: 70px;
+  color:#409EFF;
+  line-height: 130px;
+}
+/deep/.el-card__body {
+  padding: 20px 10px 0 10px !important;
+}
+/deep/ .el-table__expanded-cell[class*=cell]{
+    padding: 0;
+}
+
+</style>
+

+ 876 - 0
src/views/tender/tender3/tender.vue

@@ -0,0 +1,876 @@
+<template>
+    <div>
+          <el-dialog :append-to-body="true" fullscreen :visible.sync="viewDialog" title="" center>
+                  <el-card class="box-card" shadow="nerver">
+                    <div slot="header" class="clearfix">
+                      <span class="topClass">基本信息</span>
+                    </div>
+
+                    <el-row type="flex" class="row-bg">
+                       <el-col :span="8" class="flex_text">
+                           标题 : <span class="flex_name"> {{bidInfo.tenderTitle}}</span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                           状态 : <span class="flex_name"> <el-tag effect="plain" v-if="bidInfo.status ==1">进行中</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==2" type="info">已结束</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==3" type="danger">已作废</el-tag>
+                                <el-tag effect="plain" v-if="bidInfo.status ==4" type="warning">未开始</el-tag>
+                                </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         招标类型 :  <span class="flex_name"><el-tag v-if="bidInfo.tenderType == 1"  >物流</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 2" >原料</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 3" >销售</el-tag>
+                                    <el-tag v-if="bidInfo.tenderType == 4" >加工承揽</el-tag>
+                                    </span>
+                       </el-col>
+                    </el-row>
+                     <el-row type="flex" class="row-bg">
+                       <!-- <el-col :span="8" class="flex_text">
+                         招标规则 : <span class="flex_name">    <el-tag v-if="bidInfo.tenderRule == 1" type="success" effect="plain">价低者得</el-tag>
+          <el-tag v-if="bidInfo.tenderRule == 2" effect="plain" >价高者得</el-tag></span>
+                       </el-col> -->
+                         <el-col :span="8" class="flex_text">
+                         开始时间 : <span class="flex_name"> {{bidInfo.startTime}} </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                         截止时间 :  <span class="flex_name">{{bidInfo.endTime}}
+                                    </span>
+                       </el-col>
+                         <el-col :span="8" class="flex_text">
+                            备注:<span class="flex_name">{{bidInfo.tenderRemark}}</span>
+                       </el-col>
+                    </el-row>
+                    <el-row type="flex" class="row-bg">
+                     
+                    </el-row>
+                  </el-card>
+                   <el-card class="box-card" shadow="nerver">
+                        <div slot="header" class="clearfix">
+                          <span class="topClass"> 所有标的</span>
+                        </div>
+                      <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
+                        <el-tab-pane label="标的详情" name="first">
+
+                          <div class="head-container" style="margin: 30px 0 10px 0;">
+                            <span style="fontSize:13px">品种</span>
+                              <el-input
+                                v-model="param.breeds"
+                                clearable
+                                placeholder="请输入产品名称"
+                                style="width: 200px;"
+                                size="small"
+                                class="filter-item"
+                                @keyup.enter.native="getParamFexd"
+                                @clear="getParamFexd"
+                              />
+                            <span style="fontSize:13px;marginLeft:20px">产地</span>
+                              <el-input
+                                v-model="param.comesFrom"
+                                clearable
+                                placeholder="请输入产品名称"
+                                style="width: 200px;"
+                                size="small"
+                                class="filter-item"
+                                @keyup.enter.native="getParamFexd"
+                                @clear="getParamFexd"
+                              />
+                            <!-- <span style="fontSize:13px;marginLeft:20px">交付方式</span>
+                               <el-select v-model="param.deliveryMethod" style="width:200px;" size="small"  @keyup.enter.native="getParamFexd" @clear="getParamFexd" clearable filterable placeholder="请选择交付方式">
+                                  <el-option
+                                    v-for="item in deliveryMethod"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id"
+                                  />
+                                </el-select>
+                            <span style="fontSize:13px;marginLeft:20px">等级</span>
+                              <el-select v-model="param.level" size="small" style="width: 200px;"  @keyup.enter.native="getParamFexd" @clear="getParamFexd" clearable filterable placeholder="请选择等级">
+                                  <el-option
+                                    v-for="item in level"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id"
+                                  />
+                                </el-select> -->
+                            <span style="fontSize:13px;marginLeft:20px">发标时间</span>
+                              <el-date-picker
+                                v-model="applyDateStart"
+                                size="small"
+                                type="datetimerange"
+                                style="width: 400px;"
+                                range-separator="-"
+                                clearable
+                                value-format="yyyy-MM-dd HH:mm:ss"
+                                :default-time="['00:00:00', '23:59:59']"
+                                start-placeholder="开始日期"
+                                end-placeholder="结束日期"
+                              @change="onApplyDate"
+                              @clear="onApplyDate"
+                              />
+                              <div style="text-align: right;margin-right:40px">
+                                   <el-button class="filter-item" style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="getParamFexd">搜索</el-button>
+                              </div>
+                          <div style="height:20px"></div>
+                          <el-table center :data="Paramdata" :header-cell-style="{ background: '#f5f7fa', }" border v-loading="tableLoading" stripe style="width: 100%;">
+
+                            <!-- <el-table-column prop="rawTenderId" width="150" fixed="left" label="标的编号" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="processingCode" width="150" label="标的编码" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="trustBuyLocation" width="160"  label="委托收购库点" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="concreteStorageLocation"  width="150"  label="实际存储库点" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="warehouseNumber"   label="仓号" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="comesFrom"   label="产地" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="produceAge"  width="120" label="生产年限" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="breeds"   label="品种" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="level"   label="等级" :show-overflow-tooltip="true" align="center" />
+                             <!-- <el-table-column prop="appendix" label="回执" align="center" width="100">
+                                <template slot-scope="scope">
+                                    <el-link v-if="scope.row.receiptPathUrl" :href="'http://view.officeapps.live.com/op/view.aspx?src='+scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 查看</el-link>
+                                </template>
+                              </el-table-column> -->
+
+                           <el-table-column label="状态" align="center" width="100">
+                            <template slot-scope="scope">
+                             <el-tag effect="plain" v-if="scope.row.status ==3">进行中</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==1" type="info">已结束</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==5" type="info">待处理</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==2" type="danger">已作废</el-tag>
+                              <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
+                            </template>
+                          </el-table-column>
+
+                          <!-- <el-table-column prop="processingIsTender" label="是否投标" width="100" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.processingIsTender == 0" type="success" effect="plain">是</el-tag>
+                                  <el-tag v-if="scope.row.processingIsTender == 1" effect="plain" >否</el-tag>
+                              </template>
+                            </el-table-column> -->
+                          <el-table-column prop="tenderLogisticsRule" label="中标规则" width="100" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.rule == 1" type="success" effect="plain">价低者得</el-tag>
+                                  <el-tag v-if="scope.row.rule == 2" effect="plain" >价高者得</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="quantity"  label="数量(吨)" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="nearFutureWater"  label="近期水分%" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="nearFutureImpurity"  label="近期杂质%" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="riceRatio"  label="整精米率%" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="normalLeavingCapacity"  label="承储库日正常出库能力" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="deliveryMethod" label="常用出库方式" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.retrievalWay == 1" >铁路</el-tag>
+                                  <el-tag v-if="scope.row.retrievalWay == 2" >公路</el-tag>
+                                  <el-tag v-if="scope.row.retrievalWay == 3" >水路</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="leavingCapacityForty" width="100" label="是否具备40吨以上大型运输车辆装车计量能力" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="specialRailwayLine" width="100" label="有无铁路专用线" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="storageFoggy" width="100" label="是否露天储存" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="distanceStation" width="100" label="距最近车站码头距离km" :show-overflow-tooltip="true" align="center" />
+                             <el-table-column prop="deliveryMethod" label="储粮形态" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.storageForm == 1" >包装</el-tag>
+                                  <el-tag v-if="scope.row.storageForm == 2" >散装</el-tag>
+                              </template>
+                            </el-table-column>
+                            <el-table-column prop="sampleLookTime" label="看样日期" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="ifSoothSaveConfirmSample"  label="是否由实际存储库点确认看样单" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="unitPrice" width="100" label="单价(元/吨)" :show-overflow-tooltip="true" align="center" />
+                              <el-table-column prop="deliveryMethod" width="100" label="交付方式" :show-overflow-tooltip="true" align="center" >
+                              <template slot-scope="scope">
+                                  <el-tag v-if="scope.row.deliveryMethod == 1" type="success" effect="plain">自提</el-tag>
+                                  <el-tag v-if="scope.row.deliveryMethod == 2" effect="plain" >送货到厂</el-tag>
+                              </template>
+                            </el-table-column> -->
+
+                            <el-table-column prop="startTime" width="152" label="投标起始时间" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column prop="endTime" width="152" label="投标结束时间" :show-overflow-tooltip="true" align="center" />
+                            <!-- <el-table-column prop="createTime" label="创建时间"  width="152" :show-overflow-tooltip="true" align="center" /> -->
+                            <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
+                            <el-table-column label="操作" width="150" align="center" fixed="right">
+                                <template slot-scope="scope">
+                                  <el-button  slot="reference" type="text" :disabled="scope.row.status !=3" icon="el-icon-plus" @click="handleAdd(scope.row)">投标</el-button>
+                                </template>
+                              </el-table-column>
+                          </el-table>
+                          <div class="pagination">
+                            <el-pagination
+                              :current-page.sync="param.current"
+                              :page-size="param.size"
+                              layout="total, sizes, prev, pager, next, jumper"
+                              :total="total1"
+                              :page-sizes="[10, 20, 30, 50]"
+                              background
+                              @size-change="handleSizeChangeParam"
+                              @current-change="handleCurrentChangeParam"
+                            />
+                          </div>
+                  <!-- <div style="height:60px"></div> -->
+                    </div>
+
+                </el-tab-pane>
+                <el-tab-pane label="投标详情" name="second">
+                   <!-- <el-card class="box-card" shadow="nerver"> -->
+                      <!-- <div slot="header" class="clearfix">
+                        <span class="topClass">投标详情</span>
+                      </div> -->
+                              <ckTable ref="ckTable" @change="costPlannedAmountChange($event)"  @onAdd="changeAdd($event)"></ckTable>
+                   <!-- </el-card> -->
+                </el-tab-pane>
+              </el-tabs>
+             
+                      </el-card>
+          <el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '投标' : '修标'" width="50%">
+                      <el-form ref="form" :model="form" :rules="rules1" label-width="95px">
+                          <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="品种">
+                                <el-tag>{{form.breeds}}</el-tag>
+                              </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="标的编码">
+                                <el-tag>{{form.processingCode}}</el-tag>
+                              </el-form-item>
+                          </el-col>
+                         </el-row>
+                       
+                        
+                         <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                            <el-form-item label="产地">
+                              <div>
+                              <el-input v-model="form.comesFrom" readonly style="width: 88%;" placeholder=""></el-input>
+                              </div>
+                            </el-form-item>
+                          </el-col>
+
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="数量" >
+                                <el-input v-model="form.quantity" readonly style="width: 80%;" placeholder=""></el-input>
+                              </el-form-item>
+                          </el-col>
+                         </el-row>
+
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                           <el-form-item label="加工费" prop="processFee">
+                              <div class="typeNumber">
+                                <el-input v-model.number="form.processFee" type="number" style="width: 88%;" @blur="(form.processFee <= 0) ? form.processFee='' : form.processFee" placeholder="请输入加工费"><template slot="append">(元)</template></el-input>
+                              </div>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                           <el-form-item label="租赁费" prop="rentalFee">
+                              <div class="typeNumber">
+                                <el-input v-model.number="form.rentalFee" type="number" style="width: 80%;"  @blur="(form.rentalFee <= 0) ? form.rentalFee='' : form.rentalFee" placeholder="请输入租赁费"><template slot="append">(元)</template></el-input>
+                              </div>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                            <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="出库辅助费" prop="storageAssistFee">
+                            <div class="typeNumber">
+                            <el-input v-model.number="form.storageAssistFee" type="number" style="width: 88%;"  placeholder="请输入出库辅助费"><template slot="append">(元)</template></el-input>
+                            </div>
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="合计" prop="quantity">
+                               <el-input  :value="form.rentalFee && form.processFee ? ((form.rentalFee + form.storageAssistFee + form.processFee) * form.quantity).toFixed(4) : 0" readonly style="width: 80%;" placeholder="请输入金额"><template slot="append">(元)</template></el-input>
+                               </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                          <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <el-form-item label="联系电话" >
+                            <el-input v-model="form.phone" style="width: 88%;" maxlength="11" placeholder="请输入联系电话"></el-input>
+                          </el-form-item>
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                              <el-form-item label="上传凭证" >
+                              <el-upload
+                                  class="upload-demo"
+                                  :limit="1"
+                                  :on-preview="handlePreview"
+                                  :on-change="handleChange"
+                                  :on-remove="handleRemove"
+                                  :before-remove="beforeRemove"
+                                  :on-exceed="handleExceed"
+                                  :action="BASE_API+'/common/bidding/voucher'"
+                                  name="multipartFile"
+                                  list-type="text"
+                                  :file-list="fileList"
+                                  multiple
+                                >
+                                    <el-button class="el-icon-upload" >上传凭证</el-button>
+                                </el-upload>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                        <el-row :gutter="20">
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                          <!-- <el-form-item label="联系电话" >
+                            <el-input v-model="form.phone" style="width: 80%;" maxlength="11" placeholder="请输入联系电话"></el-input>
+                          </el-form-item> -->
+                          </el-col>
+                          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="12">
+                             <el-form-item label="备注" prop="biddingLogisticsRemark">
+                                <el-input
+                                  v-model="form.remark"
+                                  type="textarea"
+                                  style="width: 88%;"
+                                  :autosize="{ minRows: 2, maxRows: 10}"
+                                  maxlength="500"
+                                  show-word-limit
+                                  placeholder="请输入内容"
+                                />
+                              </el-form-item>
+                          </el-col>
+                        </el-row>
+                      </el-form>
+                      <div slot="footer" class="dialog-footer">
+                        <el-button @click="dialog = false">取消</el-button>
+                        <el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
+                      </div>
+                    </el-dialog>
+            
+                   <div slot="footer" class="paginationParam" style="paddingRight:">
+                    <!-- <el-button @click="viewDialog = false">取消</el-button> -->
+                    <el-button :loading="loading" type="primary" @click="viewDialog = false">返回</el-button>
+                  </div>
+
+                         <el-dialog :title="goodsName" width="90%" center :visible.sync="dialogTableVisible" append-to-body>
+                               <ckDialog ref="ckDialog"></ckDialog>
+                          </el-dialog>
+
+    </el-dialog>
+    </div>
+</template>
+
+<script>
+
+import {  getTenderProcessing,getBiddingAdd } from '@/api/tender'
+import { Notification, MessageBox } from 'element-ui'
+
+import ckTable from './table.vue'
+import ckDialog from './dialog.vue'
+export default {
+   components:{
+    ckTable,
+    ckDialog
+  },
+  data() {
+    const checkTel = (rule, value, callback) => {
+      if (value == null) {
+        callback(new Error('请选择附件'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      form: {
+      },
+      data: [{}],
+      active:0,
+      BASE_API: process.env.BASE_API,
+      dialog: false,
+      loading: false,
+      delLoading: false,
+      tableLoading:false,
+      viewDialog: false,
+      isAdd: false,
+      currentPage: 1,
+      pageSize: 10,
+      total: 0, // 总数量
+      rules1:{
+        processFee:[
+          { required: true, message: '加工费不能为空', trigger: 'blur' },
+        ],
+         rentalFee:[
+          { required: true, message: '租赁费不为空', trigger: 'blur' },
+        ],
+         storageAssistFee:[
+          { required: true, message: '出库辅助费不为空', trigger: 'blur' },
+        ],
+         packingWay:[
+          { required: true, message: '包装方式不为空', trigger: 'blur' },
+        ],
+         phone:[
+          { required: true, message: '联系电话不为空', trigger: 'blur' },
+        ],
+         transportMode:[
+          { required: true, message: '运输方式不为空', trigger: 'blur' },
+        ],
+      },
+      rules: {
+
+        price: [
+          { required: true, message: '报价金额不为空', trigger: 'blur' },
+        ],
+        appendix: [
+          // { type:"array",required: true, message: '附件不为空', trigger: 'blur' },
+          { validator: checkTel, trigger: 'blur' }
+        ]
+      },
+      query: {
+        type: '',
+        value: '',
+         tenderRule:"",
+        tenderType:"",
+        startTime:"",
+        endTime:""
+      },
+      fileList: [],
+      param: {
+        current: 1,
+        size: 10
+      },
+      total1: 0,
+      Paramdata: [],
+      applyDateStart:[],
+      dialogTableData:[],
+       level:[
+        {id:1,name:"二级"},
+        {id:2,name:"三级"},
+
+      ],
+      deliveryMethod:[
+        {id:1,name:"自提"},
+        {id:2,name:"送货到厂"},
+      ],
+      packingWay:[],
+      transportMode:[
+        {id:1,name:"汽运"},
+        {id:2,name:"火车运输"},
+        {id:3,name:"船运"},
+        {id:4,name:"汽运/火车运输/船运"},
+        {id:5,name:"汽运/火车运输"},
+        {id:6,name:"汽运/船运"},
+      ],
+       activeName: 'first',
+       dialogTableVisible:false,
+       goodsName:"",
+       bidInfo:{}
+    }
+  },
+  created() {
+    // this.getDictData()
+  },
+  methods: {
+    changeAdd(row){
+      console.log(row)
+      this.handleAdd(row)
+    },
+    // 投标详情 向父元素传递数据
+    costPlannedAmountChange(val){
+      console.log(val)
+ 
+      this.dialogTableVisible = true
+      setTimeout(() => {
+        this.goodsName = val.goodsName
+       this.$refs.ckDialog.priceData = val
+      this.$refs.ckDialog.handleFind()
+        console.log(this.$refs.ckDialog)
+      }, 300);
+    },
+    // 价格投标不能大于合计
+    onlogistiicsPrice(val){
+      console.log(val)
+       if(val>this.form.transportUnitPrice){
+         this.form.logisticsBiddingPrice = this.form.transportUnitPrice
+         console.log("我是大于")
+       }
+       if(val.indexOf('.') !== -1 && val == '.'){
+         this.form.logisticsBiddingPrice =0
+       }
+       if(val== "+" || val== "-"){
+         this.form.logisticsBiddingPrice = 0
+       }
+       if(val<0){
+         this.form.logisticsBiddingPrice = 0
+       }
+    },
+    onApplyDate(){
+      let startTime
+      let endTime
+            if(this.applyDateStart != null){
+              this.param.startTime =this.applyDateStart[0]
+              this.param.endTime = this.applyDateStart[1]
+            }else{
+              this.param.startTime =""
+              this.param.endTime =""
+            }
+
+      this.getParamFexd()
+    },
+    next() {
+      console.log(this.$refs.ckTable)
+        if (this.active++ > 2) this.active = 0;
+        this.dialogTableData = this.$refs.ckTable.SelectionList
+      },
+      handleSelectionChange(row){
+        
+      },
+    // 获取详情
+    getDictData: function() {
+      this.loading = true
+        const params = new URLSearchParams()
+      params.append('current', this.currentPage)
+      params.append('size', this.pageSize)
+      params.append('tenderType', this.query.tenderType)
+      params.append('tenderTitle', this.query.value)
+      params.append('tenderRule', this.query.tenderRule)
+      params.append('startTime',this.query.startTime )
+      params.append('endTime', this.query.endTime)
+
+      getTableList(params).then(res => {
+          console.log(res)
+        // this.data = res.data.data.records
+        let data = res.data.data.records
+        console.log(new Date().valueOf(),"当前时间")
+        data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.isInvalid == 2){
+             res.status = 3
+            console.log("作废了")
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 1
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 2
+            console.log("当前时间大于结束时间,已结束")
+          }
+
+          return res
+        })
+        this.data = data
+        this.total = res.data.data.total
+        this.loading = false
+      })
+    },
+
+    // 搜索
+    handleFind: function() {
+      this.currentPage = 1
+      this.getDictData()
+    },
+
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.voucherFile = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+          this.form.voucherFile = file.response.data.filePath
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+          this.fileList = []
+        }
+      }
+    },
+    // 点击文件列表中已上传的文件时的钩子
+    handlePreview(file) {
+      console.log(file, 'file1')
+      // window.location.href = file.url
+    },
+    handleExceed(files, fileList) {
+      this.$message.warning(`当前限制选择 1 个附件,本次选择了 ${files.length} 个文件`)
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${file.name}?`)
+    },
+    // 下载
+    onLoad(row) {
+      // const params = new URLSearchParams()
+      // params.append('path', row)
+      const a = document.createElement('a')
+      // a.href= /bidding/load
+      const url = window.location.origin + process.env.BASE_API + '/bidding/load?path=' + encodeURIComponent(row)
+      a.href = url
+      a.click()
+    },
+
+    // 字典名称提交动作
+    doSubmit() {
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          if (this.isAdd) {
+            // 新增字典
+            console.log(this.form)
+            this.loading = true
+            getBiddingAdd(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.loading = false
+              this.getDictData()
+              this.$refs['form'].resetFields()
+            }).catch(err => {
+              this.loading = false
+            })
+          } else {
+            // 更新字典
+            getQueryEdit(this.form).then((res) => {
+              if (res.data.code === 200) {
+                this.$message({ message: '操作成功', type: 'success' })
+              } else {
+                this.$message({ message: res.data.msg, type: 'error' })
+              }
+              this.dialog = false
+              this.getDictData()
+            })
+          }
+        }
+      })
+    },
+    // 添加字典
+    handleAdd: function(row) {
+      this.dialog = true
+      this.isAdd = true
+      this.form = {}
+      this.fileList = []
+      this.form.breeds = row.breeds
+      this.form.comesFrom = row.comesFrom
+      this.form.level = row.level
+      this.form.tenderParentId = this.param.tenderParentId
+      this.form.tenderProcessingId = row.tenderProcessingId
+      this.form.processingCode = row.processingCode
+      this.form.quantity = row.quantity
+      // 出库辅助费默认为0
+      this.$set(this.form, "storageAssistFee", 0)
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+    },
+    // 编辑字典
+    handleEdit: function(row) {
+      if (this.$refs['form']) {
+        this.$refs['form'].resetFields()
+      }
+      this.dialog = true
+      this.isAdd = false
+      this.form = row.bidding
+      this.form.priceQuotes = row.priceQuotes
+      if (this.form.appendix) {
+        let name = this.form.appendix.split('bidding/')
+        name = name.pop()
+        // let name = data.appendix.replace(/(.*\/)*([^.]+).*/ig, "$2");
+        this.fileList = [{ name: name, url: this.form.appendix }]
+      }
+    },
+    handleClick(row,val){
+      console.log(row,val)
+      if(row.name == "second"){
+       this.$refs.ckTable.tenderParentId = this.param.tenderParentId
+        this.$refs.ckTable.productName =""
+        this.$refs.ckTable.handleFind()
+      }
+    },
+
+    // 所有标的搜索
+    getParamFexd(){
+      this.param.current = 1
+      this.getParam()
+    },
+    // 所有标的列表数据
+    getParam() {
+      const data = this.param
+      this.tableLoading = true
+      getTenderProcessing(data).then((res) => {
+       console.log(this.bidInfo, 'bidInfo')
+        let data = res.data.data.records
+         data.map((res)=>{
+          // 开始时间
+          let startTime = res.startTime
+          // 投标结束时间
+          let endTime = res.endTime
+
+          const date = new Date(startTime)
+          const modify = new Date(endTime)
+
+          const start = date.valueOf()         //开始时间
+          const end = modify.valueOf()        //投标结束时间
+          const time = new Date().valueOf()   //当前时间
+          console.log(start,"start")
+          console.log(end,"end")
+         if(res.tenderStatus == 1 || res.tenderStatus == 2){
+             res.status = res.tenderStatus 
+            console.log("我的状态是:" + res.tenderStatus)
+          }else if(time < start){
+            res.status = 4
+            console.log("当前时间小于开始时间,未开始")
+          }else if(time > start && time < end){
+            res.status = 3
+            console.log("当前时间大于开始时间并且小于结束时间,进行中")
+          }else if(time > end){
+            res.status = 5
+            console.log("当前时间大于结束时间,待处理")
+          }
+
+          return res
+        })
+        this.Paramdata = data
+        this.tableLoading = false
+        this.total1 = res.data.data.total
+      })
+    },
+
+    // 换页
+    handleCurrentChange: function(val) {
+      this.currentPage = val
+      this.getDictData()
+    },
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.getDictData()
+    },
+    handleCurrentChangeParam(val) {
+      this.param.current = val
+      this.getParam()
+    },
+    handleSizeChangeParam(val) {
+      this.param.size = val
+      this.getParam()
+    }
+  }
+}
+</script>
+<style scoped lang="scss">
+/* 去掉上传附件时候的过度效果 */
+  ::v-deep .el-upload-list__item{transition: none !important;}
+  ::v-deep .el-textarea__inner{
+  padding-bottom: 36px;
+}
+.btn_fixed{
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  padding: 15px 50px;
+  width: 100%;
+  text-align: right;
+  background: #f5f5f5;
+
+}
+.ckTable{
+        width: 100%;
+        border: #eee;
+        text-align: center;
+        tr,td{
+        border: 0.5px solid#dfe6ec;
+        line-height: 23px;
+        }
+    }
+.paginationParam{
+  // position: fixed;
+  // bottom: 50px;
+  bottom: 0;
+  left: 0;
+  line-height: 80px;
+  width: 100%;
+  // left: 45%;
+  // text-align: right;
+  z-index: 999;
+  background: #fff;
+}
+/deep/ .el-tabs__item{
+  font-size: 16px !important;
+  // padding: 35px  ;
+}
+.el-card {
+  border: 0px solid #fff;
+}
+.clearfix {
+    line-height: 20px;
+    font-size: 18px;
+    font-weight: 600;
+    color: #409EFF;
+}
+/deep/.el-dialog.is-fullscreen {
+
+    background-color: #f5f7f9;
+}
+.box-card{
+  margin-bottom: 20px;
+  .row-bg{
+  padding: 15px 40px 0 40px;
+  .flex_text{
+    line-height: 50px;
+    color: #8C8C8C;
+    font-size: 14px;
+    // border:1px solid red;
+    // font-weight: 600;
+  }
+  .flex_name{
+    font-size: 14px;
+    padding-left: 25px;
+    color: #575757;
+    font-weight: 550;
+  }
+}
+}
+/deep/ .el-card__body{
+  padding: 20px 0;
+}
+/deep/.el-tabs__nav-wrap::after {
+
+    background-color: #dfe4ed00;  
+}
+/deep/ .el-dialog--center .el-dialog__body {
+    text-align: initial;
+    padding: 25px 25px 0px 30px;
+}
+
+/deep/ .el-tabs--border-card{
+  // border-top:1px ;
+  border-bottom: 0px;
+
+ box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.5)
+}
+
+
+
+// 去掉数字类型
+.typeNumber{
+/* 谷歌 */
+::v-deep input::-webkit-outer-spin-button,
+  ::v-deep input::-webkit-inner-spin-button {
+  -webkit-appearance: none !important;
+  }
+  ::v-deep input[type='number'] {
+  -moz-appearance: textfield !important;
+  }
+}
+</style>
+