dialog.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. <template>
  2. <div class="" style="margin: 30px 0 10px 0;">
  3. <!-- 查询和其他操作 -->
  4. <el-card class="box-card" shadow="nerver">
  5. <div slot="header" class="clearfix">
  6. <span class="topClass">基本信息</span>
  7. </div>
  8. <el-row type="flex" class="row-bg">
  9. <!-- <el-col :span="8" class="flex_text">
  10. 招标规则 : <span class="flex_name"> <el-tag v-if="bidInfo.tenderRule == 1" type="success" effect="plain">价低者得</el-tag>
  11. <el-tag v-if="bidInfo.tenderRule == 2" effect="plain" >价高者得</el-tag></span>
  12. </el-col> -->
  13. <el-col :span="8" class="flex_text">
  14. 标的编码 : <span class="flex_name"> {{priceData.processingCode}} </span>
  15. </el-col>
  16. <el-col :span="8" class="flex_text">
  17. 产地 : <span class="flex_name"> {{priceData.comesFrom}} </span>
  18. </el-col>
  19. <el-col :span="8" class="flex_text">
  20. 生产年限:<span class="flex_name">{{priceData.produceAge}}</span>
  21. </el-col>
  22. </el-row>
  23. <el-row type="flex" class="row-bg">
  24. <el-col :span="8" class="flex_text">
  25. 仓号:<span class="flex_name">{{priceData.warehouseNumber}}</span>
  26. </el-col>
  27. <el-col :span="8" class="flex_text">
  28. 品种 : <span class="flex_name">{{priceData.breeds}}
  29. </span>
  30. </el-col>
  31. <el-col :span="8" class="flex_text">
  32.    等级:<span class="flex_name">{{priceData.level}}</span>
  33. </el-col>
  34. </el-row>
  35. <el-row type="flex" class="row-bg">
  36. <el-col :span="8" class="flex_text">
  37. 数量(吨) : <span class="flex_name"> {{priceData.quantity}} </span>
  38. </el-col>
  39. <el-col :span="8" class="flex_text">
  40. </el-col>
  41. <el-col :span="8" class="flex_text">
  42. </el-col>
  43. </el-row>
  44. </el-card>
  45. <el-card class="box-card" shadow="nerver">
  46. <div slot="header" class="clearfix">
  47. <span class="topClass">投标详情</span>
  48. </div>
  49. <el-table ref="multipleTable" v-loading="loading" :data="tableData" :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border >
  50. <el-table-column prop="level" label="级别" :show-overflow-tooltip="true" align="center" >
  51. <template slot-scope="scope">
  52. <span v-if="scope.row.level ==1">一级</span>
  53. <span v-if="scope.row.level ==2">二级</span>
  54. <span v-if="scope.row.level ==3">三级</span>
  55. <span v-if="scope.row.level ==4">四级</span>
  56. </template>
  57. </el-table-column>
  58. <el-table-column label="状态" align="center" width="100">
  59. <template slot-scope="scope">
  60. <el-tag effect="plain" v-if="scope.row.biddingStatus == 5">已投递</el-tag>
  61. <el-tag effect="plain" v-if="scope.row.biddingStatus ==6" type="info">审核中</el-tag>
  62. <el-tag effect="plain" v-if="scope.row.biddingStatus ==7" type="warning">已中标</el-tag>
  63. <el-tag effect="plain" v-if="scope.row.biddingStatus ==8" type="danger">未中标</el-tag>
  64. <el-tag effect="plain" v-if="scope.row.biddingStatus ==9" type="danger">已作废</el-tag>
  65. </template>
  66. </el-table-column>
  67. <el-table-column prop="stocksRealStation" width="152" label="实际库存点" :show-overflow-tooltip="true" align="center" />
  68. <el-table-column prop="biddingNumber" label="投标数量(吨)" :show-overflow-tooltip="true" align="center" />
  69. <el-table-column prop="brownRiceRate" width="100" label="加工厂出糙率(%)" :show-overflow-tooltip="true" align="center" />
  70. <el-table-column prop="realPremiumComplex" label="实际贴水贴杂(个)" :show-overflow-tooltip="true" align="center" />
  71. <el-table-column prop="warehouseFactoryDistance" label="库点至加工厂的运距(KM)" :show-overflow-tooltip="true" align="center" />
  72. <el-table-column prop="warehouseFactoryPrice" width="100" label="库点至加工厂的短运费(元/吨)" :show-overflow-tooltip="true" align="center" />
  73. <el-table-column prop="ricePickupPrice" label="稻壳自提单价(元/吨)" :show-overflow-tooltip="true" align="center" />
  74. <el-table-column prop="cornProcurePrice" width="152" label="玉米采购价(元/吨)" :show-overflow-tooltip="true" align="center" />
  75. <el-table-column label="至鱼圈运费(包价元/吨)" align="center" >
  76. <el-table-column prop="stationPrice" width="102" label="上站费" :show-overflow-tooltip="true" align="center" />
  77. <el-table-column prop="stationUsePrice" width="102" label="站台使用费" :show-overflow-tooltip="true" align="center" />
  78. <el-table-column prop="freightPrice" width="102" label="运费" :show-overflow-tooltip="true" align="center" />
  79. <el-table-column prop="sumBiddingPrice" width="102" label="总费用" :show-overflow-tooltip="true" align="center" />
  80. <el-table-column prop="otherRemarks" width="152" label="其他" :show-overflow-tooltip="true" align="center" />
  81. </el-table-column>
  82. <el-table-column prop="phone" width="152" label="联系电话" :show-overflow-tooltip="true" align="center" />
  83. <el-table-column prop="processBiddingEnquiryTime" label="投标时间" width="152" :show-overflow-tooltip="true" align="center" />
  84. <el-table-column label="操作" width="250" fixed="right" align="center">
  85. <template slot-scope="scope">
  86. <el-upload
  87. :disabled="scope.row.biddingStatus !=7"
  88. class="upload-demo"
  89. :on-change="handleChange"
  90. :on-remove="handleRemove"
  91. :before-upload="beforeUpload"
  92. :show-file-list="false"
  93. name="multipartFile"
  94. style="display:inline-block"
  95. :action="BASE_API+'/common/bidding/receipt/' + scope.row.tenderProcessingId +'/'+ priceData.tenderType"
  96. list-type="text"
  97. :data="fileData"
  98. :file-list="fileList"
  99. multiple
  100. accept=".zip"
  101. >
  102. <el-button :disabled="scope.row.biddingStatus !=7" class="el-icon-upload2" size="small" type="text" style="width:90px;fontSize:14px ">上传回执</el-button>
  103. </el-upload>
  104. </template>
  105. </el-table-column>
  106. </el-table>
  107. <!--分页-->
  108. <div class="pagination">
  109. <el-pagination
  110. current-page.sync="current"
  111. :current-page="current"
  112. :page-sizes="[1,10, 20, 30, 50]"
  113. :page-size="size"
  114. layout="total, sizes, prev, pager, next, jumper"
  115. background
  116. :total="total"
  117. @size-change="handleSizeChange"
  118. @current-change="handleCurrentChange"
  119. />
  120. </div>
  121. </el-card>
  122. </div>
  123. </template>
  124. <script>
  125. import { Listarea } from '@/api/dataForm'
  126. import { parseTime } from '@/utils/index'
  127. import { getBiddingList1,getCustomerName } from '@/api/bid'
  128. export default {
  129. data() {
  130. return {
  131. // size: 'small',
  132. tableData: [],
  133. priceData: {},
  134. SelectionList:[],
  135. goodsName: '',
  136. tenderParentId: '',
  137. applyDateStart:[],
  138. customerType: [
  139. { id: 1, name: '有限责任公司(自然人独资)' },
  140. { id: 2, name: '有限责任公司(自然人投资或控股)' },
  141. { id: 3, name: '股份有限公司' },
  142. { id: 4, name: '有限合伙企业' },
  143. { id: 5, name: '外商独资公司' },
  144. { id: 6, name: '个人独资企业' },
  145. { id: 7, name: '国有独资公司' },
  146. { id: 8, name: '其他' }
  147. ],
  148. history:[
  149. {id:0,name:"否"},
  150. {id:1,name:"是"}
  151. ],
  152. historyValue:0,
  153. areaList: [],
  154. query: {
  155. goodsName: '',
  156. tenderParentId:""
  157. },
  158. formLabelWidth: '90px',
  159. isEditForm: false,
  160. current: 1,
  161. size: 10,
  162. total: 0, // 总数量
  163. dataForm: {
  164. },
  165. loading: false,
  166. dialogVisible: false,
  167. batchVisible:false,
  168. BASE_API: process.env.BASE_API,
  169. fileList: [],
  170. roles:[],
  171. userDataList:[],
  172. startTime:"",
  173. endTime:"",
  174. isShow:true
  175. }
  176. },
  177. created() {
  178. this.onCustmerName()
  179. console.log('res')
  180. },
  181. methods: {
  182. // 文件移除的时候
  183. handleRemove(file, fileList) {
  184. this.form.fileUrl = ''
  185. console.log(file, fileList, this.fileList, '移出')
  186. },
  187. // 格式限制
  188. beforeUpload(file){
  189. var testmsg = file.name.substring(file.name.lastIndexOf(".") + 1);
  190. const extension = testmsg === "zip"
  191. if (!extension ) {
  192. this.$message({
  193. message: "上传文件只能是.zip格式!",
  194. type: "warning",
  195. });
  196. }
  197. return extension;
  198. },
  199. // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
  200. handleChange(file, fileList) {
  201. console.log(file, fileList, '上传')
  202. if (file.response) {
  203. console.log(file.response, 'file')
  204. if (file.response.code == '200') {
  205. this.$message({
  206. message: '回执上传成功',
  207. type: 'success'
  208. });
  209. // this.form.fileUrl = file.response.data.filePath
  210. // this.form.tenderParentId = file.response.data.tenderParentId
  211. } else {
  212. Notification.error({
  213. title: file.response.msg,
  214. duration: 1000
  215. })
  216. }
  217. }
  218. },
  219. onCustmerName(){
  220. getCustomerName().then((res)=>{
  221. console.log(res)
  222. this.userDataList = res.data.data
  223. })
  224. },
  225. onshow(){
  226. this.isShow = !this.isShow
  227. },
  228. parseTime,
  229. getTenantList: function() {
  230. console.log(this.priceData)
  231. const params = new URLSearchParams()
  232. params.append('tenderParentId', this.priceData.tenderParentId)
  233. params.append('tenderProcessingId', this.priceData.tenderProcessingId)
  234. params.append('target', this.priceData.target)
  235. params.append('current', this.current)
  236. params.append('size', this.size)
  237. this.loading =true
  238. getBiddingList1(params).then(response => {
  239. console.log(response)
  240. this.loading = false
  241. let data = response.data.data.records
  242. console.log(new Date().valueOf(),"当前时间")
  243. data.map((res)=>{
  244. // 投标时间
  245. let startTime = this.priceData.endTime
  246. const date = new Date(startTime)
  247. const start = date.valueOf() //开始时间
  248. const time = new Date().valueOf() //当前时间
  249. console.log(start,"start")
  250. if(res.biddingStatus < 7){
  251. console.log("我不满足")
  252. if(time < start){
  253. res.biddingStatus = 5
  254. console.log("当前时间小于投标时间,已投递")
  255. }else if(time > start){
  256. res.biddingStatus = 6
  257. console.log("当前时间小于投标时间,审核中")
  258. }
  259. }
  260. return res
  261. })
  262. console.log(data)
  263. this.tableData = data
  264. console.log('1' + response.data.data.records)
  265. this.total = response.data.data.total
  266. })
  267. },
  268. onApplyDate(){
  269. let startTime
  270. let endTime
  271. if(this.applyDateStart != null){
  272. this.startTime =this.applyDateStart[0]
  273. this.endTime = this.applyDateStart[1]
  274. }else{
  275. this.startTime =""
  276. this.endTime =""
  277. }
  278. this.getTenantList()
  279. },
  280. handleFind: function() {
  281. this.current = 1
  282. this.getTenantList()
  283. },
  284. handleSizeChange: function(val) {
  285. this.size = val
  286. this.getTenantList()
  287. },
  288. // 换页
  289. handleCurrentChange: function(val) {
  290. const page = val.toString()
  291. this.current = page
  292. this.getTenantList()
  293. },
  294. // 查看
  295. // lookRecord:function(row){
  296. // this.lookCord=row
  297. // this.dialogVisible = true
  298. // console.log(row)
  299. // },
  300. handleOneChange(row,i){
  301. console.log(row,i)
  302. this.$refs.multipleTable.toggleRowSelection(row);
  303. },
  304. handleSelectionChange(row){
  305. console.log(row)
  306. this.SelectionList = row
  307. }
  308. }
  309. }
  310. </script>
  311. <style scoped lang="scss" >
  312. .ckTable{
  313. width: 100%;
  314. border: #eee;
  315. text-align: center;
  316. tr,td{
  317. border: 0.5px solid#dfe6ec;
  318. line-height: 23px;
  319. }
  320. }
  321. .el-dropdown-link {
  322. cursor: pointer;
  323. color: #1282f3;
  324. }
  325. .el-icon-arrow-down {
  326. font-size: 12px;
  327. }
  328. .el-scrollbar__wrap {
  329. overflow-y: hidden;
  330. }
  331. .el-card {
  332. border: 0px solid #fff;
  333. .topClass{
  334. font-weight: 600;
  335. font-size: 17px;
  336. }
  337. }
  338. .el-icon-document{
  339. font-size: 70px;
  340. color:#409EFF;
  341. line-height: 130px;
  342. }
  343. /deep/.el-card__body {
  344. padding: 20px 10px 0 10px !important;
  345. }
  346. /deep/ .el-table__expanded-cell[class*=cell]{
  347. padding: 0;
  348. }
  349. .pagination{
  350. padding-bottom: 30px;
  351. }
  352. .clearfix {
  353. line-height: 20px;
  354. font-size: 18px;
  355. font-weight: 600;
  356. color: #409EFF;
  357. }
  358. .box-card{
  359. margin-bottom: 20px;
  360. .row-bg{
  361. padding: 15px 40px 0 40px;
  362. .flex_text{
  363. line-height: 50px;
  364. color: #8C8C8C;
  365. font-size: 14px;
  366. // border:1px solid red;
  367. // font-weight: 600;
  368. }
  369. .flex_name{
  370. font-size: 14px;
  371. padding-left: 25px;
  372. color: #575757;
  373. font-weight: 550;
  374. }
  375. }
  376. }
  377. </style>