warehouseManagementNoComplete.vue 15 KB

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