warehouseManagementNoComplete.vue 13 KB

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