tranManagementTransporHairRespond.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. //发货反馈
  2. <template>
  3. <div>
  4. <BaseHeaderLayout :leftSpan="12">
  5. <template slot="left">
  6. <ws-button
  7. class="but"
  8. type="primary"
  9. @click="handleAdd()"
  10. >
  11. 执行中</ws-button
  12. >
  13. <ws-button
  14. class="but"
  15. @click="handleLook()"
  16. >已完成</ws-button
  17. >
  18. <ws-button
  19. class="but"
  20. @click="handleEdit()"
  21. >全部任务</ws-button
  22. >
  23. </template>
  24. <!-- 接单开始 -->
  25. <template slot="left">
  26. <ws-date-picker
  27. v-model="deptBudgetList.inOutDate"
  28. type="date"
  29. placeholder="请选择开始日期"
  30. value-format="yyyy-MM-dd"
  31. />
  32. <span>至</span>
  33. <ws-date-picker
  34. v-model="deptBudgetList.inOutDate"
  35. type="date"
  36. placeholder="请选择结束日期"
  37. value-format="yyyy-MM-dd"
  38. />
  39. <ws-input
  40. v-model="searchKeyWord"
  41. placeholder="可按照合同编号、买方名称、卖方名称进行查找"
  42. clearable
  43. maxlength="500"
  44. type="input"
  45. class="findValue"
  46. ></ws-input>
  47. <ws-button
  48. class="find"
  49. type="primary"
  50. @click="find()"
  51. ><img
  52. width="16"
  53. height="16"
  54. style="
  55. vertical-align: text-top;
  56. position: relative;
  57. top: 0px;
  58. left: -8px;
  59. "
  60. src="../../../public/img/sousuo.png"
  61. alt=""
  62. /></ws-button>
  63. </template>
  64. </BaseHeaderLayout>
  65. <div class="container">
  66. <el-table
  67. class="wenzi"
  68. :data="tranManagementList.records"
  69. style="width: 100%; margin-top: 20px"
  70. height="780"
  71. >
  72. <el-table-column type="index" label="序号" width="80">
  73. <template scope="scope">
  74. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  75. <span v-else>{{ scope.$index + 1 }}</span>
  76. </template>
  77. </el-table-column>
  78. <el-table-column prop="processNo" label="运输任务编号" width="120">
  79. </el-table-column>
  80. <el-table-column prop="goodsName" label="运输方式" width="80">
  81. </el-table-column>
  82. <el-table-column prop="goodsName" label="货名" width="80">
  83. </el-table-column>
  84. <el-table-column prop="weight" label="重量(吨)" width="120">
  85. </el-table-column>
  86. <el-table-column prop="send" label="发货" width="160">
  87. </el-table-column>
  88. <el-table-column prop="receive" label="收货" width="160">
  89. </el-table-column>
  90. <el-table-column prop="tranCycle" label="运输周期" width="160">
  91. <template scope="scope">
  92. {{ scope.row.deliveryDateStart }} ~ {{ scope.row.deliveryDateEnd }}
  93. </template>
  94. </el-table-column>
  95. <el-table-column prop="status" label="状态">
  96. <template slot-scope="scope">
  97. <el-popover
  98. placement="left"
  99. :width="285"
  100. trigger="click"
  101. visible-arrow="false"
  102. @show="history(scope.row)"
  103. >
  104. <template>
  105. <span slot="reference">
  106. <span
  107. v-if="scope.row.status == '待执行'"
  108. class="executory"
  109. ></span>
  110. <span
  111. v-if="scope.row.status == '执行中'"
  112. class="inExecution"
  113. ></span>
  114. <span v-if="scope.row.status == '已完成'" class="done"></span
  115. >{{ scope.row.status }}
  116. </span>
  117. </template>
  118. <div>
  119. <p style="margin-top: 0; padding-left: 10px">XXXXX</p>
  120. <div v-for="(item, index) in historyList" class="flex">
  121. <div class="vertical-text vertical-text-left">
  122. {{ item.updateDate }}
  123. </div>
  124. <div>
  125. <div class="vertical-circle"></div>
  126. <div
  127. v-if="index != historyList.length - 1"
  128. class="vertical-line"
  129. ></div>
  130. </div>
  131. <div class="vertical-text">
  132. {{ item.operateUser }}<br />{{ item.dealMsg }}
  133. </div>
  134. </div>
  135. </div>
  136. </el-popover>
  137. <img
  138. width="17"
  139. height="18"
  140. style="vertical-align: text-top; position: relative; top: -1px"
  141. src="../../../public/img/edit.png"
  142. @click="editClick(scope.row)"
  143. alt=""
  144. />
  145. </template>
  146. </el-table-column>
  147. <el-table-column prop="receivingDate" class="table_td" label="接单日期">
  148. </el-table-column>
  149. <el-table-column prop="seller" label="操作" width="300">
  150. <template slot-scope="scope">
  151. <ws-button class="completed" @click="trainSee(scope.row)">
  152. 查看
  153. </ws-button>
  154. <ws-button class="putstorage" @click="feedback(scope.row)">
  155. 反馈
  156. </ws-button>
  157. </template>
  158. </el-table-column>
  159. </el-table>
  160. </div>
  161. </div>
  162. </template>
  163. <script>
  164. import { automobileList } from '@/model/transport/index'
  165. import { downloadFile } from '@/utils/batchDown'
  166. import Pagination from '@/components/Pagination'
  167. import WsUpload from '@/components/WsUpload'
  168. import { dayjs, fmoney, EventBus } from 'base-core-lib'
  169. export default {
  170. name: 'viewSpareMoney',
  171. components: {
  172. WsUpload,
  173. Pagination,
  174. },
  175. watch: {
  176. vesselId(val) {
  177. this.getList()
  178. },
  179. isShow(val) {
  180. this.showType = val
  181. },
  182. },
  183. data() {
  184. return {
  185. //弹出框
  186. dialogViewSpareMoney: false,
  187. dialogApproveFormVisible: false,
  188. // 船舶类型
  189. monetaryKey: null,
  190. // 表格显示数据
  191. tableDate: [],
  192. // 是否显示
  193. showType: true,
  194. // 年
  195. year: '',
  196. currentPage: 1,
  197. pageSize: 10,
  198. searchType: 1,
  199. searchTypeText: '未完成',
  200. searchKeyWord: '',
  201. contractType: 2,
  202. tranTypeKey: 2,
  203. // 提交类型
  204. submitType: true,
  205. size: 10,
  206. spanArr: [],
  207. warehouseName: '',
  208. compId: sessionStorage.getItem('ws-pf_compId'),
  209. deptCircularPage: {},
  210. tranManagementList: [],
  211. deptBudgetList: {},
  212. historyList: [],
  213. pickerBeginDateBefore: {
  214. disabledDate: (time) => {
  215. return time.getTime() > Date.now()
  216. },
  217. },
  218. accessoryTFs: false,
  219. }
  220. },
  221. activated() {
  222. //cg.viewBudget
  223. //cg.viewSpareMoney
  224. // this.getVesselData();
  225. this.getList()
  226. this.showType = this.isShow
  227. },
  228. methods: {
  229. getSpanArr(data) {
  230. let that = this
  231. //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
  232. that.spanArr = []
  233. that.pos = 0
  234. //遍历数据
  235. data.forEach((item, index) => {
  236. //判断是否是第一项
  237. // if (index === 0) {
  238. // this.spanArr.push(1)
  239. // this.pos = 0
  240. // } else {
  241. //不是第一项时,就根据标识去存储
  242. if (data[index].warehouseNumViewList.length > 1) {
  243. // 查找到符合条件的数据时每次要把之前存储的数据+1
  244. this.spanArr[this.pos] = data[index].warehouseNumViewList.length
  245. this.spanArr.push(0)
  246. } else {
  247. // 没有符合的数据时,要记住当前的index
  248. this.spanArr.push(1)
  249. this.pos = index
  250. }
  251. // }
  252. })
  253. },
  254. //查看火运调度详细
  255. trainSee(row) {
  256. this.$router.push({
  257. })
  258. },
  259. //反馈
  260. feedback(row) {
  261. this.$router.push({
  262. path: 'tranManagementTransporFeedback',
  263. })
  264. },
  265. //已完成
  266. handleLook() {
  267. },
  268. //待完成
  269. handleAdd() {
  270. },
  271. //全部任务
  272. handleEdit() {
  273. },
  274. dateFormat(fmt, date) {
  275. let ret
  276. const opt = {
  277. 'Y+': date.getFullYear().toString(), // 年
  278. 'm+': (date.getMonth() + 1).toString(), // 月
  279. 'd+': date.getDate().toString(), // 日
  280. 'H+': date.getHours().toString(), // 时
  281. // "M+": date.getMinutes().toString(), // 分
  282. // "S+": date.getSeconds().toString() // 秒
  283. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  284. }
  285. for (let k in opt) {
  286. ret = new RegExp('(' + k + ')').exec(fmt)
  287. if (ret) {
  288. fmt = fmt.replace(
  289. ret[1],
  290. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  291. )
  292. }
  293. }
  294. return fmt
  295. },
  296. handleClose() {
  297. this.accessoryTFs = false
  298. },
  299. handleSizeChange(val) {
  300. console.log(`每页 ${val} 条`)
  301. this.pageSize = val
  302. this.getList()
  303. },
  304. handleCurrentChange(val) {
  305. this.currentPage = val
  306. console.log(`当前页: ${val}`)
  307. this.getList()
  308. },
  309. getList() {
  310. automobileList({
  311. compId: sessionStorage.getItem('ws-pf_compId'),
  312. contractType: this.contractType,
  313. currentPage: this.currentPage,
  314. pageSize: this.pageSize,
  315. tranTypeKey: this.tranTypeKey,
  316. })
  317. .toPromise()
  318. .then((response) => {
  319. this.tranManagementList = response
  320. })
  321. },
  322. editClick(row) {
  323. var status = ''
  324. if (row.status == '待执行' || row.status == '已完成') {
  325. status = '执行中'
  326. } else if (row.status == '执行中') {
  327. status = '已完成'
  328. }
  329. //cancelButtonClass: "btn-custom-cancel"
  330. this.$confirm(`是否将状态改为${status}`, {
  331. confirmButtonText: '确定',
  332. cancelButtonText: '取消',
  333. type: 'warning',
  334. })
  335. .then(() => {
  336. editstatus({ id: row.id })
  337. .toPromise()
  338. .then((response) => {
  339. this.$notify.success({
  340. title: '成功',
  341. message: '状态修改成功',
  342. })
  343. this.getList()
  344. })
  345. .catch((response) => {
  346. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  347. })
  348. })
  349. .catch(() => {
  350. return false
  351. })
  352. },
  353. selecttaskType(e) {
  354. for (var i = 0; i < this.taskTypeList.length; i++) {
  355. if (this.taskTypeList[i].value == e) {
  356. this.searchType = this.taskTypeList[i].type
  357. }
  358. }
  359. },
  360. find() {
  361. this.currentPage = 1
  362. this.getList()
  363. },
  364. },
  365. }
  366. </script>
  367. <style lang="scss" scoped>
  368. .container {
  369. width: 90%;
  370. margin: 0 auto;
  371. }
  372. .vertical-text-left {
  373. width: 62px;
  374. text-align: right;
  375. }
  376. .el-button--primary {
  377. background-color: #5878e8;
  378. border-color: #5878e8;
  379. }
  380. .el-button--default {
  381. color: #8890b1;
  382. border-color: #e8eaf1;
  383. }
  384. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  385. width: 30px;
  386. margin-left: 0;
  387. border-top-left-radius: 0px;
  388. border-bottom-left-radius: 0px;
  389. }
  390. /deep/.findValue .el-input__inner {
  391. border-top-right-radius: 0px;
  392. border-bottom-right-radius: 0px;
  393. }
  394. .completed.el-button--default {
  395. border-color: #5878e8;
  396. background-color: #f6f7fc;
  397. color: #5878e8;
  398. }
  399. .putstorage.el-button--default,
  400. .deliverystorage.el-button--default {
  401. border-color: #8890b1;
  402. background-color: #fff;
  403. color: #8890b1;
  404. }
  405. /deep/.el-table td,
  406. /deep/.el-table th.is-leaf {
  407. border-right: 1px solid #e9ecf7;
  408. text-align: center;
  409. }
  410. /deep/.el-table tr td:first-child,
  411. /deep/.el-table tr th.is-leaf:first-child {
  412. border-left: 1px solid #e9ecf7;
  413. }
  414. .el-row {
  415. height: 150px;
  416. }
  417. .base_header_layout .grid-content {
  418. margin-top: 80px;
  419. }
  420. //待完成三按钮
  421. .but {
  422. margin-top: 150px;
  423. margin-left: 110px;
  424. }
  425. .el-input--small .el-input__inner {
  426. margin-left: 20px;
  427. }
  428. .el-range-editor--small.el-input__inner {
  429. height: 32px;
  430. margin-left: -20%;
  431. }
  432. </style>