index.vue 28 KB

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