index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762
  1. <template>
  2. <div class="winseaview-top" id="winseaview-top">
  3. <div class="top-bar__left">
  4. <!-- 伸缩icon -->
  5. <div class="winseaview-breadcrumb" :class="[{ 'winseaview-breadcrumb--active': isCollapse }]">
  6. <i class="iconfont icon-shouqi" @click="setCollapse"></i>
  7. </div>
  8. <!-- </div>
  9. <div class="top-bar__title"> -->
  10. <!-- 面包屑 -->
  11. <div class="top-bar__item top-bar__item--show">
  12. <top-menu v-if="showMenu"></top-menu>
  13. <bread-crumb v-if="!showMenu" />
  14. <smallTips v-if="showTooltip" />
  15. </div>
  16. <span class="top-bar__item" v-if="showSearch">
  17. <top-search></top-search>
  18. </span>
  19. </div>
  20. <div class="top-bar__right">
  21. <!-- 使用租户 -->
  22. <div class="hidden-content">
  23. <el-input ref="hiddenFocus" type="password" class="input-Style" v-model="barCode" size="small" @focus="focus" @blur="blur"
  24. @keyup.enter.native="payCode" placeholder="扫码枪内容"></el-input>
  25. <div v-show="isOpenCodeGun">扫码枪已连接</div>
  26. <div v-show="!isOpenCodeGun" @click="setCodeGun">点我扫码</div>
  27. <!-- -->
  28. <el-dialog title="扫描二维码" :visible.sync="smAlert" width="200px374a8a02ecfe40dc9abdcd902dd564f5
  29. ">
  30. <div class="btn-list">
  31. <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.initial`"
  32. v-if="btnStatus.status1||btnStatus.status2" @click="goToPage(1)" class="btn_css">去初检
  33. </el-button>
  34. <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.con`"
  35. v-if="btnStatus.status3||btnStatus.status4" v-show="toPageData.qualityInspectionManagement.confirm != '1'" @click="goToPage(2)" class="btn_css">去确认质检
  36. </el-button>
  37. <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.again`"
  38. v-if="btnStatus.status1||btnStatus.status2||btnStatus.status3||btnStatus.status4" v-show="toPageData.qualityInspectionManagement.confirm != '1'" @click="goToPage(3)" class="btn_css">去复检
  39. </el-button>
  40. <el-button v-hasPermission="`acquisitionManagement.acquisitionWeight.mao`"
  41. v-if="btnStatus.status1||btnStatus.status2||btnStatus.status3" @click="goToPage(4)" class="btn_css">去称毛重
  42. </el-button>
  43. <el-button v-hasPermission="`acquisitionManagement.acquisitionPay.add`" v-if="btnStatus.status5"
  44. @click="goToPage(5)" class="btn_css">去结算</el-button>
  45. <el-button v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`"
  46. v-if="btnStatus.status2||btnStatus.status3||btnStatus.status4||btnStatus.status5" @click="goToPage(6)" v-show="toPageData.qualityInspectionManagement.confirm != '1'" class="btn_css">去称皮重
  47. </el-button>
  48. <el-button @click="smAlert = false" class="btn" >关闭</el-button>
  49. </div>
  50. </el-dialog>
  51. </div>
  52. <div >
  53. <span style="padding: 0 4px;font-size:15px;position:relative;top:-5px;">{{compName}}</span>
  54. </div>
  55. <div v-if="getDay" class="right-menu-item hover-effect dayClass">
  56. {{ $t('common.trialDays') }}
  57. <span style="padding: 0 2px">{{ getDay }}</span>{{ $t('common.days') }}
  58. </div>
  59. <el-tooltip v-if="showColor" effect="dark" :content="$t('navbar.color')" placement="bottom">
  60. <div class="top-bar__item">
  61. <top-color></top-color>
  62. </div>
  63. </el-tooltip>
  64. <el-tooltip v-if="showTheme" effect="dark" :hide-after="1500" :content="$t('navbar.theme')" placement="bottom">
  65. <div class="top-bar__item top-bar__item--show">
  66. <top-theme></top-theme>
  67. </div>
  68. </el-tooltip>
  69. <!-- <el-tooltip effect="dark"
  70. :content="$t('navbar.language')"
  71. placement="bottom">
  72. <div class="top-bar__item top-bar__item--show">
  73. <top-lang></top-lang>
  74. </div>
  75. </el-tooltip> -->
  76. <el-tooltip v-if="showFullScren" effect="dark" :content="
  77. isFullScren ? $t('navbar.screenfull') : $t('navbar.screenfullF')
  78. " placement="bottom">
  79. <div class="top-bar__item">
  80. <i :class="isFullScren ? 'el-icon-full-screen' : 'el-icon-full-screen'" @click="handleScreen"></i>
  81. </div>
  82. </el-tooltip>
  83. <img class="top-bar__img" v-lazy="userInfo.avatar" />
  84. <el-dropdown>
  85. <span class="el-dropdown-link">
  86. <span>{{ userInfo.showRoleName }} : {{ userInfo.staffName }}</span>
  87. <i class="el-icon-arrow-down el-icon--right"></i>
  88. </span>
  89. <el-dropdown-menu slot="dropdown">
  90. <el-dropdown-item icon="el-icon-s-custom" @click.native="personalFlag = true">
  91. {{ $t('navbar.personalInformation') }}
  92. </el-dropdown-item>
  93. <el-dropdown-item icon="el-icon-s-promotion" @click.native="passwordFlag = true">
  94. {{ $t('navbar.uploadPsw') }}
  95. </el-dropdown-item>
  96. <!-- <el-dropdown-item>
  97. <router-link to="/info/index">{{$t('navbar.userinfo')}}</router-link>
  98. </el-dropdown-item> -->
  99. <el-dropdown-item v-if="showSetting" icon="el-icon-s-tools" @click.native="settingDrawer = true">
  100. {{ $t('navbar.layoutSetting') }}
  101. </el-dropdown-item>
  102. <el-dropdown-item @click.native="logout" divided>{{
  103. $t('navbar.logOut')
  104. }}</el-dropdown-item>
  105. </el-dropdown-menu>
  106. </el-dropdown>
  107. </div>
  108. <topSetting v-model="settingDrawer" @close="() => (settingDrawer = !settingDrawer)" />
  109. <!--个人信息-->
  110. <WinseaContentModal v-model="personalFlag" :title="$t('navbar.personalInformation')">
  111. <el-form ref="personalMsg" :model="passwordMsg" label-position="right" label-width="150px">
  112. <el-form-item :label="$t('login.name')" prop="originalPassword">
  113. {{ userInfo.staffName }}
  114. </el-form-item>
  115. <el-form-item :label="$t('login.account')" prop="newPassword">
  116. {{ account }}
  117. </el-form-item>
  118. <el-form-item :label="$t('login.phone')" prop="newPassword">
  119. {{ userInfo.staffMobilePhone }}
  120. </el-form-item>
  121. <el-form-item :label="$t('login.role')" prop="newPassword">
  122. {{ userInfo.showRoleName }}
  123. </el-form-item>
  124. <el-form-item :label="$t('login.dept')" prop="newPassword">
  125. {{ userInfo.deptName }}
  126. </el-form-item>
  127. <el-form-item :label="$t('login.company')" prop="newPassword">
  128. <div class="company-info">
  129. {{ userInfo.compName }}
  130. </div>
  131. </el-form-item>
  132. </el-form>
  133. </WinseaContentModal>
  134. <!--修改密码-->
  135. <WinseaContentModal v-model="passwordFlag" :title="$t('navbar.uploadPsw')">
  136. <el-form ref="passwordMsg" :model="passwordMsg" :label-width="language == 'en' ? '156px' : '100px'"
  137. :rules="passwordMsgRules">
  138. <el-form-item :label="$t('login.originalPassword') + $t('common.colon')" prop="originalPassword">
  139. <ws-input type="password" :placeholder="$t('login.message04')" v-model="passwordMsg.originalPassword"
  140. style="width: 318px" />
  141. </el-form-item>
  142. <el-form-item :label="$t('login.newPassword') + $t('common.colon')" prop="newPassword">
  143. <ws-input type="password" v-model="passwordMsg.newPassword" :placeholder="$t('login.verification01')"
  144. style="width: 318px" />
  145. </el-form-item>
  146. <el-form-item :label="$t('login.confirmPassword') + $t('common.colon')" prop="password">
  147. <ws-input type="password" v-model="passwordMsg.password" :placeholder="$t('login.verification01')"
  148. style="width: 318px" />
  149. </el-form-item>
  150. </el-form>
  151. <span slot="footer" class="dialog-footer">
  152. <ws-button @click="passwordFlag = false">{{
  153. $t('showMessage.cancel')
  154. }}</ws-button>
  155. <ws-button type="primary" @click="savePassword('passwordMsg')">{{
  156. $t('showMessage.confirm')
  157. }}</ws-button>
  158. </span>
  159. </WinseaContentModal>
  160. </div>
  161. </template>
  162. <script>
  163. import {
  164. changePasswordByPwd
  165. } from '@/model/indexRx'
  166. import {
  167. mapActions,
  168. mapGetters,
  169. mapState
  170. } from 'vuex'
  171. import {
  172. fullscreenToggel,
  173. listenfullscreen
  174. } from '@/utils/util'
  175. import topMenu from './top-menu'
  176. import topSearch from './top-search'
  177. import topTheme from './top-theme'
  178. import topColor from './top-color'
  179. import topNotice from './top-notice'
  180. import topLang from './top-lang'
  181. import topSetting from './top-setting'
  182. import breadCrumb from '@/components/Breadcrumb'
  183. import {
  184. EventBus
  185. } from 'base-core-lib'
  186. import {
  187. validPassword
  188. } from '@/utils/validate'
  189. import smallTips from '@/components/WinseaCom/smallTips'
  190. import {
  191. getLook
  192. } from '@/model/warehouse/index'
  193. import {
  194. getQRCodeData
  195. } from '@/model/houseSelfCollect/index'
  196. const validPasswordRule = function(rule, value, callback) {
  197. if (!validPassword(value)) {
  198. callback(new Error(this.$t('login.verification01')))
  199. } else {
  200. callback()
  201. }
  202. }
  203. const validPasswordRule2 = function(rule, value, callback) {
  204. if (!value) {
  205. callback(new Error(this.$t('login.verification02')))
  206. } else if (value !== this.passwordMsg.newPassword) {
  207. callback(new Error(this.$t('login.verification03')))
  208. } else {
  209. callback()
  210. }
  211. }
  212. export default {
  213. components: {
  214. topMenu,
  215. topSearch,
  216. topTheme,
  217. topColor,
  218. topNotice,
  219. topLang,
  220. topSetting,
  221. breadCrumb,
  222. smallTips,
  223. },
  224. name: 'top',
  225. data() {
  226. return {
  227. //status1:已初检未称毛重状态 status2:已初检且已称毛重状态 status3:已复检且已称毛重 status4:已复检且已称皮重状态
  228. //status5:已确认质检且已称皮重且未结算状态 status6:已结算状态
  229. btnStatus: {
  230. status1: false,
  231. status2: false,
  232. status3: false,
  233. status4: false,
  234. status5: false,
  235. status6: false,
  236. },
  237. toPageData: {},
  238. userINfo: {},
  239. barCode: '',
  240. isOpenCodeGun: false,
  241. smAlert: false,
  242. showList: [
  243. 'maintenancePlanList',
  244. 'maintenanceReportList',
  245. 'navigationMaterialList',
  246. 'protectionEntry',
  247. 'protection',
  248. 'newlyIncreased',
  249. 'clientEdit',
  250. 'staticDetail',
  251. 'maApplicationAdd',
  252. 'maApplicationEdit',
  253. 'maApplicationLabel',
  254. 'monthContrastList',
  255. ],
  256. settingDrawer: false,
  257. personalFlag: false,
  258. passwordFlag: false,
  259. passwordMsgRules: {
  260. originalPassword: [{
  261. required: true,
  262. message: ' ',
  263. trigger: 'blur'
  264. }],
  265. // newPassword: [
  266. // {
  267. // required: true,
  268. // trigger: 'blur',
  269. // validator: validPasswordRule.bind(this),
  270. // },
  271. // ],
  272. // password: [
  273. // {
  274. // required: true,
  275. // trigger: 'blur',
  276. // validator: validPasswordRule2.bind(this),
  277. // },
  278. // ],
  279. },
  280. passwordMsg: {
  281. originalPassword: '', // 原始密码
  282. newPassword: '', // 新密码
  283. password: '', // 二次输入密码
  284. },
  285. // roleName: '',
  286. // phone: '',
  287. // roleId: '',
  288. // deptName: '',
  289. // deptId: '',
  290. // staffName: '',
  291. account: localStorage.getItem('ws-pf_account'),
  292. compName: localStorage.getItem('ws-pf_compName'),
  293. companyId: localStorage.getItem('ws-pf_compId'),
  294. cangid:'',
  295. tmp:{},
  296. }
  297. },
  298. filters: {},
  299. created() {
  300. // this.getUserInfo()
  301. this.getUserWorseHouse();
  302. this.userINfo = {
  303. userCompany: localStorage.getItem('ws-pf_compId'),
  304. userName: localStorage.getItem('ws-pf_staffName'),
  305. }
  306. },
  307. mounted() {
  308. listenfullscreen(this.setScreen)
  309. },
  310. computed: {
  311. ...mapState({
  312. showDebug: (state) => state.commonStore.showDebug,
  313. showTheme: (state) => state.commonStore.showTheme,
  314. showLock: (state) => state.commonStore.showLock,
  315. showFullScren: (state) => state.commonStore.showFullScren,
  316. showCollapse: (state) => state.commonStore.showCollapse,
  317. showSearch: (state) => state.commonStore.showSearch,
  318. showSetting: (state) => state.commonStore.showSetting,
  319. showMenu: (state) => state.commonStore.showMenu,
  320. showColor: (state) => state.commonStore.showColor,
  321. }),
  322. ...mapGetters([
  323. 'userInfo',
  324. 'isFullScren',
  325. 'tagWel',
  326. 'tagList',
  327. 'isCollapse',
  328. 'tag',
  329. 'logsLen',
  330. 'logsFlag',
  331. 'language',
  332. ]),
  333. getDay() {
  334. const {
  335. statusFlag = -1, daysRemaining
  336. } =
  337. JSON.parse(localStorage.getItem('ws_login_getTenantInfoByUser')) || {}
  338. return statusFlag * 1 === 2 ? daysRemaining + '' : ''
  339. },
  340. showTooltip() {
  341. return this.showList.indexOf(this.$route.name) > -1 && !this.showMenu
  342. },
  343. },
  344. methods: {
  345. ...mapActions('common', ['setLocalVessels']),
  346. payCode() {
  347. console.log("input", this.barCode)
  348. this.btnStatus = {
  349. status1: false,
  350. status2: false,
  351. status3: false,
  352. status4: false,
  353. status5: false,
  354. status6: false,
  355. }
  356. // let _userCompId = "2710b21efc1e4393930c5dc800010dc4"
  357. // let _qualityNo = "SGRK202112140060003"
  358. let _userCompId = this.barCode.split('&')[0]
  359. let _qualityNo = this.barCode.split('&')[1]
  360. let _userHouseId = this.barCode.split('&')[2]
  361. this.cangid = this.barCode.split('&')[2]
  362. if(_userCompId.indexOf(",") != -1){
  363. _userCompId = _userCompId.split(",")[1]
  364. }
  365. this.tmp = {
  366. compId: _userCompId,
  367. number: _qualityNo,
  368. warehouseId: _userHouseId
  369. }
  370. this.barCode = ''
  371. debugger
  372. //判断当前账号公司是否是二维码上公司
  373. if (this.userINfo.userCompany != _userCompId) {
  374. this.$message.error('当前身份不可操作');
  375. return
  376. }
  377. //判断二维码上的仓库当前账号是否有权限操作
  378. this.getLook(this.cangid, this.userINfo.userName)
  379. },
  380. // 查看二维码仓库负责人
  381. async getLook(compId, userName) {
  382. await getLook({
  383. id: compId,
  384. })
  385. .toPromise()
  386. .then((response) => {
  387. if (response.otherPersonCharge.indexOf(userName) != -1 || response.personCharge == userName) {
  388. //扫码枪扫码后显示弹框
  389. this.getQRCodeData(this.tmp)
  390. }else{
  391. this.$message.error('当前身份不可操作');
  392. return
  393. }
  394. })
  395. },
  396. // 二维码获取数据
  397. async getQRCodeData(tmp) {
  398. await getQRCodeData(tmp)
  399. .toPromise()
  400. .then((response) => {
  401. this.toPageData = response
  402. // 处理按钮显示状态
  403. // this.btnStatus
  404. // 检斤状态
  405. let _status1 = response.status
  406. //质检状态
  407. let _status2 = response.qualityInspectionManagement.status
  408. // 付款状态
  409. let _status3 = response.paymentManagement?response.paymentManagement.status:''
  410. if (_status2 == '已初检' && _status1 == '已质检') {
  411. this.btnStatus.status1 = true
  412. } else if (_status2 == '已初检' && (_status1 == '已称毛重' || _status1 == '已质检')) {
  413. this.btnStatus.status2 = true
  414. } else if (_status2 == '已复检' && (_status1 == '已称毛重' || _status1 == '已质检')) {
  415. this.btnStatus.status3 = true
  416. } else if (_status2 == '已复检' && this.toPageData.qualityInspectionManagement.confirm != '1' && (_status1 == '已称皮重' || _status1 == '已质检')) {
  417. this.btnStatus.status4 = true
  418. } else if (_status2 == '已复检' && _status1 == '已称皮重' && _status3 == '待结算') {
  419. this.btnStatus.status5 = true
  420. } else if (_status3 == '已结算') {
  421. this.btnStatus.status6 = true
  422. }
  423. if (_status3 == '已结算') {
  424. this.$message.error('业务已完结');
  425. } else {
  426. this.smAlert = true
  427. }
  428. })
  429. },
  430. setCodeGun() {
  431. this.$refs['hiddenFocus'].focus()
  432. },
  433. focus() {
  434. console.log("当前焦点状态")
  435. this.isOpenCodeGun = true
  436. },
  437. blur() {
  438. console.log("当前已失去焦点状态")
  439. this.isOpenCodeGun = false
  440. },
  441. goToPage(type) {
  442. let _url = ''
  443. if (type === 1) {
  444. // this.toPageData
  445. this.$router.push({
  446. name: 'inspectInfo',
  447. query: {
  448. type: 3,
  449. cangid: this.cangid,
  450. id: this.toPageData.qualityInspectionManagement.id,
  451. warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
  452. count: 0,
  453. warehouseNo: 0,
  454. allowEdit:this.toPageData.warehouseBaseInfo.allowEdit,
  455. status:this.toPageData.status
  456. },
  457. })
  458. } else if (type === 2) {
  459. this.$router.push({
  460. name: 'inspectInfo',
  461. query: {
  462. type: 5,
  463. cangid: this.cangid,
  464. id: this.toPageData.qualityInspectionManagement.id,
  465. warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
  466. count: 0,
  467. warehouseNo: 0,
  468. allowEdit:this.toPageData.warehouseBaseInfo.allowEdit,
  469. status:this.toPageData.status
  470. },
  471. })
  472. } else if (type === 3) {
  473. this.$router.push({
  474. name: 'inspectInfo',
  475. query: {
  476. type: 4,
  477. cangid: this.cangid,
  478. id: this.toPageData.qualityInspectionManagement.id,
  479. warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
  480. count: 0,
  481. warehouseNo: 0,
  482. allowEdit:this.toPageData.warehouseBaseInfo.allowEdit,
  483. status:this.toPageData.status
  484. },
  485. })
  486. } else if (type === 4) {
  487. this.$router.push({
  488. name: 'weightCheck',
  489. query: {
  490. tpyeNo: 1,
  491. id: this.toPageData.id,
  492. number: this.toPageData.number,
  493. binNumber: this.toPageData.binNumber,
  494. customer: this.toPageData.customer,
  495. storageNumber: this.toPageData.storageNumber,
  496. carNumber: this.toPageData.carNumber,
  497. boxNo: this.toPageData.qualityInspectionManagement.boxNo,
  498. boxNoOther: this.toPageData.qualityInspectionManagement.boxNoOther,
  499. titleNo: this.toPageData.qualityInspectionManagement.titleNo,
  500. titleNoOther: this.toPageData.qualityInspectionManagement.titleNoOther,
  501. goodsName: this.toPageData.goodsName,
  502. grossWeight: this.toPageData.grossWeight,
  503. tare: this.toPageData.tare,
  504. netWeight: this.toPageData.netWeight,
  505. relationId: this.toPageData.relationId,
  506. warehouseId: this.cangid,
  507. monitorUrl1: this.toPageData.warehouseBaseInfo.monitorUrl1,
  508. monitorUrl2: this.toPageData.warehouseBaseInfo.monitorUrl2,
  509. allowEdit: this.toPageData.warehouseBaseInfo.allowEdit,
  510. cangid: this.cangid,
  511. warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
  512. paramType: this.toPageData.qualityInspectionManagement.paramType,
  513. customerNumberCard: this.toPageData.customerNumberCard,
  514. automaticWeightAcquisition: this.toPageData.automaticWeightAcquisition
  515. },
  516. })
  517. } else if (type === 5) {
  518. localStorage.setItem('paymentManagementReturn', false)
  519. this.$router.push({
  520. name: 'settlement',
  521. query: {
  522. type: 1,
  523. id: this.toPageData.paymentManagement.id,
  524. },
  525. })
  526. } else if (type === 6) {
  527. this.$router.push({
  528. name: 'weightCheck',
  529. query: {
  530. tpyeNo: 2,
  531. id: this.toPageData.id,
  532. number: this.toPageData.number,
  533. binNumber: this.toPageData.binNumber,
  534. customer: this.toPageData.customer,
  535. storageNumber: this.toPageData.storageNumber,
  536. carNumber: this.toPageData.carNumber,
  537. boxNo: this.toPageData.qualityInspectionManagement.boxNo,
  538. boxNoOther: this.toPageData.qualityInspectionManagement.boxNoOther,
  539. titleNo: this.toPageData.qualityInspectionManagement.titleNo,
  540. titleNoOther: this.toPageData.qualityInspectionManagement.titleNoOther,
  541. goodsName: this.toPageData.goodsName,
  542. grossWeight: this.toPageData.grossWeight,
  543. tare: this.toPageData.tare,
  544. netWeight: this.toPageData.netWeight,
  545. relationId: this.toPageData.relationId,
  546. warehouseId: this.cangid,
  547. monitorUrl1: this.toPageData.warehouseBaseInfo.monitorUrl1,
  548. monitorUrl2: this.toPageData.warehouseBaseInfo.monitorUrl2,
  549. allowEdit: this.toPageData.warehouseBaseInfo.allowEdit,
  550. cangid: this.cangid,
  551. warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
  552. paramType: this.toPageData.qualityInspectionManagement.paramType,
  553. customerNumberCard: this.toPageData.customerNumberCard,
  554. automaticWeightAcquisition: this.toPageData.automaticWeightAcquisition
  555. },
  556. })
  557. }
  558. this.smAlert = false
  559. },
  560. //获取当前用户管理的仓库
  561. getUserWorseHouse() {
  562. },
  563. handleScreen() {
  564. fullscreenToggel()
  565. },
  566. setCollapse() {
  567. this.$store.commit('SET_COLLAPSE')
  568. },
  569. setScreen() {
  570. this.$store.commit('SET_FULLSCREN')
  571. },
  572. cancelPaw() {
  573. this.$refs.passwordMsg.resetFields()
  574. },
  575. // 修改管理员密码
  576. savePassword(formName) {
  577. this.$refs[formName].validate((valid) => {
  578. if (valid) {
  579. const data = {
  580. originalPassword: this.passwordMsg.originalPassword,
  581. password: this.passwordMsg.password,
  582. }
  583. changePasswordByPwd(data)
  584. .toPromise()
  585. .then(() => {
  586. EventBus.$emit('success', this.$t('message.updateMessage'))
  587. this.passwordFlag = false
  588. })
  589. } else {
  590. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  591. return false
  592. }
  593. })
  594. },
  595. // async getUserInfo () {
  596. // this.staffName = this.userInfo.staffName
  597. // this.phone = this.userInfo.staffMobilePhone
  598. // this.deptName = this.userInfo.deptName
  599. // this.roleName = this.userInfo.showRoleName
  600. // this.roleId = this.userInfo.showRoleId
  601. // this.compName = this.userInfo.compName
  602. // },
  603. toggleSideBar() {
  604. this.$store.dispatch('app/toggleSideBar')
  605. },
  606. logout() {
  607. this.$confirm(this.$t('logoutTip'), this.$t('tip'), {
  608. confirmButtonText: this.$t('submitText'),
  609. cancelButtonText: this.$t('cancelText'),
  610. type: 'warning',
  611. }).then(async () => {
  612. localStorage.removeItem('ws-pf_roleName')
  613. localStorage.removeItem('ws-pf_roleId')
  614. localStorage.removeItem('ws-pf_staffName')
  615. localStorage.removeItem('ws-pf_deptId')
  616. localStorage.removeItem('ws-pf_deptName')
  617. localStorage.removeItem('ws-pf_organMonetaryKey')
  618. localStorage.removeItem('ws-pf_organMonetaryValue')
  619. localStorage.removeItem('ws-pf_vessels')
  620. localStorage.removeItem('ws-pf_isLandBasedFlag')
  621. await this.$store.dispatch('user/logout')
  622. this.$router.push(
  623. process.env.VUE_APP_PACKAGE_ENV === 'ship' ? '/ship_login' : '/login'
  624. )
  625. })
  626. },
  627. },
  628. }
  629. </script>
  630. <style lang="scss" scoped>
  631. .dayClass {
  632. font-size: 14px !important;
  633. span {
  634. font-weight: 600;
  635. font-size: 14px;
  636. color: #ff3838;
  637. }
  638. }
  639. .hamburger-container {
  640. line-height: 40px;
  641. height: 100%;
  642. float: left;
  643. cursor: pointer;
  644. transition: background 0.3s;
  645. -webkit-tap-highlight-color: transparent;
  646. &:hover {
  647. background: rgba(0, 0, 0, 0.025);
  648. }
  649. }
  650. .breadcrumb-container {
  651. float: left;
  652. position: relative;
  653. }
  654. .errLog-container {
  655. display: inline-block;
  656. vertical-align: top;
  657. }
  658. .right-menu {
  659. float: right;
  660. height: 100%;
  661. line-height: 40px;
  662. &:focus {
  663. outline: none;
  664. }
  665. .right-menu-item {
  666. display: inline-block;
  667. padding: 0 8px;
  668. height: 100%;
  669. font-size: 18px;
  670. color: #5a5e66;
  671. // vertical-align: text-bottom;
  672. &.hover-effect {
  673. cursor: pointer;
  674. transition: background 0.3s;
  675. &:hover {
  676. background: rgba(0, 0, 0, 0.025);
  677. }
  678. }
  679. }
  680. .avatar-container {
  681. margin-right: 30px;
  682. .avatar-wrapper {
  683. position: relative;
  684. span {
  685. height: 40px;
  686. line-height: 40px;
  687. font-size: 12px;
  688. }
  689. .user-avatar {
  690. cursor: pointer;
  691. width: 40px;
  692. height: 40px;
  693. border-radius: 10px;
  694. }
  695. .el-icon-caret-bottom {
  696. cursor: pointer;
  697. position: absolute;
  698. right: -20px;
  699. top: 15px;
  700. font-size: 12px;
  701. }
  702. }
  703. }
  704. }
  705. .hidden-content {
  706. display: flex;
  707. font-size: 16px;
  708. }
  709. .input-Style {
  710. opacity: 1;
  711. margin-right: 20px;
  712. // visibility: hidden;P
  713. }
  714. .btn {
  715. background: #5878e8;
  716. color: white;
  717. }
  718. .btn-list{
  719. display: flex;
  720. flex-direction: column;
  721. justify-content: center;
  722. align-items: center;
  723. }
  724. .btn_css ,.btn{
  725. width: 80%;
  726. margin: 20px;
  727. height: auto;
  728. padding: 20px!important;
  729. font-size: 40px;
  730. }
  731. </style>