warehouseManagementNoWeight.vue 15 KB

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