warehouseManagementNoWeight.vue 16 KB

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