warehouseManagementNoComplete.vue 13 KB

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