warehouseManagementNoComplete.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  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"> {{ this.$route.query.binNumber }}仓位 </span>
  35. <span v-show="this.$route.query.warehouseType == 2">(临)</span>
  36. </h2>
  37. <el-table :data="improved.records">
  38. <el-table-column type="index" label="序号">
  39. <template scope="scope">
  40. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  41. <span v-else>{{ scope.$index + 1 }}</span>
  42. </template>
  43. </el-table-column>
  44. <el-table-column prop="goodsName" label="货名"> </el-table-column>
  45. <el-table-column
  46. prop="grossWeight"
  47. label="毛重(吨)"
  48. ></el-table-column>
  49. <el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
  50. <el-table-column
  51. prop="netWeight"
  52. label="净重(吨)"
  53. ></el-table-column>
  54. <el-table-column prop="grade" label="品级">
  55. <template slot-scope="scope">
  56. <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
  57. scope.row.grade
  58. }}</span>
  59. <span v-if="scope.row.grade == '二等品'" class="second-class">{{
  60. scope.row.grade
  61. }}</span>
  62. <span v-if="scope.row.grade == '三等品'" class="third-class">{{
  63. scope.row.grade
  64. }}</span>
  65. <span v-if="scope.row.grade == '等外'" class="substandard">{{
  66. scope.row.grade
  67. }}</span>
  68. </template>
  69. </el-table-column>
  70. <el-table-column prop="inOutDate" label="出入库日期">
  71. </el-table-column>
  72. <el-table-column prop="inOutType" label="类型"> </el-table-column>
  73. <el-table-column prop="contractNo" label="合同编号">
  74. </el-table-column>
  75. <el-table-column prop="carNo" label="车牌号"> </el-table-column>
  76. <el-table-column prop="agent" label="经办人"> </el-table-column>
  77. <el-table-column prop="backOffice" label="内勤"> </el-table-column>
  78. <el-table-column prop="updateDate" label="保存时间">
  79. </el-table-column>
  80. <el-table-column prop="address" label="操作" width="200">
  81. <!-- <template scope="scope"> -->
  82. <!-- <ws-button
  83. type="primary"
  84. @click="edits(scope.row)"
  85. v-hasPermission="
  86. `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
  87. "
  88. >编辑</ws-button
  89. > -->
  90. <!-- <ws-button
  91. type="primary"
  92. @click="handleDelete(scope.row)"
  93. v-hasPermission="
  94. `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
  95. "
  96. >删除</ws-button
  97. > -->
  98. <!-- </template> -->
  99. <template slot-scope="scope">
  100. <div class="record" @click="edits(scope.row)">编辑</div>
  101. <div class="adjustment" @click="handleDelete(scope.row)">
  102. 删除
  103. </div>
  104. </template>
  105. </el-table-column>
  106. </el-table>
  107. <div style="text-align: right; padding: 10px">
  108. <el-button
  109. class="bg-bottom-up"
  110. type="primary"
  111. size="small"
  112. @click="returnWarehouse()"
  113. >关闭</el-button
  114. >
  115. </div>
  116. </div>
  117. </ws-form>
  118. </div>
  119. </template>
  120. <script>
  121. import {
  122. complete,
  123. delInOut,
  124. completeList,
  125. // deletewarehouse,
  126. // warehouseName,
  127. // addstorageputList,
  128. } from '@/model/warehouse/index'
  129. // import { downloadFile } from '@/utils/batchDown'
  130. import Pagination from '@/components/Pagination'
  131. import WsUpload from '@/components/WsUpload'
  132. import { dayjs } from 'base-core-lib'
  133. export default {
  134. name: 'viewSpareMoney',
  135. components: {
  136. WsUpload,
  137. Pagination,
  138. },
  139. watch: {
  140. vesselId(val) {
  141. this.getList()
  142. },
  143. isShow(val) {
  144. this.showType = val
  145. },
  146. },
  147. data() {
  148. return {
  149. //弹出框
  150. dialogViewSpareMoney: false,
  151. dialogApproveFormVisible: false,
  152. // 船舶类型
  153. monetaryKey: null,
  154. // 表格显示数据
  155. tableDate: [],
  156. // 是否显示
  157. showType: true,
  158. // 年
  159. year: '',
  160. deptBudgetTotal: 0,
  161. currentPage: 1,
  162. pageSize: 10,
  163. searchType: 1,
  164. searchKeyWord: '',
  165. contractType: 2,
  166. startDate: null,
  167. endDate: null,
  168. deletewarehouse: [],
  169. improved: [],
  170. row: [],
  171. deptBudgetList1: [],
  172. // 提交类型
  173. submitType: true,
  174. selectpackingMethod: {},
  175. size: 10,
  176. compId: sessionStorage.getItem('ws-pf_compId'),
  177. deptCircularPage: {},
  178. packtypeList: {},
  179. date: {
  180. year: dayjs().format('YYYY'),
  181. month: dayjs().format('MM'),
  182. },
  183. contractList: [],
  184. deptBudgetList: {},
  185. historyList: [],
  186. // inOutDate:null,
  187. pickerBeginDateBefore: {
  188. disabledDate: (time) => {
  189. return time.getTime() > Date.now()
  190. },
  191. },
  192. accessoryTFs: false,
  193. }
  194. },
  195. activated() {
  196. //cg.viewBudget
  197. //cg.viewSpareMoney
  198. // this.getVesselData();
  199. this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
  200. this.binNumber = this.$route.params.binNumber
  201. this.deptBudgetList.warehouseType = this.$route.query.warehouseType
  202. //接参
  203. this.getList(this.$route.query.baseId, this.$route.query.positionId , this.$route.query.warehouseType)
  204. this.showType = this.isShow
  205. },
  206. methods: {
  207. //返回按钮
  208. returnWarehouse() {
  209. this.$router.push({ path: 'warehouseManagementList' })
  210. },
  211. //编辑
  212. edits(row) {
  213. if (row.inOutFlag == 2) {
  214. this.$store.dispatch('app/setdeptBudgetList', row)
  215. this.$router.push({
  216. path: 'warehouseManagementPerfectput',
  217. query: {
  218. id:row.id,
  219. agent:row.agent,
  220. baseId: row.baseId,
  221. binNumber: row.binNumber,
  222. carNo:row.carNo,
  223. compId:row.compId,
  224. contractNo:row.contractNo,
  225. goodsName:row.goodsName,
  226. goodsNameKey:row.goodsNameKey,
  227. grade:row.grade,
  228. grossWeight:row.grossWeight,
  229. inOutDate:row.inOutDate,
  230. inOutFlag:row.inOutFlag,
  231. inOutType:row.inOutType,
  232. inOutTypeKey:row.inOutTypeKey,
  233. netWeight:row.netWeight,
  234. positionId: row.positionId,
  235. statusFlag:row.statusFlag,
  236. tare:row.tare,
  237. warehouseName: row.warehouseName,
  238. warehouseInOutDetail:row.warehouseInOutDetail,
  239. warehouseType: this.deptBudgetList.warehouseType
  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. }
  271. })
  272. }
  273. },
  274. dateFormat(fmt, date) {
  275. let ret
  276. const opt = {
  277. 'Y+': date.getFullYear().toString(), // 年
  278. 'm+': (date.getMonth() + 1).toString(), // 月
  279. 'd+': date.getDate().toString(), // 日
  280. 'H+': date.getHours().toString(), // 时
  281. // "M+": date.getMinutes().toString(), // 分
  282. // "S+": date.getSeconds().toString() // 秒
  283. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  284. }
  285. for (let k in opt) {
  286. ret = new RegExp('(' + k + ')').exec(fmt)
  287. if (ret) {
  288. fmt = fmt.replace(
  289. ret[1],
  290. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  291. )
  292. }
  293. }
  294. return fmt
  295. },
  296. handleClose() {
  297. this.accessoryTFs = false
  298. },
  299. handleSizeChange(val) {
  300. console.log(`每页 ${val} 条`)
  301. this.pageSize = val
  302. this.getList()
  303. },
  304. handleCurrentChange(val) {
  305. this.currentPage = val
  306. console.log(`当前页: ${val}`)
  307. this.getList()
  308. },
  309. //收
  310. getList(id, id1,id2) {
  311. if(id2==1){
  312. complete({
  313. // compId: sessionStorage.getItem('ws-pf_compId'),
  314. baseId: id,
  315. positionId: id1,
  316. pageSize: this.pageSize,
  317. currentPage: this.currentPage,
  318. // inOutDate:this.inOutDate
  319. })
  320. .toPromise()
  321. .then((response) => {
  322. this.improved = response
  323. })
  324. }else if(id2==2){
  325. completeList({
  326. baseId: id,
  327. positionId: id1,
  328. pageSize: this.pageSize,
  329. currentPage: this.currentPage,
  330. })
  331. .toPromise()
  332. .then((response) => {
  333. this.improved = response
  334. })
  335. }
  336. },
  337. handleExamine(row) {
  338. this.$router.push({
  339. name: 'salesContractExamine',
  340. query: { id: row.id },
  341. })
  342. },
  343. //删除
  344. handleDelete(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,this.$route.query.warehouseType)
  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>