warehouseManagementNoComplete.vue 14 KB

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