table.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <template>
  2. <div class="" style="margin: 30px 0 10px 0;">
  3. <!-- 查询和其他操作 -->
  4. <div>
  5. <span style="font-size:14px">货物名称:</span>
  6. <el-input
  7. v-model="goodsName"
  8. clearable
  9. placeholder="请输入货物"
  10. style="width: 200px;margin-bottom:20px"
  11. size="small"
  12. @keyup.enter.native="handleFind"
  13. @clear="handleFind"
  14. class="filter-item"
  15. />
  16. <!-- <span style="fontSize:13px;marginLeft:20px">投标时间</span>
  17. <el-date-picker
  18. v-model="applyDateStart"
  19. size="mini"
  20. type="datetimerange"
  21. style="width: 280px;"
  22. range-separator="-"
  23. clearable
  24. value-format="yyyy-MM-dd HH:mm:ss"
  25. :default-time="['00:00:00', '23:59:59']"
  26. start-placeholder="开始日期"
  27. end-placeholder="结束日期"
  28. @change="onApplyDate"
  29. @clear="onApplyDate"
  30. />
  31. -->
  32. <el-button style=" width:90px; " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
  33. </el-button>
  34. </div>
  35. <el-table ref="multipleTable" v-loading="loading" :data="tableData" :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border >
  36. <!-- <el-table-column type="expand" prop="biddingLogisticsInfoList">
  37. <template slot-scope="props"> -->
  38. <!-- <div :key="index" style="background:rgb(245, 247, 250);padding:15px;margin:10px 0" v-if="isShow">
  39. <el-row type="flex" class="row-bg">
  40. <el-col :span="6">
  41. <div class="grid-content bg-purple-light" >运输方式:
  42. <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 1">陆运</span>
  43. <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 2">汽运</span>
  44. <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 3">火车运输</span>
  45. <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 4">船运</span>
  46. <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 5">汽运/火车运输/船运</span>
  47. <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 6">汽运/火车运输</span>
  48. <span v-if="props.row.biddingLogisticsInfoList[0].transportMode == 7">汽运/船运</span>
  49. </div>
  50. </el-col>
  51. <el-col :span="6"><div class="grid-content bg-purple">投标价格:{{props.row.biddingLogisticsInfoList[0].logisticsBiddingPrice}}</div></el-col>
  52. <el-col :span="6"><div class="grid-content bg-purple">数量:{{props.row.biddingLogisticsInfoList[0].quantity}}</div></el-col>
  53. <el-col :span="6"><div class="grid-content bg-purple">总价:{{props.row.biddingLogisticsInfoList[0].logisticsTotalPrice}}</div></el-col>
  54. <el-col :span="6"><div class="grid-content bg-purple">联系电话:{{props.row.biddingLogisticsInfoList[0].phone}}</div></el-col>
  55. </el-row>
  56. <el-row type="flex" class="row-bg" style="margin-top:15px">
  57. <el-col :span="6">
  58. <div class="grid-content bg-purple-light">包装方式:
  59. <span v-if="props.row.biddingLogisticsInfoList[0].packingWay == 1">散粮</span>
  60. <span v-if="props.row.biddingLogisticsInfoList[0].packingWay == 2">袋装</span>
  61. <span v-if="props.row.biddingLogisticsInfoList[0].packingWay == 3">散装</span>
  62. <span v-if="props.row.biddingLogisticsInfoList[0].packingWay == 4">集装箱</span>
  63. </div>
  64. </el-col>
  65. <el-col :span="6"><div class="grid-content bg-purple">始发车站:{{props.row.biddingLogisticsInfoList[0].departureStation}}</div></el-col>
  66. <el-col :span="6"><div class="grid-content bg-purple">目的车站:{{props.row.biddingLogisticsInfoList[0].destinationStation}}</div></el-col>
  67. <el-col :span="6">
  68. <div class="grid-content bg-purple-light"> 状态:
  69. <el-tag v-if="props.row.biddingLogisticsInfoList[0].logisticsBiddingStatus == 5">已投递</el-tag>
  70. <el-tag v-if="props.row.biddingLogisticsInfoList[0].logisticsBiddingStatus == 6">审核中</el-tag>
  71. <el-tag v-if="props.row.biddingLogisticsInfoList[0].logisticsBiddingStatus == 7">已中标</el-tag>
  72. <el-tag v-if="props.row.biddingLogisticsInfoList[0].logisticsBiddingStatus == 8">未中标</el-tag>
  73. </div>
  74. </el-col>
  75. <el-col :span="6"><div class="grid-content bg-purple">投标时间:{{props.row.biddingLogisticsInfoList[0].logisticsBiddingTime}}</div></el-col>
  76. </el-row>
  77. <el-row type="flex" class="row-bg" style="margin-top:15px">
  78. <el-col :span="6">
  79. <div class="grid-content bg-purple-light">备注:
  80. {{props.row.biddingLogisticsInfoList[0].logisticsRemark}}
  81. </div>
  82. </el-col>
  83. </el-row>
  84. </div> -->
  85. <!-- <div v-for="(item,index) in props.row.biddingLogisticsInfoList" :key="index" style="background:rgb(245, 247, 250);padding:15px;margin:10px 0" >
  86. <el-row type="flex" class="row-bg">
  87. <el-col :span="6">
  88. <div class="grid-content bg-purple-light" >运输方式:
  89. <span v-if="item.transportMode == 1">陆运</span>
  90. <span v-if="item.transportMode == 2">汽运</span>
  91. <span v-if="item.transportMode == 3">火车运输</span>
  92. <span v-if="item.transportMode == 4">船运</span>
  93. <span v-if="item.transportMode == 5">汽运/火车运输/船运</span>
  94. <span v-if="item.transportMode == 6">汽运/火车运输</span>
  95. <span v-if="item.transportMode == 7">汽运/船运</span>
  96. </div>
  97. </el-col>
  98. <el-col :span="6"><div class="grid-content bg-purple">投标价格:{{item.logisticsBiddingPrice}}</div></el-col>
  99. <el-col :span="6"><div class="grid-content bg-purple">数量:{{item.quantity}}</div></el-col>
  100. <el-col :span="6"><div class="grid-content bg-purple">总价:{{item.logisticsTotalPrice}}</div></el-col>
  101. <el-col :span="6"><div class="grid-content bg-purple">联系电话:{{item.phone}}</div></el-col>
  102. </el-row>
  103. <el-row type="flex" class="row-bg" style="margin-top:15px">
  104. <el-col :span="6">
  105. <div class="grid-content bg-purple-light">包装方式:
  106. <span v-if="item.packingWay == 1">散粮</span>
  107. <span v-if="item.packingWay == 2">袋装</span>
  108. <span v-if="item.packingWay == 3">散装</span>
  109. <span v-if="item.packingWay == 4">集装箱</span>
  110. </div>
  111. </el-col>
  112. <el-col :span="6"><div class="grid-content bg-purple">始发车站:{{item.departureStation}}</div></el-col>
  113. <el-col :span="6"><div class="grid-content bg-purple">目的车站:{{item.destinationStation}}</div></el-col>
  114. <el-col :span="6">
  115. <div class="grid-content bg-purple-light"> 状态:
  116. <el-tag v-if="item.logisticsBiddingStatus == 5">已投递</el-tag>
  117. <el-tag v-if="item.logisticsBiddingStatus == 6">审核中</el-tag>
  118. <el-tag v-if="item.logisticsBiddingStatus == 7">已中标</el-tag>
  119. <el-tag v-if="item.logisticsBiddingStatus == 8">未中标</el-tag>
  120. </div>
  121. </el-col>
  122. <el-col :span="6"><div class="grid-content bg-purple">投标时间:{{item.logisticsBiddingTime}}</div></el-col>
  123. </el-row>
  124. <el-row type="flex" class="row-bg" style="margin-top:15px">
  125. <el-col :span="6">
  126. <div class="grid-content bg-purple-light">备注:
  127. {{item.logisticsRemark}}
  128. </div>
  129. </el-col>
  130. </el-row>
  131. </div> -->
  132. <!-- <div @click="onshow">{{isShow ?"展开" : "收起"}}</div> -->
  133. <!-- </template>
  134. </el-table-column> -->
  135. <el-table-column label="货物" prop="goodsName" align="center" :show-overflow-tooltip="true">
  136. </el-table-column>
  137. <el-table-column label="数量(吨)" prop="goodsNumber" width="150" align="center" :show-overflow-tooltip="true">
  138. </el-table-column>
  139. <el-table-column label="始发地" prop="departureName" width="190" align="center" :show-overflow-tooltip="true">
  140. </el-table-column>
  141. <el-table-column label="目的地" prop="destinationName" width="150" align="center" :show-overflow-tooltip="true">
  142. </el-table-column>
  143. <el-table-column label="预估距离" prop="predictDistance" width="150" align="center" :show-overflow-tooltip="true">
  144. </el-table-column>
  145. <el-table-column label="单价" prop="transportUnitPrice" width="150" align="center" :show-overflow-tooltip="true">
  146. </el-table-column>
  147. <el-table-column label="保证金" prop="deposit" width="150" align="center" :show-overflow-tooltip="true">
  148. </el-table-column>
  149. <el-table-column label="状态" align="center" width="100">
  150. <template slot-scope="scope">
  151. <el-tag effect="plain" v-if="scope.row.status ==1">进行中</el-tag>
  152. <el-tag effect="plain" v-if="scope.row.status ==2" type="info">已结束</el-tag>
  153. <el-tag effect="plain" v-if="scope.row.status ==3" type="danger">已作废</el-tag>
  154. <el-tag effect="plain" v-if="scope.row.status ==4" type="warning">未开始</el-tag>
  155. </template>
  156. </el-table-column>
  157. <el-table-column prop="description" :show-overflow-tooltip="true" label="招标规则" width="100" align="center">
  158. <template slot-scope="scope">
  159. <el-tag v-if="scope.row.tenderLogisticsRule == 1" type="success" effect="plain">价低者得</el-tag>
  160. <el-tag v-if="scope.row.tenderLogisticsRule == 2" effect="plain" >价高者得</el-tag>
  161. </template>
  162. </el-table-column>
  163. <el-table-column label="投标开始时间" prop="startTime" width="150" align="center" :show-overflow-tooltip="true">
  164. </el-table-column>
  165. <el-table-column label="投标结束时间" prop="endTime" width="150" align="center" :show-overflow-tooltip="true">
  166. </el-table-column>
  167. <el-table-column label="投标备注" prop="logisticsRemark" width="150" align="center" :show-overflow-tooltip="true">
  168. </el-table-column>
  169. <el-table-column label="操作" width="150" fixed="right" align="center">
  170. <template slot-scope="scope">
  171. <!-- <el-button type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">投标</el-button>
  172. <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>
  173. <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> -->
  174. <el-button slot="reference" type="text" :disabled="scope.row.status !=1" icon="el-icon-plus" @click="handleAdd(scope.row)">投标</el-button>
  175. <el-button slot="reference" icon="el-icon-view" type="text" @click="handleView(scope.row)">查看更多</el-button>
  176. </template>
  177. </el-table-column>
  178. </el-table>
  179. <!--分页-->
  180. <div class="pagination">
  181. <el-pagination
  182. :popper-class="current"
  183. :page-sizes="[1,10, 20, 30, 50]"
  184. :page-size="size"
  185. layout="total, sizes, prev, pager, next, jumper"
  186. background
  187. :total="total"
  188. @size-change="handleSizeChange"
  189. @current-change="handleCurrentChange"
  190. />
  191. </div>
  192. </div>
  193. </template>
  194. <script>
  195. import { Listarea } from '@/api/dataForm'
  196. import { parseTime } from '@/utils/index'
  197. import { getLogisticsList } from '@/api/tender'
  198. export default {
  199. data() {
  200. return {
  201. // size: 'small',
  202. tableData: [],
  203. priceData: [],
  204. SelectionList:[],
  205. goodsName: '',
  206. tenderParentId: '',
  207. applyDateStart:[],
  208. customerType: [
  209. { id: 1, name: '有限责任公司(自然人独资)' },
  210. { id: 2, name: '有限责任公司(自然人投资或控股)' },
  211. { id: 3, name: '股份有限公司' },
  212. { id: 4, name: '有限合伙企业' },
  213. { id: 5, name: '外商独资公司' },
  214. { id: 6, name: '个人独资企业' },
  215. { id: 7, name: '国有独资公司' },
  216. { id: 8, name: '其他' }
  217. ],
  218. areaList: [],
  219. query: {
  220. goodsName: '',
  221. tenderParentId:""
  222. },
  223. formLabelWidth: '90px',
  224. isEditForm: false,
  225. current: '1',
  226. size: 10,
  227. total: 0, // 总数量
  228. dataForm: {
  229. },
  230. loading: false,
  231. dialogVisible: false,
  232. batchVisible:false,
  233. BASE_API: process.env.BASE_API,
  234. fileList: [],
  235. roles:[],
  236. startTime:"",
  237. endTime:"",
  238. // dialogTableVisible:false
  239. }
  240. },
  241. created() {
  242. // this.getTenantList()
  243. console.log('res')
  244. },
  245. methods: {
  246. handleView(row){
  247. console.log("我被点击了")
  248. this.$emit('change',row)
  249. // this.$parent.dialogTableVisible = true
  250. },
  251. parseTime,
  252. getTenantList: function() {
  253. this.loading = true
  254. const params = new URLSearchParams()
  255. params.append('tenderParentId', this.tenderParentId)
  256. params.append('goodsName', this.goodsName)
  257. params.append('startTime', this.startTime)
  258. params.append('endTime', this.endTime)
  259. params.append('current', this.current)
  260. params.append('size', this.size)
  261. getLogisticsList(params).then(response => {
  262. console.log(response)
  263. this.loading = false
  264. let data = response.data.data.records
  265. console.log(new Date().valueOf(),"当前时间")
  266. data.map((res)=>{
  267. // 开始时间
  268. let startTime = res.startTime
  269. // 结束时间
  270. let endTime = res.endTime
  271. const date = new Date(startTime)
  272. const modify = new Date(endTime)
  273. const start = date.valueOf() //开始时间
  274. const end = modify.valueOf() //结束时间
  275. const time = new Date().valueOf() //当前时间
  276. console.log(start,"start")
  277. console.log(end,"end")
  278. if(res.isInvalid == 2){
  279. res.status = 3
  280. console.log("作废了")
  281. }else if(time < start){
  282. res.status = 4
  283. console.log("当前时间小于开始时间,未开始")
  284. }else if(time > start && time < end){
  285. res.status = 1
  286. console.log("当前时间大于开始时间并且小于结束时间,进行中")
  287. }else if(time > end){
  288. res.status = 2
  289. console.log("当前时间大于结束时间,已结束")
  290. }
  291. return res
  292. })
  293. this.tableData = data
  294. console.log('1' + response.data.data.records)
  295. this.total = response.data.data.total
  296. })
  297. },
  298. onApplyDate(){
  299. let startTime
  300. let endTime
  301. if(this.applyDateStart != null){
  302. this.startTime =this.applyDateStart[0]
  303. this.endTime = this.applyDateStart[1]
  304. }else{
  305. this.startTime =""
  306. this.endTime =""
  307. }
  308. this.getTenantList()
  309. },
  310. handleFind: function() {
  311. this.current = '1'
  312. this.getTenantList()
  313. },
  314. handleSizeChange: function(val) {
  315. this.size = val
  316. this.getTenantList()
  317. },
  318. // 换页
  319. handleCurrentChange: function(val) {
  320. const page = val.toString()
  321. this.current = page
  322. this.getTenantList()
  323. },
  324. // 查看
  325. // lookRecord:function(row){
  326. // this.lookCord=row
  327. // this.dialogVisible = true
  328. // console.log(row)
  329. // },
  330. handleOneChange(row,i){
  331. console.log(row,i)
  332. this.$refs.multipleTable.toggleRowSelection(row);
  333. },
  334. handleSelectionChange(row){
  335. console.log(row)
  336. this.SelectionList = row
  337. }
  338. }
  339. }
  340. </script>
  341. <style scoped lang="scss" >
  342. .ckTable{
  343. width: 100%;
  344. border: #eee;
  345. text-align: center;
  346. tr,td{
  347. border: 0.5px solid#dfe6ec;
  348. line-height: 23px;
  349. }
  350. }
  351. .el-dropdown-link {
  352. cursor: pointer;
  353. color: #1282f3;
  354. }
  355. .el-icon-arrow-down {
  356. font-size: 12px;
  357. }
  358. .el-scrollbar__wrap {
  359. overflow-y: hidden;
  360. }
  361. .el-card {
  362. border: 0px solid #fff;
  363. .topClass{
  364. font-weight: 600;
  365. font-size: 17px;
  366. }
  367. }
  368. .el-icon-document{
  369. font-size: 70px;
  370. color:#409EFF;
  371. line-height: 130px;
  372. }
  373. /deep/.el-card__body {
  374. padding: 20px 10px 0 10px !important;
  375. }
  376. /deep/ .el-table__expanded-cell[class*=cell]{
  377. padding: 0;
  378. }
  379. </style>