warehouseManagementNoComplete.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543
  1. <template>
  2. <div class="container">
  3. <el-row>
  4. <el-col :span="20">
  5. <h2 class="bg-left title">待完成记录</h2>
  6. </el-col>
  7. <el-col :span="4" class="bg-right">
  8. <el-button
  9. class="bg-bottom"
  10. type="primary"
  11. size="small"
  12. @click="returnWarehouse()"
  13. ><img
  14. width="6"
  15. height="10"
  16. style="vertical-align: bottom; margin-right: 3px"
  17. src="../../../public/img/lujing.png"
  18. alt=""
  19. />返回</el-button>
  20. </el-col>
  21. </el-row>
  22. <ws-form ref="deptBudgetList" :v-model="deptBudgetList">
  23. <div class="center">
  24. <h2 style="padding-left: 20px">
  25. <img
  26. style="position: relative; top: 2px"
  27. width="19"
  28. height="19"
  29. src="../../../public/img/cangku.png"
  30. alt=""
  31. />
  32. {{ this.$route.query.warehouseName }}
  33. <span class="position" v-show="this.$route.query.warehouseType == 1">
  34. {{ this.$route.query.binNumber }}仓位
  35. </span>
  36. <span v-show="this.$route.query.warehouseType == 2">(临)</span>
  37. </h2>
  38. <el-table :data="improved.records">
  39. <el-table-column type="index" label="序号">
  40. <template scope="scope">
  41. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  42. <span v-else>{{ scope.$index + 1 }}</span>
  43. </template>
  44. </el-table-column>
  45. <el-table-column prop="goodsName" label="货名"> </el-table-column>
  46. <el-table-column
  47. prop="grossWeight"
  48. label="毛重(吨)"
  49. ></el-table-column>
  50. <el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
  51. <el-table-column
  52. prop="netWeight"
  53. label="净重(吨)"
  54. ></el-table-column>
  55. <el-table-column prop="grade" label="品级">
  56. <template slot-scope="scope">
  57. <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
  58. scope.row.grade
  59. }}</span>
  60. <span v-if="scope.row.grade == '二等品'" class="second-class">{{
  61. scope.row.grade
  62. }}</span>
  63. <span v-if="scope.row.grade == '三等品'" class="third-class">{{
  64. scope.row.grade
  65. }}</span>
  66. <span v-if="scope.row.grade == '等外'" class="substandard">{{
  67. scope.row.grade
  68. }}</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column prop="inOutDate" label="出入库日期">
  72. </el-table-column>
  73. <el-table-column prop="inOutType" label="类型"> </el-table-column>
  74. <el-table-column prop="contractNo" label="合同编号">
  75. </el-table-column>
  76. <el-table-column prop="carNo" label="车牌号"> </el-table-column>
  77. <el-table-column prop="boxNo" label="箱号-1">
  78. </el-table-column>
  79. <el-table-column prop="boxNoOther" label="箱号-2">
  80. </el-table-column>
  81. <el-table-column prop="titleNo" label="封号-1">
  82. </el-table-column>
  83. <el-table-column prop="titleNoOther" label="封号-2">
  84. </el-table-column>
  85. <el-table-column prop="agent" label="经办人"> </el-table-column>
  86. <el-table-column prop="backOffice" label="操作人"> </el-table-column>
  87. <el-table-column prop="updateDate" label="保存时间">
  88. </el-table-column>
  89. <el-table-column prop="address" label="操作" width="200">
  90. <template slot-scope="scope">
  91. <div class="record" @click="edits(scope.row)">编辑</div>
  92. <div class="adjustment" @click="handleDelete(scope.row)">
  93. 删除
  94. </div>
  95. </template>
  96. </el-table-column>
  97. </el-table>
  98. <div style='text-align:center;'>
  99. <el-pagination
  100. @size-change="handleSizeChange"
  101. @current-change="handleCurrentChange"
  102. :current-page="currentPage"
  103. :page-size="pageSize"
  104. layout="total, sizes, prev, pager, next, jumper"
  105. :total="deptBudgetTotal"
  106. >
  107. </el-pagination>
  108. </div>
  109. </div>
  110. </ws-form>
  111. </div>
  112. </template>
  113. <script>
  114. import {
  115. complete,
  116. delInOut,
  117. completeList,
  118. // deletewarehouse,
  119. // warehouseName,
  120. // addstorageputList,
  121. } from '@/model/warehouse/index'
  122. // import { downloadFile } from '@/utils/batchDown'
  123. import Pagination from '@/components/Pagination'
  124. import WsUpload from '@/components/WsUpload'
  125. import { dayjs } from 'base-core-lib'
  126. export default {
  127. name: 'viewSpareMoney',
  128. components: {
  129. WsUpload,
  130. Pagination,
  131. },
  132. watch: {
  133. vesselId(val) {
  134. this.getList()
  135. },
  136. isShow(val) {
  137. this.showType = val
  138. },
  139. },
  140. data() {
  141. return {
  142. //弹出框
  143. dialogViewSpareMoney: false,
  144. dialogApproveFormVisible: false,
  145. // 船舶类型
  146. monetaryKey: null,
  147. // 表格显示数据
  148. tableDate: [],
  149. // 是否显示
  150. showType: true,
  151. // 年
  152. year: '',
  153. deptBudgetTotal: 0,
  154. currentPage: 1,
  155. pageSize: 10,
  156. searchType: 1,
  157. searchKeyWord: '',
  158. contractType: 2,
  159. startDate: null,
  160. endDate: null,
  161. deletewarehouse: [],
  162. improved: [],
  163. row: [],
  164. deptBudgetList1: [],
  165. // 提交类型
  166. submitType: true,
  167. selectpackingMethod: {},
  168. size: 10,
  169. compId: localStorage.getItem('ws-pf_compId'),
  170. deptCircularPage: {},
  171. packtypeList: {},
  172. date: {
  173. year: dayjs().format('YYYY'),
  174. month: dayjs().format('MM'),
  175. },
  176. contractList: [],
  177. deptBudgetList: {},
  178. historyList: [],
  179. // inOutDate:null,
  180. pickerBeginDateBefore: {
  181. disabledDate: (time) => {
  182. return time.getTime() > Date.now()
  183. },
  184. },
  185. accessoryTFs: false,
  186. }
  187. },
  188. activated() {
  189. //cg.viewBudget
  190. //cg.viewSpareMoney
  191. // this.getVesselData();
  192. this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
  193. this.binNumber = this.$route.params.binNumber
  194. this.deptBudgetList.warehouseType = this.$route.query.warehouseType
  195. this.createType=this.$route.query.createType,
  196. //接参
  197. this.getList(
  198. this.$route.query.baseId,
  199. this.$route.query.positionId,
  200. this.$route.query.warehouseType
  201. )
  202. this.showType = this.isShow
  203. },
  204. methods: {
  205. //返回按钮
  206. returnWarehouse() {
  207. this.$router.go(-1)
  208. },
  209. //编辑
  210. edits(row) {
  211. if (row.inOutFlag == 2) {
  212. this.$store.dispatch('app/setdeptBudgetList', row)
  213. this.$router.push({
  214. path: 'warehouseManagementPerfectput',
  215. query: {
  216. id: row.id,
  217. agent: row.agent,
  218. baseId: row.baseId,
  219. binNumber: row.binNumber,
  220. carNo: row.carNo,
  221. compId: row.compId,
  222. contractNo: row.contractNo,
  223. goodsName: row.goodsName,
  224. goodsNameKey: row.goodsNameKey,
  225. grade: row.grade,
  226. outType:row.outType,
  227. addressUrl:row.addressUrl,
  228. grossWeight: row.grossWeight,
  229. inOutDate: row.inOutDate,
  230. inOutFlag: row.inOutFlag,
  231. inOutType: row.inOutType,
  232. inOutTypeKey: row.inOutTypeKey,
  233. netWeight: row.netWeight,
  234. positionId: row.positionId,
  235. statusFlag: row.statusFlag,
  236. tare: row.tare,
  237. warehouseName: row.warehouseName,
  238. warehouseInOutDetail: row.warehouseInOutDetail,
  239. warehouseType: this.deptBudgetList.warehouseType,
  240. createType: this.createType,
  241. temporaryOutType : row.temporaryOutType,
  242. cost:row.cost,
  243. freight:row.freight,
  244. type:row.type,
  245. buckleWeightRatio:row.buckleWeightRatio,
  246. tidalGrainWater:row.tidalGrainWater,
  247. solidGrainWater:row.solidGrainWater,
  248. pureWeight:row.pureWeight,
  249. deductionAmount:row.deductionAmount,
  250. deductionWeight:row.deductionWeight
  251. },
  252. })
  253. } else if (row.inOutFlag == 1) {
  254. this.$store.dispatch('app/setdeptBudgetList', row)
  255. // this.$store.commit('deptBudgetList',row)
  256. this.$router.push({
  257. path: 'warehouseManagementPerfectDelivery',
  258. query: {
  259. id: row.id,
  260. agent: row.agent,
  261. baseId: row.baseId,
  262. binNumber: row.binNumber,
  263. carNo: row.carNo,
  264. compId: row.compId,
  265. contractNo: row.contractNo,
  266. goodsName: row.goodsName,
  267. goodsNameKey: row.goodsNameKey,
  268. outType:row.outType,
  269. grade: row.grade,
  270. addressUrl:row.addressUrl,
  271. grossWeight: row.grossWeight,
  272. inOutDate: row.inOutDate,
  273. inOutFlag: row.inOutFlag,
  274. inOutType: row.inOutType,
  275. inOutTypeKey: row.inOutTypeKey,
  276. netWeight: row.netWeight,
  277. positionId: row.positionId,
  278. statusFlag: row.statusFlag,
  279. tare: row.tare,
  280. warehouseName: row.warehouseName,
  281. warehouseInOutDetail: row.warehouseInOutDetail,
  282. warehouseType: this.deptBudgetList.warehouseType,
  283. temporaryOutType : this.temporaryOutType,
  284. cost:row.cost,
  285. freight:row.freight,
  286. type:row.type,
  287. buckleWeightRatio:row.buckleWeightRatio,
  288. tidalGrainWater:row.tidalGrainWater,
  289. solidGrainWater:row.solidGrainWater,
  290. pureWeight:row.pureWeight,
  291. deductionAmount:row.deductionAmount,
  292. deductionWeight:row.deductionWeight
  293. },
  294. })
  295. }
  296. },
  297. dateFormat(fmt, date) {
  298. let ret
  299. const opt = {
  300. 'Y+': date.getFullYear().toString(), // 年
  301. 'm+': (date.getMonth() + 1).toString(), // 月
  302. 'd+': date.getDate().toString(), // 日
  303. 'H+': date.getHours().toString(), // 时
  304. // "M+": date.getMinutes().toString(), // 分
  305. // "S+": date.getSeconds().toString() // 秒
  306. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  307. }
  308. for (let k in opt) {
  309. ret = new RegExp('(' + k + ')').exec(fmt)
  310. if (ret) {
  311. fmt = fmt.replace(
  312. ret[1],
  313. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  314. )
  315. }
  316. }
  317. return fmt
  318. },
  319. handleClose() {
  320. this.accessoryTFs = false
  321. },
  322. handleSizeChange(val) {
  323. console.log(`每页 ${val} 条`)
  324. this.pageSize = val
  325. this.getList()
  326. },
  327. handleCurrentChange(val) {
  328. this.currentPage = val
  329. console.log(`当前页: ${val}`)
  330. this.getList()
  331. },
  332. //收
  333. getList(id, id1, id2) {
  334. if (id2 == 1) {
  335. complete({
  336. // compId: localStorage.getItem('ws-pf_compId'),
  337. baseId: id,
  338. positionId: id1,
  339. pageSize: this.pageSize,
  340. currentPage: this.currentPage,
  341. // inOutDate:this.inOutDate
  342. })
  343. .toPromise()
  344. .then((response) => {
  345. this.deptBudgetTotal=response.total
  346. this.improved = response
  347. })
  348. } else if (id2 == 2) {
  349. completeList({
  350. baseId: id,
  351. positionId: id1,
  352. pageSize: this.pageSize,
  353. currentPage: this.currentPage,
  354. })
  355. .toPromise()
  356. .then((response) => {
  357. this.improved = response
  358. })
  359. }
  360. },
  361. handleExamine(row) {
  362. this.$router.push({
  363. name: 'salesContractExamine',
  364. query: { id: row.id },
  365. })
  366. },
  367. //删除
  368. handleDelete(row) {
  369. this.$confirm(`删除后不可恢复,确认删除?`, {
  370. cancelButtonText: '取消',
  371. confirmButtonText: '确定',
  372. type: 'warning',
  373. })
  374. .then(() => {
  375. delInOut({ id: row.id })
  376. .toPromise()
  377. .then((response) => {
  378. this.$notify.success({
  379. title: '成功',
  380. message: '删除成功',
  381. })
  382. this.getList(
  383. row.baseId,
  384. row.positionId,
  385. this.$route.query.warehouseType
  386. )
  387. })
  388. .catch((response) => {})
  389. })
  390. .catch(() => {
  391. return false
  392. })
  393. },
  394. },
  395. find() {
  396. this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
  397. this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
  398. this.currentPage = 1
  399. this.getList()
  400. },
  401. // deletecontract(){},
  402. //删除
  403. approve() {},
  404. listQuery() {},
  405. total() {},
  406. clearfiltQuery() {},
  407. selectCrtDuty() {},
  408. }
  409. </script>
  410. <style lang="scss" scoped>
  411. .center {
  412. position: relative;
  413. top: 50px;
  414. width: 90%;
  415. height: 500px;
  416. margin: 0 auto;
  417. }
  418. .container .bg-left {
  419. margin-left: 40px;
  420. }
  421. .container .bg-bottom {
  422. position: absolute;
  423. float: right;
  424. top: 15px;
  425. right: 20px;
  426. }
  427. .vertical-text-left {
  428. width: 62px;
  429. text-align: right;
  430. }
  431. /deep/.el-form-item {
  432. width: 33%;
  433. }
  434. .el-row {
  435. background: #f6f7fc;
  436. // box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
  437. border-radius: 4px 4px 1px 1px;
  438. }
  439. .container .bg-bottom {
  440. width: 74px;
  441. height: 32px;
  442. background: #5473e8;
  443. border-radius: 4px;
  444. }
  445. .bg-bottom {
  446. margin-top: 5px 0px;
  447. }
  448. .el-table .el-table__header tr {
  449. width: 1091px;
  450. height: 50px;
  451. background: #f6f7fc;
  452. border: 1px solid #e8ecf6;
  453. text-align: center;
  454. }
  455. .el-table .cell {
  456. text-align: center;
  457. width: 29px;
  458. height: 20px;
  459. font-size: 14px;
  460. font-family: PingFangSC-Regular, PingFang SC;
  461. font-weight: 400;
  462. color: #5878e8;
  463. line-height: 20px;
  464. }
  465. .default .winseaview-main .el-table th > .cell {
  466. color: #8890b1;
  467. }
  468. .record,
  469. .adjustment {
  470. display: inline-block;
  471. color: #5878e8;
  472. padding: 0 4px !important;
  473. position: relative;
  474. }
  475. /deep/.el-table td,
  476. .el-table th {
  477. text-align: center;
  478. }
  479. /deep/.el-table .el-table__header th {
  480. border-bottom-width: 0px;
  481. text-align: center;
  482. }
  483. .top-grade {
  484. background: linear-gradient(90deg, #5678e9, #7993f6);
  485. color: #fff;
  486. padding: 3px;
  487. border-radius: 2px;
  488. }
  489. .second-class {
  490. background: linear-gradient(90deg, #50cdd9, #82e2ea);
  491. color: #fff;
  492. padding: 3px;
  493. border-radius: 2px;
  494. }
  495. .third-class {
  496. background: linear-gradient(90deg, #ffa735, #ffbf70);
  497. color: #fff;
  498. padding: 3px;
  499. border-radius: 2px;
  500. }
  501. .substandard {
  502. background: linear-gradient(90deg, #b2b4bb, #ced0d5);
  503. color: #fff;
  504. padding: 3px;
  505. border-radius: 2px;
  506. }
  507. // .container .bg-left{
  508. // width: 663px;
  509. // height: 28px;
  510. // font-size: 18px;
  511. // font-family: PingFangSC-Medium, PingFang SC;
  512. // font-weight: 500;
  513. // color: #262626;
  514. // line-height: 28px;
  515. // text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
  516. // }
  517. .a {
  518. width: 19px;
  519. height: 19px;
  520. background: #afb5cb;
  521. margin-left: 10px;
  522. }
  523. .container .bg-left {
  524. width: 140px;
  525. height: 29px;
  526. font-size: 21px;
  527. font-family: PingFangSC-Semibold, PingFang SC;
  528. font-weight: 600;
  529. color: #323233;
  530. line-height: 29px;
  531. }
  532. .position {
  533. width: 52px;
  534. height: 20px;
  535. background: #afb5cb;
  536. border-radius: 2px;
  537. font-size: 12px;
  538. font-family: PingFangSC-Medium, PingFang SC;
  539. color: #ffffff;
  540. line-height: 20px;
  541. }
  542. </style>