warehouseManagementDelete.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. //删除仓库
  2. <template>
  3. <<<<<<< HEAD
  4. <div class="homepage">
  5. =======
  6. <div class="homepage">
  7. >>>>>>> d4735dcb0df4848656d61f1789e8f8d7efc5fd5a
  8. <el-row>
  9. <el-col :span="20">
  10. <h2 class="bg-left title">删除库房</h2>
  11. </el-col>
  12. <el-col :span="4" class="bg-right">
  13. <el-button
  14. class="bg-bottom"
  15. type="primary"
  16. size="small"
  17. @click="returnWarehouse()"
  18. ><img
  19. width="6"
  20. height="10"
  21. style="vertical-align: bottom; margin-right: 3px"
  22. src="../../../public/img/lujing.png"
  23. alt=""
  24. />返回</el-button
  25. >
  26. </el-col>
  27. </el-row>
  28. <div class="connert">
  29. <el-table
  30. class="wenzi"
  31. :data="warehouseList"
  32. style="width: 100%; margin-top: 20px"
  33. height="780"
  34. >
  35. <el-table-column type="index" label="序号">
  36. <template scope="scope">
  37. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  38. <span v-else>{{ scope.$index + 1 }}</span>
  39. </template>
  40. </el-table-column>
  41. <el-table-column prop="warehouseName" label="仓库名称">
  42. </el-table-column>
  43. <el-table-column prop="warehouseLocation" label="仓库所在地">
  44. </el-table-column>
  45. <el-table-column prop="nowStorage" label="应余库存(吨)">
  46. </el-table-column>
  47. <el-table-column prop="personCharge;" label="负责人"> </el-table-column>
  48. <el-table-column prop="address" label="操作" width="200">
  49. <!-- <template slot-scope="scope">
  50. <ws-button
  51. type="primary"
  52. @click="handleHide(scope.row)"
  53. v-hasPermission="
  54. `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
  55. "
  56. v-if="scope.row.showFlag == 0"
  57. >显示</ws-button
  58. >
  59. <ws-button
  60. type="primary"
  61. @click="handleHide(scope.row)"
  62. v-hasPermission="
  63. `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
  64. "
  65. v-if="scope.row.showFlag == 1"
  66. >隐藏</ws-button
  67. >
  68. <ws-button
  69. type="primary"
  70. @click="handleDelete(sv-ifcope.row)"
  71. v-hasPermission="
  72. `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
  73. "
  74. >删除</ws-button
  75. >
  76. </template> -->
  77. <template slot-scope="scope">
  78. <div class="record" v-if="scope.row.showFlag == 0" @click="handleHide(scope.row)">显示</div>
  79. <div class="record" v-if="scope.row.showFlag == 1" @click="handleHide(scope.row)">隐藏</div>
  80. <div class="adjustment" @click="handleDelete(scope.row)">删除</div>
  81. </template>
  82. </el-table-column>
  83. </el-table>
  84. </div>
  85. </div>
  86. </template>
  87. <script>
  88. import {
  89. getList,
  90. delectlist,
  91. deletewarehouse,
  92. hide,
  93. } from '@/model/warehouse/index'
  94. import { downloadFile } from '@/utils/batchDown'
  95. import Pagination from '@/components/Pagination'
  96. import WsUpload from '@/components/WsUpload'
  97. import { dayjs, fmoney, EventBus } from 'base-core-lib'
  98. export default {
  99. name: 'viewSpareMoney',
  100. components: {
  101. WsUpload,
  102. Pagination,
  103. },
  104. watch: {
  105. vesselId(val) {
  106. this.getList()
  107. },
  108. isShow(val) {
  109. this.showType = val
  110. },
  111. },
  112. data() {
  113. return {
  114. isshow: false,
  115. //弹出框
  116. dialogViewSpareMoney: false,
  117. dialogApproveFormVisible: false,
  118. // 船舶类型
  119. monetaryKey: null,
  120. // 表格显示数据
  121. tableDate: [],
  122. // 是否显示
  123. showType: true,
  124. // 年
  125. year: '',
  126. deptBudgetTotal: 0,
  127. currentPage: 1,
  128. pageSize: 10,
  129. searchType: 1,
  130. searchKeyWord: '',
  131. contractType: 2,
  132. startDate: null,
  133. endDate: null,
  134. warehouseList: [],
  135. scope: [],
  136. show: '隐藏',
  137. // 提交类型
  138. submitType: true,
  139. size: 10,
  140. compId: sessionStorage.getItem('ws-pf_compId'),
  141. deptCircularPage: {},
  142. date: {
  143. year: dayjs().format('YYYY'),
  144. month: dayjs().format('MM'),
  145. },
  146. contractList: [],
  147. deptBudgetList: {},
  148. historyList: [],
  149. pickerBeginDateBefore: {
  150. disabledDate: (time) => {
  151. return time.getTime() > Date.now()
  152. },
  153. },
  154. accessoryTFs: false,
  155. }
  156. },
  157. activated() {
  158. this.getList()
  159. this.showType = this.isShow
  160. },
  161. methods: {
  162. returnWarehouse() {
  163. this.$router.push({ path: 'warehouseManagementList' })
  164. },
  165. //列表
  166. getList() {
  167. delectlist({
  168. compId: sessionStorage.getItem('ws-pf_compId'),
  169. })
  170. .toPromise()
  171. .then((response) => {
  172. this.warehouseList = response
  173. })
  174. },
  175. handleExamine(row) {
  176. this.$router.push({
  177. name: 'salesContractExamine',
  178. query: { id: row.id },
  179. })
  180. },
  181. // 关闭 dialog时 处理文件url 初始化upload组件
  182. handleCloe() {
  183. this.dialogViewSpareMoney = false
  184. },
  185. //隐藏
  186. handleHide(row) {
  187. if (row.showFlag == 1) {
  188. this.$confirm(`隐藏后将对其他用户不可见,是否确认隐藏`, {
  189. cancelButtonText: '取消',
  190. confirmButtonText: '确定',
  191. type: 'warning',
  192. })
  193. .then(() => {
  194. hide({ id: row.id })
  195. .toPromise()
  196. .then((response) => {
  197. this.$notify.success({
  198. title: '成功',
  199. message: '隐藏成功',
  200. })
  201. this.getList()
  202. })
  203. .catch((response) => {
  204. // console.log(3333)
  205. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  206. })
  207. })
  208. .catch(() => {
  209. return false
  210. })
  211. } else {
  212. hide({ id: row.id })
  213. .toPromise()
  214. .then((response) => {
  215. this.$notify.success({
  216. title: '成功',
  217. message: '显示成功',
  218. })
  219. this.getList()
  220. })
  221. .catch((response) => {
  222. // console.log(3333)
  223. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  224. })
  225. }
  226. },
  227. },
  228. handleDelete(row) {
  229. // console.log(row)
  230. this.$confirm(`此操作永久删除该仓库全部信息,是否确认删除`, {
  231. cancelButtonText: '取消',
  232. confirmButtonText: '确定',
  233. type: 'warning',
  234. })
  235. .then(() => {
  236. deletewarehouse({ id: row.id })
  237. .toPromise()
  238. .then((response) => {
  239. this.$notify.success({
  240. title: '成功',
  241. message: '删除成功',
  242. })
  243. this.getList()
  244. })
  245. .catch((response) => {
  246. // console.log(3333)
  247. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  248. })
  249. })
  250. .catch(() => {
  251. return false
  252. })
  253. },
  254. // deletecontract(){},
  255. //删除
  256. approve() {},
  257. listQuery() {},
  258. total() {},
  259. clearfiltQuery() {},
  260. selectCrtDuty() {},
  261. delectlist() {},
  262. deletewarehouse() {},
  263. }
  264. </script>
  265. <style lang="scss" scoped>
  266. /deep/.totalStorage .el-input__inner {
  267. color: #afb5cb;
  268. background: #f5f7fa;
  269. }
  270. .add,
  271. .del {
  272. position: absolute;
  273. right: -38px;
  274. top: 9px;
  275. cursor: pointer;
  276. }
  277. .del {
  278. right: -70px;
  279. }
  280. .amap-page-container {
  281. width: 300px;
  282. height: 300px;
  283. }
  284. .el-form {
  285. padding: 0 15%;
  286. }
  287. .readonly {
  288. position: relative;
  289. }
  290. .readonly:after {
  291. content: '*';
  292. color: #ff2727;
  293. position: absolute;
  294. right: 8px;
  295. z-index: 10;
  296. top: 21%;
  297. font-size: 20px;
  298. }
  299. .title {
  300. position: relative;
  301. }
  302. .title::before {
  303. content: '';
  304. display: inline-block;
  305. width: 5px;
  306. height: 30px;
  307. background: #5473e8;
  308. position: absolute;
  309. left: 0;
  310. }
  311. .ws-info-table {
  312. border-left: 1px solid transparent;
  313. border-top: 1px solid transparent;
  314. }
  315. .el-button--primary {
  316. background-color: #5878e8;
  317. border-color: #5878e8;
  318. }
  319. .el-col {
  320. background: #f6f7fc;
  321. }
  322. /deep/.el-table .el-table__header .cell,
  323. /deep/.el-table .el-table__body .cell {
  324. text-align: center;
  325. }
  326. .button-container {
  327. display: flex;
  328. flex-wrap: nowrap;
  329. justify-content: space-between;
  330. align-items: center;
  331. background-color: #fff;
  332. width: 100%;
  333. height: 50px;
  334. padding: 0 10px;
  335. & > div {
  336. margin-left: 10px;
  337. display: flex;
  338. flex-wrap: nowrap;
  339. flex-direction: row;
  340. & > span {
  341. line-height: 50px;
  342. }
  343. }
  344. /deep/.auditFlow-box {
  345. position: unset;
  346. margin-left: 10px;
  347. &/deep/.auditFlow-icon {
  348. width: auto;
  349. padding-right: 30px;
  350. }
  351. &/deep/.auditFlow-main {
  352. position: absolute;
  353. }
  354. }
  355. }
  356. .box-app {
  357. display: inline-block;
  358. float: left;
  359. margin-left: 30px;
  360. line-height: 50px;
  361. }
  362. /deep/.el-dialog {
  363. .el-form-item {
  364. margin-bottom: 0 !important;
  365. .el-input--medium {
  366. textarea {
  367. min-height: 100px !important;
  368. }
  369. }
  370. }
  371. }
  372. .collapse-bottom {
  373. margin-bottom: 20px;
  374. }
  375. .input-main .textarea .el-textarea__inner {
  376. width: 100%;
  377. z-index: 1;
  378. }
  379. .bg-left {
  380. padding-left: 30px;
  381. }
  382. .bg-right {
  383. padding-right: 10px;
  384. text-align: right;
  385. }
  386. .bg-bottom {
  387. margin: 15px 0px;
  388. }
  389. .wenzi {
  390. width: 900px;
  391. margin: 0 auto;
  392. }
  393. .wenzi h3 {
  394. display: inline-block;
  395. left: 10px;
  396. }
  397. .wenzi p {
  398. display: inline-block;
  399. }
  400. .center {
  401. width: 900px;
  402. margin: 0 auto;
  403. }
  404. .el-form-item {
  405. width: 50%;
  406. }
  407. .el-form-item__label {
  408. text-align: center;
  409. }
  410. .ce {
  411. width: 900px;
  412. margin: 0 auto;
  413. }
  414. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  415. /* height: 82px;*/
  416. /*}*/
  417. // 控制select为只读的时候显示样式
  418. .hide-sel {
  419. .el-input__inner {
  420. border: 0px;
  421. }
  422. .el-icon-arrow-up {
  423. display: none;
  424. }
  425. .el-textarea__inner {
  426. background-color: #fff !important;
  427. border: 0;
  428. }
  429. .el-date-editor {
  430. i {
  431. display: none;
  432. }
  433. }
  434. .is-disabled {
  435. .el-input__inner:hover {
  436. background-color: #fff !important;
  437. border: 0;
  438. }
  439. color: #606266;
  440. .el-input__inner {
  441. background-color: #fff !important;
  442. border: 0;
  443. color: #606266;
  444. }
  445. .el-textarea__inner {
  446. background-color: #fff !important;
  447. border: 0;
  448. color: #606266;
  449. }
  450. }
  451. }
  452. // 控制select为只读的时候显示样式
  453. /deep/.ws-class-table-col {
  454. height: auto;
  455. padding: 0px 2px;
  456. /deep/.el-input__inner {
  457. padding: 0px 2px;
  458. }
  459. }
  460. /deep/.is-disabled {
  461. .el-input__prefix,
  462. .el-input__suffix {
  463. display: none;
  464. }
  465. .el-input__inner {
  466. background-color: #fff;
  467. border-color: #fff !important;
  468. color: #000 !important;
  469. font-size: 14px;
  470. cursor: text;
  471. padding: 0 !important;
  472. }
  473. }
  474. .winseaview-view {
  475. padding: 0 0 20px;
  476. }
  477. .container {
  478. overflow: scroll;
  479. height: 93vh;
  480. }
  481. .ws-info-table .el-form-item {
  482. width: 33.3333%;
  483. }
  484. .readonly:after {
  485. display: none;
  486. }
  487. .el-textarea__inner {
  488. display: none;
  489. }
  490. .el-form {
  491. margin-top: 50px;
  492. }
  493. .readonly {
  494. width: 16%;
  495. }
  496. .ws-info-table .el-form-item {
  497. width: 33.33%;
  498. }
  499. //去边框
  500. /deep/.el-form-item {
  501. border-right: 0px;
  502. border-bottom: 0px;
  503. }
  504. /deep/.ws-info-table {
  505. border-left: 0px;
  506. border-top: 0px;
  507. }
  508. .connert {
  509. padding: 10px 40px;
  510. }
  511. //表格文字居中
  512. /deep/.el-table th.is-leaf,
  513. /deep/.el-table td {
  514. text-align: center;
  515. }
  516. //表格数据文字
  517. /deep/.el-table .el-table__body .cell {
  518. font-size: 14px;
  519. }
  520. .record,
  521. .adjustment {
  522. display: inline-block;
  523. color: #5878e8;
  524. padding: 0 4px !important;
  525. position: relative;
  526. }
  527. .record:after {
  528. position: absolute;
  529. content: '';
  530. display: block;
  531. top: 5px;
  532. right: -2px;
  533. width: 1px;
  534. height: 12px;
  535. background: #e9ecf7;
  536. }
  537. </style>