index.vue 26 KB

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