shelfSet.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776
  1. <template>
  2. <view class="content">
  3. <u-navbar back-text="货架设置" :border-bottom="false" :background="{backgroundColor: $config('primaryColor')}"
  4. back-icon-color="#fff" :back-text-style="{ color: '#fff' }">
  5. <view slot='right' style="padding: 0 30upx;color: #ffffff;" @click="toPlRacking" v-if="shelfPlaceList">
  6. <u-icon name="piliangshangjia" custom-prefix="iscm-icon"></u-icon>
  7. <text style="margin-left: 6rpx;">批量上架</text>
  8. <u-badge v-if="showDot" :is-dot="true" size="mini" type="error"></u-badge>
  9. </view>
  10. </u-navbar>
  11. <view class="body-content flex flex_column">
  12. <view class="card-box" v-if="detailData">
  13. <view class="card-row flex align_center justify_between">
  14. <view class="label">货架名称:</view>
  15. <view class="text flex align_center justify_end"@click="editShelf">
  16. <text>{{detailData.shelfName}}</text>
  17. <u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
  18. </view>
  19. </view>
  20. <view class="card-row flex align_center justify_between">
  21. <view class="label">关联客户:</view>
  22. <view class="text flex align_center justify_end" @click="customeSet">
  23. <text>{{ (detailData&&detailData.customerEntity&&detailData.customerEntity.customerName) || '--' }}</text>
  24. <u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
  25. </view>
  26. </view>
  27. <view class="card-row align_center flex justify_between">
  28. <view class="label" @click="showTip(0)">价格权限设置 <u-icon color="#ffaa00"
  29. name="question-circle"></u-icon>:</view>
  30. <view class="text flex align_center justify_end" @click="openSetPriceShow">
  31. <view style="flex-grow: 1;">
  32. <view>货架产品:<text style="width: 80%;flex: 1;">{{showPriceStr.length ? showPriceStr.join("/") : '--'}}</text></view>
  33. <view>非货架产品:<text style="width: 80%;flex: 1;">{{showNonPriceStr.length ? showNonPriceStr.join("/") : '--'}}</text></view>
  34. </view>
  35. <u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
  36. </view>
  37. </view>
  38. <view class="card-row align_center flex justify_between" v-if="showMore">
  39. <view class="label">货架状态:</view>
  40. <view class="text flex align_center justify_end" @click="showEnableShelf=true">
  41. <text v-if="detailData">{{detailData.state == 'ENABLE'?'启用':'停用'}}</text>
  42. <u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
  43. </view>
  44. </view>
  45. <view class="card-row align_center flex justify_between" v-if="showMore">
  46. <view class="label">货架注销:</view>
  47. <view class="text">
  48. <u-button type="primary" size="mini" @click="showCancelShelf=true">注销</u-button>
  49. </view>
  50. </view>
  51. <view class="card-row align_center flex justify_between" v-if="showMore">
  52. <view class="label" @click="showTip(1)">是否设置完成<u-icon color="#ffaa00"
  53. name="question-circle"></u-icon>: </view>
  54. <view class="text"><u-switch :size="40" v-model="switchVal"
  55. @change="switchChange"></u-switch></view>
  56. </view>
  57. <view class="moreSeting" @click="showMore=!showMore">
  58. <text>{{!showMore?'更多设置':'收起'}}</text> <u-icon :name="showMore?'arrow-up':'arrow-down'"></u-icon>
  59. </view>
  60. </view>
  61. <!-- 货位信息 -->
  62. <view class="shelfPlace" :style="{height: scrollH+'px'}" v-if="shelfPlaceList">
  63. <view class="flex align_center shelfPlaceHead">
  64. <view class="lt"><text>□</text>表示没有绑定产品</view>
  65. <view class="search-btn flex align_center" @click="toSearchHw">
  66. <view><u-icon name="search"></u-icon><text>按产品搜索</text></view>
  67. <u-icon name="scan"></u-icon>
  68. </view>
  69. </view>
  70. <view class="flex shelfTabs">
  71. <view class="leftTabs">
  72. <view v-for="item in placeTab" :key="item" :class="curTab==item?'active':''"
  73. @click="tabChange(item)">{{item}}层</view>
  74. </view>
  75. <view class="rightCons flex flex_column">
  76. <view class="hwList flex_1">
  77. <text @click="editHw(item)" v-for="item in shelfPlaceList[curTab]"
  78. :key="item.shelfPlaceCode"
  79. :class="item.shelfProductApiEntity && item.shelfProductApiEntity.productSn?'':'red'">
  80. {{item.shelfPlaceCode}}
  81. </text>
  82. <text class="add" @click="addHw('add',1)"><u-icon name="plus"></u-icon></text>
  83. </view>
  84. <view class="hwAction flex justify_between">
  85. <u-button shape="circle" @click="tapPopup(1)" size="medium">打印贴签</u-button>
  86. <u-button class="newbtn" @click="tapPopup(2)" type='primary' shape="circle"
  87. size="medium">快速补货</u-button>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <view style="width: 100%;" v-else>
  93. <view class="nodata" v-if="!loading">
  94. <view>
  95. <u-image :src="`../../static/${$config('themePath')}/def_no_data@3x.png`" width="180"
  96. height="180" border-radius="10"></u-image>
  97. </view>
  98. <view class="flex">
  99. 暂无货位信息,请点击
  100. <view>
  101. <text @click="toPlRacking">批量上架</text>
  102. <u-badge :offset="[-6,-10]" v-if="showDot" :is-dot="true" size="mini"
  103. type="error"></u-badge>
  104. </view>
  105. </view>
  106. </view>
  107. <view class="nodata" v-else>
  108. <u-loadmore :load-text="$config('loadText')" status="loading" />
  109. </view>
  110. </view>
  111. </view>
  112. <!-- 设置价格显示弹框 -->
  113. <u-modal v-model="updateShowPrice" :show-cancel-button="true" title="价格权限设置" @confirm="savePriceSet">
  114. <view class="slot-content" style="padding: 1rem 1rem 1.5rem;text-align: center;">
  115. <view style="color: #999;font-size: 0.8rem;margin: 0.5rem;">提示:不勾选则不显示价格</view>
  116. <view style="text-align: left;font-size: 0.9rem;padding-left: 1rem;">货架产品:</view>
  117. <u-checkbox-group @change="priceSetChange">
  118. <u-checkbox v-for="item in showPrice" :key="item.paramCode" v-model="item.checked"
  119. :name="item.paramCode">{{item.text}}</u-checkbox>
  120. </u-checkbox-group>
  121. <view style="text-align: left;font-size: 0.9rem;padding-left: 1rem;margin-top: 0.5rem;">非货架产品:</view>
  122. <u-checkbox-group @change="nonPriceSetChange">
  123. <u-checkbox v-for="item in showNonPrice" :key="item.paramCode" v-model="item.checked"
  124. :name="item.paramCode">{{item.text}}</u-checkbox>
  125. </u-checkbox-group>
  126. </view>
  127. </u-modal>
  128. <!-- 启用禁用货架 -->
  129. <u-modal v-model="showEnableShelf" :show-cancel-button="true" title="货架状态" @confirm="enbaleShelf">
  130. <view class="slot-content" style="padding: 1rem 1rem 1.5rem;text-align: center;">
  131. <u-radio-group v-model="shelfStatus">
  132. <u-radio name="ENABLE">启用</u-radio>
  133. <u-radio name="DISABLED">停用</u-radio>
  134. </u-radio-group>
  135. </view>
  136. </u-modal>
  137. <!-- 注销货架 -->
  138. <u-popup v-model="showCancelShelf" mode="center" border-radius="14" length="80%">
  139. <view style="padding: 1rem;text-align: center;font-size: 1rem;">是否注销该数字货架?</view>
  140. <view class="slot-content" style="padding: 0 1rem 1rem;text-align: center;">
  141. 点击确定,该数字货架就不可做任何操作,用户不可登陆。
  142. </view>
  143. <view class="flex align_center justify_between" style="text-align: center;font-size: 1rem;">
  144. <view @click="cancelShelf" style="border: 1px solid #eee;border-right:0;border-bottom:0;width: 50%;padding: 0.6rem 0;color: dodgerblue;">确定</view>
  145. <view @click="showCancelShelf=false" style="border: 1px solid #eee;border-bottom:0;width: 50%;padding: 0.6rem 0;">取消</view>
  146. </view>
  147. </u-popup>
  148. </view>
  149. </template>
  150. <script>
  151. import {
  152. shelfDetail,
  153. shelfSave,
  154. modifFinishFlag,
  155. getProductPlace,
  156. getShelfPriceShow,
  157. updateShelfPriceShow,
  158. shelfModifState
  159. } from '@/api/shelf'
  160. import {
  161. shelfCartNotEmpty
  162. } from '@/api/shelfCart'
  163. import {
  164. createShelfReplenishBill
  165. } from '@/api/shelfReplenish'
  166. export default {
  167. components: {},
  168. data() {
  169. return {
  170. loading: false,
  171. shelfSn: null,
  172. detailData: null,
  173. switchVal: false,
  174. showMenus: false,
  175. scrollH: 400,
  176. popData: [{
  177. title: '快速补货',
  178. val: '0'
  179. }, {
  180. title: '打印贴签',
  181. val: '1'
  182. }],
  183. pleft: 0,
  184. ptop: 0,
  185. shelfPlaceList: null,
  186. placeTab: [],
  187. curTab: '',
  188. isLoad: false,
  189. webView: null,
  190. showDot: false,
  191. showPrice: [],
  192. showNonPrice:[],
  193. showPriceStr: [],
  194. showNonPriceStr:[],
  195. updateShowPrice: false,
  196. showPriceBak: [],
  197. showMore: false,
  198. showEnableShelf: false,
  199. shelfStatus: undefined,
  200. showCancelShelf: false
  201. }
  202. },
  203. watch: {
  204. showMore(a, b) {
  205. this.getScrollHeight(a)
  206. },
  207. },
  208. onLoad(option) {
  209. this.shelfSn = option.shelfSn
  210. // 获取货架详情
  211. this.getShelfDetal()
  212. // 获取货物
  213. this.getShelfPlace()
  214. this.isLoad = true
  215. // this.webView = this.$mp.page.$getAppWebview();
  216. uni.$on("editCustome", (data) => {
  217. this.isLoad = true
  218. this.saveShelf(data, 0)
  219. })
  220. uni.$on("editShelfName", (data) => {
  221. this.isLoad = true
  222. this.saveShelf(data, 1)
  223. })
  224. // const win = uni.getWindowInfo()
  225. // this.pleft = Math.floor(win.windowWidth * 0.3)
  226. // this.ptop = Math.floor(win.windowHeight - 70)
  227. this.getScrollHeight(this.showMore)
  228. console.log(this.shelfSn)
  229. },
  230. onUnload() {
  231. uni.$off("editCustome")
  232. uni.$off("editShelfName")
  233. },
  234. onShow() {
  235. if (!this.isLoad) {
  236. this.updateHw()
  237. }
  238. },
  239. methods: {
  240. getScrollHeight(a) {
  241. const sys = uni.getSystemInfoSync()
  242. const h = a ? 290 : 250
  243. if (sys.platform == 'android') {
  244. this.scrollH = sys.windowHeight - h
  245. } else {
  246. if (sys.safeArea.top) {
  247. this.scrollH = sys.windowHeight - h + sys.statusBarHeight - 34
  248. } else {
  249. this.scrollH = sys.windowHeight - h - 14
  250. }
  251. }
  252. },
  253. // 刷新货位
  254. updateHw() {
  255. this.placeTab = []
  256. this.shelfPlaceList = null
  257. this.getShelfPlace(true)
  258. },
  259. // 批量上架
  260. toPlRacking() {
  261. const url = this.showDot ? '/pages/batchShelves/cartList' : '/pages/batchShelves/index'
  262. uni.navigateTo({
  263. url: url + "?shelfSn=" + this.shelfSn + '&shelfName=' + this.detailData.shelfName +
  264. '&customerSn=' + this.detailData.customerSn
  265. })
  266. },
  267. // 更多操作
  268. tapPopup(e) {
  269. // 打印贴签
  270. if (e == 1) {
  271. if (this.hasNoBindPro()) {
  272. uni.navigateTo({
  273. url: "/pages/latePlay/chooseProduct?shelfSn=" + this.shelfSn + '&shelfName=' + this
  274. .detailData.shelfName
  275. })
  276. } else {
  277. uni.showModal({
  278. showCancel: false,
  279. confirmText: "好的",
  280. title: "提示",
  281. content: "所有货位都没有绑定产品,无法打印贴签!"
  282. })
  283. }
  284. }
  285. // 快速补货
  286. if (e == 2) {
  287. createShelfReplenishBill({
  288. shelfSn: this.shelfSn,
  289. enableFlag: 1
  290. }).then(res => {
  291. console.log(res.data)
  292. if (res.data && res.data.length) {
  293. const params = Object.assign(this.detailData, {
  294. list: res.data
  295. })
  296. this.$store.state.vuex_tempData = params
  297. uni.navigateTo({
  298. url: "/pages/shelfSetting/quickReplenish"
  299. })
  300. } else {
  301. uni.showModal({
  302. showCancel: false,
  303. confirmText: "好的",
  304. title: "提示",
  305. content: "没有需要补货的产品"
  306. })
  307. }
  308. })
  309. }
  310. },
  311. showTip(type) {
  312. uni.showModal({
  313. showCancel: false,
  314. confirmText: "好的",
  315. title: "提示",
  316. content: type ? "只有当数字货架的“是否设置完成”为“是”,系统才会自动对该货架生成补货单,修理厂才能正常下单。" :
  317. "不勾选则不显示价格,结算价:即易码通进货价"
  318. })
  319. },
  320. // 注销货架
  321. cancelShelf(){
  322. const params = {
  323. shelfSn: this.shelfSn,
  324. state: 'WRITE_OFF'
  325. }
  326. shelfModifState(params).then(res => {
  327. if(res.status == 200){
  328. this.toashMsg(res.message)
  329. this.showCancelShelf = false
  330. if(res.status == 200){
  331. uni.navigateBack()
  332. }
  333. }
  334. })
  335. },
  336. // 启用禁用货架
  337. enbaleShelf(){
  338. const params = {
  339. shelfSn: this.shelfSn,
  340. state: this.shelfStatus
  341. }
  342. shelfModifState(params).then(res => {
  343. this.toashMsg(res.message)
  344. this.showEnableShelf = false
  345. if(res.status == 200){
  346. this.getShelfDetal()
  347. }
  348. })
  349. },
  350. // 设置完成是否
  351. switchChange(v) {
  352. const params = {
  353. shelfSn: this.shelfSn,
  354. finishFlag: v ? '1' : '0'
  355. }
  356. modifFinishFlag(params).then(res => {
  357. if (res.status == 200) {
  358. uni.showToast({
  359. icon: 'none',
  360. title: res.message
  361. })
  362. }
  363. })
  364. },
  365. // 关联客户
  366. customeSet() {
  367. uni.navigateTo({
  368. url: "/pages/sales/chooseCustomer?backPage=shelfEdit&shelfName=" + this.detailData.shelfName
  369. })
  370. },
  371. // 修改货架名称
  372. editShelf() {
  373. uni.navigateTo({
  374. url: "/pages/shelfSetting/editShelf?shelfName=" + this.detailData.shelfName
  375. })
  376. },
  377. // 是否没有绑定任何产品
  378. hasNoBindPro() {
  379. let noBindPro = null;
  380. for (let i = 0; i < this.placeTab.length; i++) {
  381. noBindPro = this.shelfPlaceList[this.placeTab[i]].find(item => item.shelfProductApiEntity && item
  382. .shelfProductApiEntity.productSn);
  383. if (!!noBindPro) {
  384. break
  385. }
  386. }
  387. return !!noBindPro
  388. },
  389. // 按照产品搜索货位
  390. toSearchHw() {
  391. if (this.hasNoBindPro()) {
  392. uni.navigateTo({
  393. url: "/pages/shelfSetting/searchShelfHw?shelfName=" + this.detailData.shelfName +
  394. "&shelfSn=" + this.shelfSn
  395. })
  396. } else {
  397. uni.showModal({
  398. showCancel: false,
  399. confirmText: "好的",
  400. title: "提示",
  401. content: "所有货位都没有绑定产品,无法搜索!"
  402. })
  403. }
  404. },
  405. // 编辑货位
  406. editHw(item) {
  407. const hasProduct = item.shelfProductApiEntity && item.shelfProductApiEntity.productSn
  408. const type = hasProduct ? 'edit' : 'bind'
  409. const params = Object.assign(this.detailData, item)
  410. this.$store.state.vuex_tempData = params
  411. uni.navigateTo({
  412. url: "/pages/shelfSetting/editShelfHw?type=" + type
  413. })
  414. },
  415. // 新增货位
  416. addHw(type, flag) {
  417. let shelfPlaceCode = ''
  418. if (type == 'edit') {
  419. shelfPlaceCode = flag
  420. }
  421. if (type == 'add' && flag == 1) {
  422. const row = this.shelfPlaceList[this.curTab]
  423. const num = row[row.length - 1].shelfPlaceCode.replace(this.curTab, '')
  424. const nextNum = Number(num) + 1
  425. shelfPlaceCode = this.curTab + (nextNum < 10 ? '0' : '') + nextNum
  426. }
  427. const params = {
  428. customerSn: this.detailData.customerSn,
  429. shelfSn: this.detailData.shelfSn,
  430. id: this.detailData.id
  431. }
  432. uni.navigateTo({
  433. url: "/pages/shelfSetting/addShelfHw?detailData=" + encodeURIComponent(JSON.stringify(
  434. params)) + "&type=" + type + "&shelfPlaceCode=" + shelfPlaceCode
  435. })
  436. },
  437. // 保存数字货架基本信息
  438. saveShelf(data, type) {
  439. const params = {
  440. shelfSn: this.shelfSn
  441. }
  442. if (type == 1) {
  443. params.customerSn = this.detailData.customerSn
  444. params.shelfName = data.shelfName
  445. } else {
  446. params.customerSn = data.customerSn
  447. }
  448. shelfSave(params).then(res => {
  449. if (res.status == 200) {
  450. this.toashMsg(res.message)
  451. this.getShelfDetal()
  452. }
  453. })
  454. },
  455. // 获取价格显示设置
  456. getShelfPriceShow() {
  457. getShelfPriceShow({
  458. shelfSn: this.shelfSn
  459. }).then(res => {
  460. if (res.status == 200) {
  461. const ret = res.data && res.data
  462. this.showPriceBak = ret
  463. console.log(ret)
  464. this.formatPriceShow()
  465. }
  466. })
  467. },
  468. // 格式化价格显示
  469. checkPrice(item){
  470. if(item.paramCode.indexOf("non_")>=0){
  471. this.showNonPrice.push({
  472. paramCode: item.paramCode,
  473. paramValue: item.paramValue,
  474. text: item.paramCode == 'non_shelf_price_show' ? '车主价' : '结算价',
  475. checked: item.paramValue == 1
  476. })
  477. }else{
  478. this.showPrice.push({
  479. paramCode: item.paramCode,
  480. paramValue: item.paramValue,
  481. text: item.paramCode == 'shelf_price_show' ? '车主价' : '结算价',
  482. checked: item.paramValue == 1
  483. })
  484. }
  485. },
  486. formatPriceShow(){
  487. this.showPrice = []
  488. this.showPriceStr = []
  489. this.showNonPrice = []
  490. this.showNonPriceStr = []
  491. const a = this.showPriceBak.filter(item => item.paramCode.indexOf('shelf_price_show')>=0)
  492. const b = this.showPriceBak.filter(item => item.paramCode.indexOf('shelf_cost_show')>=0)
  493. a.map(item => {
  494. if (item.paramCode == 'shelf_price_show' && item.paramValue == 1) {
  495. this.showPriceStr.push("车主价")
  496. }
  497. if (item.paramCode == 'non_shelf_price_show' && item.paramValue == 1) {
  498. this.showNonPriceStr.push("车主价")
  499. }
  500. this.checkPrice(item)
  501. })
  502. b.map(item => {
  503. if (item.paramCode == 'shelf_cost_show' && item.paramValue == 1) {
  504. this.showPriceStr.push("结算价")
  505. }
  506. if (item.paramCode == 'non_shelf_cost_show' && item.paramValue == 1) {
  507. this.showNonPriceStr.push("结算价")
  508. }
  509. this.checkPrice(item)
  510. })
  511. },
  512. openSetPriceShow(){
  513. this.formatPriceShow()
  514. this.updateShowPrice = true
  515. },
  516. // 选择价格显示
  517. priceSetChange(e) {
  518. console.log(e)
  519. this.showPrice.map(item => {
  520. item.paramValue = e.includes(item.paramCode) ? 1 : 0
  521. })
  522. },
  523. nonPriceSetChange(e){
  524. this.showNonPrice.map(item => {
  525. item.paramValue = e.includes(item.paramCode) ? 1 : 0
  526. })
  527. },
  528. // 价格显示保存
  529. savePriceSet() {
  530. uni.showLoading({
  531. mask: true,
  532. title: '正在保存价格设置...'
  533. })
  534. // 更新价格显示
  535. updateShelfPriceShow({
  536. shelfSn: this.shelfSn,
  537. paramValue: [...this.showPrice,...this.showNonPrice]
  538. }).then(res => {
  539. if (res.status == 200) {
  540. this.getShelfPriceShow()
  541. this.toashMsg(res.message)
  542. }
  543. uni.hideLoading()
  544. })
  545. },
  546. getShelfDetal() {
  547. shelfDetail({
  548. sn: this.shelfSn
  549. }).then(res => {
  550. if (res.status == 200) {
  551. this.detailData = res.data
  552. this.switchVal = res.data.finishFlag == 1
  553. this.shelfStatus = res.data.state
  554. // 价格设置
  555. this.getShelfPriceShow()
  556. } else {
  557. this.detailData = null
  558. }
  559. })
  560. },
  561. getShelfPlace(flag) {
  562. this.loading = true
  563. getProductPlace({
  564. shelfSn: this.shelfSn
  565. }).then(res => {
  566. if (res.status == 200 && res.data) {
  567. this.shelfPlaceList = res.data
  568. // 获取层
  569. for (let a in res.data) {
  570. this.placeTab.push(a)
  571. }
  572. // 排序
  573. this.placeTab.sort(function(a, b) {
  574. return (a + '').localeCompare(b + '');
  575. });
  576. console.log(this.placeTab)
  577. if (!flag || !this.curTab) {
  578. this.curTab = this.placeTab[0]
  579. }
  580. if (this.placeTab.length == 0) {
  581. this.shelfPlaceList = null
  582. }
  583. } else {
  584. this.shelfPlaceList = null
  585. this.placeTab = []
  586. }
  587. // 是否有已录入的产品
  588. this.getHasCartNotEmpty()
  589. this.isLoad = false
  590. this.loading = false
  591. })
  592. },
  593. tabChange(item) {
  594. this.curTab = item
  595. },
  596. getHasCartNotEmpty() {
  597. shelfCartNotEmpty({
  598. shelfSn: this.shelfSn
  599. }).then(res => {
  600. this.showDot = res.data == 1
  601. })
  602. }
  603. }
  604. }
  605. </script>
  606. <style lang="less">
  607. .content {
  608. width: 100%;
  609. .nodata {
  610. padding: 100rpx 50rpx;
  611. text-align: center;
  612. display: flex;
  613. flex-direction: column;
  614. justify-content: center;
  615. align-items: center;
  616. >view {
  617. position: relative;
  618. padding: 10upx 0;
  619. text {
  620. color: #00aaff;
  621. margin-left: 10rpx;
  622. }
  623. }
  624. }
  625. .body-content {
  626. width: 100%;
  627. }
  628. .card-box {
  629. background-color: #fff;
  630. border-radius: 0.5rem;
  631. box-shadow: 0.1rem 0.2rem 0.3rem #eee;
  632. padding: 0 1rem;
  633. margin: 0.5rem;
  634. .card-row {
  635. border-bottom: 1rpx solid #eee;
  636. padding: 10rpx 0;
  637. min-height: 80rpx;
  638. &:last-child {
  639. border-bottom: 0;
  640. }
  641. .label{
  642. min-width: 30%;
  643. }
  644. .text {
  645. color: #666;
  646. flex-grow: 1;
  647. text-align: right;
  648. }
  649. }
  650. .moreSeting {
  651. text-align: center;
  652. color: #999;
  653. padding: 20upx;
  654. >text {
  655. margin-right: 10rpx;
  656. }
  657. }
  658. }
  659. .shelfPlace {
  660. height: calc(100% - 300rpx);
  661. .shelfPlaceHead {
  662. padding: 0.2rem 0.5rem 0.5rem;
  663. justify-content: space-between;
  664. .lt {
  665. font-size: 0.9rem;
  666. color: #999;
  667. text {
  668. color: #ff5500;
  669. font-size: 1rem;
  670. }
  671. }
  672. .search-btn {
  673. border: 1rpx solid #eee;
  674. border-radius: 50rpx;
  675. width: 50%;
  676. justify-content: space-between;
  677. padding: 0.3rem 0.5rem;
  678. color: #999;
  679. background-color: #fff;
  680. font-size: 0.9rem;
  681. &:active {
  682. opacity: 0.6;
  683. }
  684. }
  685. }
  686. .shelfTabs {
  687. height: calc(100% - 85rpx);
  688. .leftTabs {
  689. width: 20%;
  690. overflow: auto;
  691. >view {
  692. padding: 0.8rem 0.5rem;
  693. border-left: 0.2rem solid #f8f8f8;
  694. text-align: center;
  695. }
  696. .active {
  697. border-color: rgb(47, 126, 209);
  698. background-color: #fff;
  699. }
  700. }
  701. .rightCons {
  702. width: 80%;
  703. background-color: #fff;
  704. position: relative;
  705. .hwList {
  706. overflow: auto;
  707. padding: 0.5rem;
  708. padding-bottom: 105rpx;
  709. >text {
  710. border: 1rpx solid #eee;
  711. padding: 0.2rem 0.8rem;
  712. border-radius: 0.3rem;
  713. margin: 0.5rem 2%;
  714. float: left;
  715. width: 20%;
  716. text-align: center;
  717. }
  718. .red {
  719. border-color: #ff5500;
  720. }
  721. .add {
  722. border-style: dashed;
  723. border-color: #999;
  724. color: #999;
  725. }
  726. }
  727. .hwAction {
  728. padding: 0.5rem;
  729. position: fixed;
  730. bottom: 0;
  731. right: 0;
  732. width: 80%;
  733. background-color: #fff;
  734. button {
  735. width: 240rpx;
  736. }
  737. .newbtn {
  738. background-color: rgb(51, 95, 182);
  739. color: #fff;
  740. }
  741. }
  742. }
  743. }
  744. }
  745. }
  746. </style>