warehouseManagementNoComplete.vue 15 KB

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