diff --git a/common/style/layout.styl b/common/style/layout.styl index 57475e4..5f9c929 100644 --- a/common/style/layout.styl +++ b/common/style/layout.styl @@ -133,7 +133,7 @@ uni-button:after { box-shadow: 0px 3px 3px 0px rgba(160,160,160,0.20); } .zd_wrapper-1 { - padding: 0 14rpx; + padding: 0 14rpx 14rpx 14rpx; border-radius: 0; } .zd_wrapper-2 { @@ -160,7 +160,7 @@ uni-button:after { .filter_label { // display: block; // width: 140rpx; - line-height: 80rpx; + line-height: 54rpx; font-size: 28rpx; color: #323232; // text-align:justify; diff --git a/pages.json b/pages.json index b087286..274b66c 100644 --- a/pages.json +++ b/pages.json @@ -393,6 +393,22 @@ } } + ,{ + "path" : "pages/SecondPhase/production/BakeDetail", + "style" : + { + "navigationStyle": "custom" + } + + } + ,{ + "path" : "pages/SecondPhase/production/MjWeight", + "style" : + { + "navigationStyle": "custom" + } + + } ], "globalStyle": { // "pageOrientation": "landscape", diff --git a/pages/SecondPhase/production/BakeDetail.vue b/pages/SecondPhase/production/BakeDetail.vue new file mode 100644 index 0000000..9165ff3 --- /dev/null +++ b/pages/SecondPhase/production/BakeDetail.vue @@ -0,0 +1,248 @@ + + + + + diff --git a/pages/SecondPhase/production/BakeProcess.vue b/pages/SecondPhase/production/BakeProcess.vue index b807104..91d9345 100644 --- a/pages/SecondPhase/production/BakeProcess.vue +++ b/pages/SecondPhase/production/BakeProcess.vue @@ -43,20 +43,71 @@ /> - - {{$t('filter.type')}} - - - - - - - - + + + + + + + + + + + {{$t('filter.starting-point')}} + + + + + + + + {{$t('grid.mother-roll-number')}} + + + + + + + {{$t('filter.temperature')}} + + + + + + {{$t('filter.time')}}({{$t('unit.minute')}}) + + + + + + + {{$t('filter.end')}} + + + + + + + + + + + + + @@ -64,7 +115,7 @@ import NavBar from '@/components/NavBar.vue' import SearchBox from '@/components/SearchBox.vue' import NumberInput from '@/components/NumberInput.vue' - import {ovenInAndOut, inCoolIvt, bakingquery, inCoolOrOven} from '@/utils/getData1.js' + import {ovenInAndOut, bakingquery, inHotByPoint} from '@/utils/getData1.js' export default { components: { NavBar, @@ -78,11 +129,13 @@ val2: '', val3: '', val4: '', - index: '', - options: [{value: '1', text: '入冷却'}, {value: '2', text: '入烘箱'}], disabled: false, - disabled3: false, - disabled4: false + active: false, + val5: '', + val6: '', + val7: '', + val8: '', + val9: '' }; }, onLoad (options) { @@ -112,11 +165,7 @@ title: res.message, icon: 'none' }) - this.val1 = '' - this.val2 = '' - this.val3 = '' - this.val4 = '' - this.disabled = false + this.clearUp() } catch (e) { this.disabled = false } @@ -133,56 +182,41 @@ title: res.message, icon: 'none' }) - this.val1 = '' - this.val2 = '' - this.val3 = '' - this.val4 = '' - this.disabled = false + this.clearUp() } catch (e) { this.disabled = false } }, - async _inCoolIvt () { - this.disabled3 = true - if (!this.val1 || !this.val2) { - this.disabled3 = false - return - } - try { - let res = await inCoolIvt(this.val1, this.val2) - uni.showToast({ - title: res.message, - icon: 'none' - }) - this.val1 = '' - this.val2 = '' - this.val3 = '' - this.val4 = '' - this.disabled3 = false - } catch (e) { - this.disabled3 = false - } + clearUp () { + this.val1 = '' + this.val2 = '' + this.val3 = '' + this.val4 = '' + this.disabled = false }, - // 质检不合格 - async _inCoolOrOven () { - this.disabled4 = true - if (!((this.val1 && this.val2 && this.index === '1') || (this.val1 && this.val2 && this.val3 && this.val4 && this.index === '2'))) { - this.disabled4 = false - return - } + _inHotByPoint () { + this.active = true + this.disabled = true + }, + cancleModal () { + this.val5 = '' + this.val6 = '' + this.val7 = '' + this.val8 = '' + this.val9 = '' + this.active = false + this.disabled = false + }, + async modalToSure () { try { - let res = await inCoolOrOven(this.val1, this.val2, this.val3, this.val4, this.index) + let res = await inHotByPoint(this.val5, this.val6, this.val7, this.val8, this.val9) uni.showToast({ title: res.message, icon: 'none' }) - this.val1 = '' - this.val2 = '' - this.val3 = '' - this.val4 = '' - this.disabled4 = false + this.cancleModal() } catch (e) { - this.disabled4 = false + this.disabled = false } } } diff --git a/pages/SecondPhase/production/MjWeight.vue b/pages/SecondPhase/production/MjWeight.vue new file mode 100644 index 0000000..d04d8d9 --- /dev/null +++ b/pages/SecondPhase/production/MjWeight.vue @@ -0,0 +1,82 @@ + + + \ No newline at end of file diff --git a/pages/SecondPhase/production/SboProcess.vue b/pages/SecondPhase/production/SboProcess.vue index 3b17bd7..c8f8dfe 100644 --- a/pages/SecondPhase/production/SboProcess.vue +++ b/pages/SecondPhase/production/SboProcess.vue @@ -17,6 +17,12 @@ + + {{$t('filter.area')}} + + + + {{$t('filter.mother-roll')}} @@ -80,7 +86,7 @@ import NavBar from '@/components/NavBar.vue' import SearchBox from '@/components/SearchBox.vue' import UpTop from '@/components/upTop.vue' - import {queryRawFoilList, createOrder, confirmBlanking, rawScrollDowm} from '@/utils/getData1.js' + import {queryProductArea, queryRawFoilList, createOrder, confirmBlanking, rawScrollDowm} from '@/utils/getData1.js' export default { components: { NavBar, @@ -93,6 +99,8 @@ top: 0, val1: '', val2: '', + options: [], + index: '', dataList: [], pkId: '', pkObj: {}, @@ -116,11 +124,17 @@ }, onLoad (options) { this.title = options.title + this._queryProductArea() }, onPageScroll(e) { this.$refs.UT.topData(e.scrollTop) }, methods: { + /** 生产区域下拉框查询 */ + async _queryProductArea () { + let res = await queryProductArea() + this.options = [...res.data] + }, searchList () { this.pkId = '' this.pkObj = {} @@ -131,7 +145,7 @@ }, // 查询列表 async _queryRawFoilList () { - let res = await queryRawFoilList(this.val1, this.val2, this.pageNum + '', this.pageSize + '') + let res = await queryRawFoilList(this.val1, this.index, this.val2, this.pageNum + '', this.pageSize + '') this.totalCount = res.size if (res.size > 0) { const dataMap = res.data diff --git a/uni_modules/uni-data-select/changelog.md b/uni_modules/uni-data-select/changelog.md index d5beaa3..0658510 100644 --- a/uni_modules/uni-data-select/changelog.md +++ b/uni_modules/uni-data-select/changelog.md @@ -1,3 +1,30 @@ +## 1.0.10(2025-04-14) +- 修复 清除按钮不展示问题 +## 1.0.9(2025-03-26) +- 优化 默认背景为白色与整体组件保持风格统一 +## 1.0.8(2024-03-28) +- 修复 在vue2下:style动态绑定导致编译失败的bug +## 1.0.7(2024-01-20) +- 修复 长文本回显超过容器的bug,超过容器部分显示省略号 +## 1.0.6(2023-04-12) +- 修复 微信小程序点击时会改变背景颜色的 bug +## 1.0.5(2023-02-03) +- 修复 禁用时会显示清空按钮 +## 1.0.4(2023-02-02) +- 优化 查询条件短期内多次变更只查询最后一次变更后的结果 +- 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue +## 1.0.3(2023-01-16) +- 修复 不关联服务空间报错的问题 +## 1.0.2(2023-01-14) +- 新增 属性 `format` 可用于格式化显示选项内容 +## 1.0.1(2022-12-06) +- 修复 当where变化时,数据不会自动更新的问题 +## 0.1.9(2022-09-05) +- 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框 +## 0.1.8(2022-08-29) +- 修复 点击的位置不准确 +## 0.1.7(2022-08-12) +- 新增 支持 disabled 属性 ## 0.1.6(2022-07-06) - 修复 pc端宽度异常的bug ## 0.1.5 diff --git a/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue b/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue index 3c31fcf..cad39e3 100644 --- a/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue +++ b/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue @@ -2,25 +2,27 @@ {{label + ':'}} - + - {{current}} + {{textShow}} {{typePlaceholder}} - - + + + + + + - - - + + {{emptyTips}} - - {{formatItemName(item)}} + + {{formatItemName(item)}} @@ -40,35 +42,22 @@ * @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效 * @property {String} label 左侧标题 * @property {String} placeholder 输入框的提示文字 + * @property {Boolean} disabled 是否禁用 + * @property {String} placement 弹出位置 + * @value top 顶部弹出 + * @value bottom 底部弹出(default) * @event {Function} change 选中发生变化触发 */ export default { - name: "uni-stat-select", + name: "uni-data-select", mixins: [uniCloud.mixinDatacom || {}], - data() { - return { - showSelector: false, - current: '', - mixinDatacomResData: [], - apps: [], - channels: [] - }; - }, props: { localdata: { type: Array, default () { return [] } - }, - searchInput: { - type: Boolean, - default: false - }, - svalue: { - type: [String, Number], - default: '' }, value: { type: [String, Number], @@ -97,12 +86,37 @@ defItem: { type: Number, default: 0 + }, + disabled: { + type: Boolean, + default: false + }, + // 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}" + format: { + type: String, + default: '' + }, + placement: { + type: String, + default: 'bottom' } }, + data() { + return { + showSelector: false, + current: '', + mixinDatacomResData: [], + apps: [], + channels: [], + cacheKey: "uni-data-select-lastSelectedValue", + }; + }, created() { - this.last = `${this.collection}_last_selected_option_value` + this.debounceGet = this.debounce(() => { + this.query(); + }, 300); if (this.collection && !this.localdata.length) { - this.mixinDatacomEasyGet() + this.debounceGet(); } }, computed: { @@ -117,8 +131,30 @@ return placeholder ? common + placeholder : common + }, + valueCom() { + // #ifdef VUE3 + return this.modelValue; + // #endif + // #ifndef VUE3 + return this.value; + // #endif + }, + textShow() { + // 长文本显示 + let text = this.current; + return text; + }, + getOffsetByPlacement() { + switch (this.placement) { + case 'top': + return "bottom:calc(100% + 12px);"; + case 'bottom': + return "top:calc(100% + 12px);"; + } } }, + watch: { localdata: { immediate: true, @@ -128,16 +164,9 @@ } } }, - // #ifndef VUE3 - value() { + valueCom(val, old) { this.initDefVal() }, - // #endif - // #ifdef VUE3 - modelValue() { - this.initDefVal() - }, - // #endif mixinDatacomResData: { immediate: true, handler(val) { @@ -145,34 +174,50 @@ this.initDefVal() } } - } + }, + }, - methods: { - handleInput($event) { - this.$emit('input', $event.target.value) - this.$emit('handleChange', $event.target.value) + methods: { + debounce(fn, time = 100) { + let timer = null + return function(...args) { + if (timer) clearTimeout(timer) + timer = setTimeout(() => { + fn.apply(this, args) + }, time) + } + }, + // 执行数据库查询 + query() { + this.mixinDatacomEasyGet(); + }, + // 监听查询条件变更事件 + onMixinDatacomPropsChange() { + if (this.collection) { + this.debounceGet(); + } }, initDefVal() { let defValue = '' - if ((this.value || this.value === 0) && !this.isDisabled(this.value)) { - defValue = this.value - } else if ((this.modelValue || this.modelValue === 0) && !this.isDisabled(this.modelValue)) { - defValue = this.modelValue + if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) { + defValue = this.valueCom } else { let strogeValue if (this.collection) { - strogeValue = uni.getStorageSync(this.last) + strogeValue = this.getCache() } if (strogeValue || strogeValue === 0) { defValue = strogeValue } else { let defItem = '' - if (this.defItem > 0 && this.defItem < this.mixinDatacomResData.length) { + if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) { defItem = this.mixinDatacomResData[this.defItem - 1].value } defValue = defItem } - this.emit(defValue) + if (defValue || defValue === 0) { + this.emit(defValue) + } } const def = this.mixinDatacomResData.find(item => item.value === defValue) this.current = def ? this.formatItemName(def) : '' @@ -194,10 +239,11 @@ return isDisabled; }, - clearVal() { + clearVal() { this.emit('') + this.current = '' if (this.collection) { - uni.removeStorageSync(this.last) + this.removeCache() } }, change(item) { @@ -208,17 +254,19 @@ } }, emit(val) { - this.$emit('change', val) this.$emit('input', val) this.$emit('update:modelValue', val) + this.$emit('change', val) if (this.collection) { - uni.setStorageSync(this.last, val) + this.setCache(val); } }, - toggleSelector() { - this.showSelector = !this.showSelector - this.$emit('showSelector', this.showSelector) + if (this.disabled) { + return + } + + this.showSelector = !this.showSelector }, formatItemName(item) { let { @@ -227,14 +275,50 @@ channel_code } = item channel_code = channel_code ? `(${channel_code})` : '' - return this.collection.indexOf('app-list') > 0 ? - `${text}(${value})` : - ( - text ? - text : - `未命名${channel_code}` - ) - } + + if (this.format) { + // 格式化输出 + let str = ""; + str = this.format; + for (let key in item) { + str = str.replace(new RegExp(`{${key}}`, "g"), item[key]); + } + return str; + } else { + return this.collection.indexOf('app-list') > 0 ? + `${text}(${value})` : + ( + text ? + text : + `未命名${channel_code}` + ) + } + }, + // 获取当前加载的数据 + getLoadData() { + return this.mixinDatacomResData; + }, + // 获取当前缓存key + getCurrentCacheKey() { + return this.collection; + }, + // 获取缓存 + getCache(name = this.getCurrentCacheKey()) { + let cacheData = uni.getStorageSync(this.cacheKey) || {}; + return cacheData[name]; + }, + // 设置缓存 + setCache(value, name = this.getCurrentCacheKey()) { + let cacheData = uni.getStorageSync(this.cacheKey) || {}; + cacheData[name] = value; + uni.setStorageSync(this.cacheKey, cacheData); + }, + // 删除缓存 + removeCache(name = this.getCurrentCacheKey()) { + let cacheData = uni.getStorageSync(this.cacheKey) || {}; + delete cacheData[name]; + uni.setStorageSync(this.cacheKey, cacheData); + }, } } @@ -245,7 +329,6 @@ $uni-secondary-color: #909399 !default; $uni-border-3: #e5e5e5; - /* #ifndef APP-NVUE */ @media screen and (max-width: 500px) { .hide-on-phone { @@ -258,19 +341,22 @@ display: flex; align-items: center; // padding: 15px; + /* #ifdef H5 */ cursor: pointer; + /* #endif */ width: 100%; flex: 1; box-sizing: border-box; - } - + } + .uni-stat-box { - width: 100%; - flex: 1; - } - - .uni-stat__actived { - width: 100%; + background-color: #fff; + width: 100%; + flex: 1; + } + + .uni-stat__actived { + width: 100%; flex: 1; // outline: 1px solid #2979ff; } @@ -301,6 +387,11 @@ width: 100%; flex: 1; height: 35px; + + &--disabled { + background-color: #f5f7fa; + cursor: not-allowed; + } } .uni-select__label { @@ -312,7 +403,8 @@ } .uni-select__input-box { - // height: 35px; + height: 35px; + width: 0px; position: relative; /* #ifndef APP-NVUE */ display: flex; @@ -320,8 +412,6 @@ flex: 1; flex-direction: row; align-items: center; - justify-content: space-between; - overflow: hidden; } .uni-select__input { @@ -341,14 +431,13 @@ box-sizing: border-box; /* #endif */ position: absolute; - top: calc(100% + 12px); left: 0; width: 100%; background-color: #FFFFFF; border: 1px solid #EBEEF5; border-radius: 6px; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); - z-index: 2; + z-index: 3; padding: 4px 0; } @@ -359,17 +448,24 @@ /* #endif */ } + /* #ifdef H5 */ + @media (min-width: 768px) { + .uni-select__selector-scroll { + max-height: 600px; + } + } + + /* #endif */ + .uni-select__selector-empty, .uni-select__selector-item { /* #ifndef APP-NVUE */ - display: flex; - align-items: center; + display: flex; cursor: pointer; /* #endif */ - line-height: 15px; - height: 35px; - font-size: 12px; - text-align: left; + line-height: 35px; + font-size: 14px; + text-align: center; /* border-bottom: solid 1px $uni-border-3; */ padding: 0px 10px; } @@ -391,18 +487,21 @@ } /* picker 弹出层通用的指示小三角 */ - .uni-popper__arrow, - .uni-popper__arrow::after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - border-width: 6px; + .uni-popper__arrow_bottom, + .uni-popper__arrow_bottom::after, + .uni-popper__arrow_top, + .uni-popper__arrow_top::after, + { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 6px; } - .uni-popper__arrow { + .uni-popper__arrow_bottom { filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03)); top: -6px; left: 10%; @@ -411,7 +510,7 @@ border-bottom-color: #EBEEF5; } - .uni-popper__arrow::after { + .uni-popper__arrow_bottom::after { content: " "; top: 1px; margin-left: -6px; @@ -419,19 +518,32 @@ border-bottom-color: #fff; } + .uni-popper__arrow_top { + filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03)); + bottom: -6px; + left: 10%; + margin-right: 3px; + border-bottom-width: 0; + border-top-color: #EBEEF5; + } + + .uni-popper__arrow_top::after { + content: " "; + bottom: 1px; + margin-left: -6px; + border-bottom-width: 0; + border-top-color: #fff; + } + + .uni-select__input-text { // width: 280px; - width: calc(100% - 50px); + width: 100%; color: $uni-main-color; white-space: nowrap; text-overflow: ellipsis; -o-text-overflow: ellipsis; overflow: hidden; - } - - .zd_icon_wraper { - width: 50px; - text-align: right; } .uni-select__input-placeholder { @@ -445,9 +557,6 @@ bottom: 0; right: 0; left: 0; - } - .filter_input_s { - width: calc(100% - 30rpx); - margin: 0 20rpx 0 10rpx; + z-index: 2; } - + diff --git a/uni_modules/uni-data-select/package.json b/uni_modules/uni-data-select/package.json index 131c808..f944770 100644 --- a/uni_modules/uni-data-select/package.json +++ b/uni_modules/uni-data-select/package.json @@ -1,7 +1,7 @@ { "id": "uni-data-select", "displayName": "uni-data-select 下拉框选择器", - "version": "0.1.6", + "version": "1.0.10", "description": "通过数据驱动的下拉框选择器", "keywords": [ "uni-ui", @@ -17,11 +17,7 @@ "directories": { "example": "../../temps/example_temps" }, - "dcloudext": { - "category": [ - "前端组件", - "通用组件" - ], +"dcloudext": { "sale": { "regular": { "price": "0.00" @@ -38,7 +34,8 @@ "data": "无", "permissions": "无" }, - "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" }, "uni_modules": { "dependencies": ["uni-load-more"], @@ -46,12 +43,15 @@ "platforms": { "cloud": { "tcb": "y", - "aliyun": "y" + "aliyun": "y", + "alipay": "n" }, "client": { "App": { - "app-vue": "u", - "app-nvue": "n" + "app-vue": "y", + "app-nvue": "n", + "app-harmony": "u", + "app-uvue": "u" }, "H5-mobile": { "Safari": "y", diff --git a/uni_modules/uni-load-more/changelog.md b/uni_modules/uni-load-more/changelog.md index 8f03f1d..667abdb 100644 --- a/uni_modules/uni-load-more/changelog.md +++ b/uni_modules/uni-load-more/changelog.md @@ -1,3 +1,9 @@ +## 1.3.6(2024-10-15) +- 修复 微信小程序中的getSystemInfo警告 +## 1.3.5(2024-10-12) +- 修复 微信小程序中的getSystemInfo警告 +## 1.3.4(2024-10-12) +- 修复 微信小程序中的getSystemInfo警告 ## 1.3.3(2022-01-20) - 新增 showText属性 ,是否显示文本 ## 1.3.2(2022-01-19) diff --git a/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue b/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue index ededbc2..aa43c55 100644 --- a/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue +++ b/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue @@ -36,8 +36,13 @@