index.vue 27 KB

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