warehouseManagementNoWeight.vue 20 KB

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