warehouseManagementNoComplete.vue 15 KB

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