From 57bd2b81a380d56cf3520c57ea22cc937b5f81c3 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期五, 19 十二月 2025 16:58:33 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
uni_modules/zxz-uni-data-select/package.json | 86 +++
pages/MJGL/Gy_MouldFile/Gy_MouldFileList.vue | 482 +++++++++++++++++
pages/caigouruku/POStockInBill.vue | 108 ++-
pages/jishikucunchaxun/table.vue | 9
pages.json | 8
pages/MJGL/shangmudan/MouldUpperBill.vue | 42
pages/gongxuOut/Cj_StationOutBill.vue | 6
pages/index/index.vue | 6
uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue | 823 +++++++++++++++++++++++++++++
uni_modules/zxz-uni-data-select/changelog.md | 49 +
uni_modules/zxz-uni-data-select/readme.md | 37 +
11 files changed, 1,584 insertions(+), 72 deletions(-)
diff --git a/pages.json b/pages.json
index 92cd39a..7e340bb 100644
--- a/pages.json
+++ b/pages.json
@@ -1323,6 +1323,14 @@
"navigationBarTitleText" : "寰呮垜瀹℃牳",
"enablePullDownRefresh": true
}
+ },
+ {
+ "path" : "pages/MJGL/Gy_MouldFile/Gy_MouldFileList",
+ "style" :
+ {
+ "navigationBarTitleText" : "妯″叿妗f鏌ヨ",
+ "enablePullDownRefresh": true
+ }
}
],
diff --git a/pages/MJGL/Gy_MouldFile/Gy_MouldFileList.vue b/pages/MJGL/Gy_MouldFile/Gy_MouldFileList.vue
new file mode 100644
index 0000000..b47840a
--- /dev/null
+++ b/pages/MJGL/Gy_MouldFile/Gy_MouldFileList.vue
@@ -0,0 +1,482 @@
+<template>
+ <view class="page" id="pageContent">
+ <view class="search-condition-zone">
+ <view class="form-item">
+ <view class="left">妯″叿鍒嗙被</view>
+ <!-- <uni-data-select
+ v-model="hform.HMouldTypeID"
+ :localdata="HMouldTypeList"
+ @change=""
+ :clear="false"
+ ></uni-data-select> -->
+ <zxz-uni-data-select
+ v-model="hform.HMouldTypeID"
+ dataKey="鍣ㄥ叿鍒嗙被鍚嶇О"
+ dataValue="HItemID"
+ :filterable="true"
+ :localdata="HMouldTypeList"
+ :clear="false"
+ ></zxz-uni-data-select>
+ </view>
+ <view class="form-item">
+ <view class="left">
+ 鍣ㄥ叿缂栧彿:
+ </view>
+ <view class="right general">
+ <input type="text" v-model="hform.HMouldNumber" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">
+ 鍣ㄥ叿鍚嶇О:
+ </view>
+ <view class="right general">
+ <input type="text" v-model="hform.HMouldName" />
+ </view>
+ </view>
+ </view>
+ <view class="button-zone">
+ <button type="default" class="btn-a" size="mini" @tap="cmdSearch">鏌ヨ</button>
+ <button type="default" class="btn-c" size="mini" @tap="exit">閫�鍑�</button>
+ </view>
+
+ <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+
+ <view class="card-item" v-for="(item, index) in showList" :key="index">
+ <uni-card :title="item['鍗曟嵁鍙�']" :extra="'鏃ユ湡:' + item['鏃ユ湡'].split('T')[0]"
+ @tap="showDetail = showDetail==index?-1:index">
+ <view class="card-detail">
+ <!-- 鍔ㄦ�佺敓鎴愭墍鏈夐潪绌哄瓧娈� -->
+ <view
+ class="detail"
+ v-for="(value, key,keyIndex) in item"
+ :key="key"
+ v-if="keyIndex<=10 && shouldShowField(key, value)"
+ >
+ <text>{{ formatFieldName(key) }}锛�</text>{{ value }}
+ </view>
+ </view>
+ <view class="card-detail" v-if="showDetail == index">
+ <view
+ class="detail"
+ v-for="(value, key,keyIndex) in item"
+ :key="key"
+ v-if="keyIndex>=15 && shouldShowField(key, value)"
+ >
+ <text>{{ formatFieldName(key) }}锛�</text>{{ value }}
+ </view>
+
+ </view>
+ <view class="more" v-if="showDetail == index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏀惰捣
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="more" v-if="showDetail != index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏇村淇℃伅
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="op" v-if="operations == index">
+ <button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
+ <view class="over" v-if="listData.length != 0 && listData.length != showList.length">鍔犺浇涓�...</view>
+ <view class="over" v-if="listData.length != 0 && listData.length == showList.length">宸插埌搴�</view>
+
+
+ </view>
+</template>
+
+<script>
+ import {
+ CommonUtils
+ } from '@/utils/common'
+ import {
+ getUserInfo
+ } from '@/utils/auth'
+ import dayjs, {
+ Dayjs
+ } from 'dayjs'
+ export default {
+ data() {
+ return {
+ showDetail: -1,
+ operations : -1,
+ HMouldTypeList: [
+ { HItemID: 0, 鍣ㄥ叿鍒嗙被鍚嶇О: "鍏ㄩ儴" },
+ ],
+ hform: {
+ HMouldTypeID:0,
+ HMouldNumber: '',
+ HMouldName:''
+ },
+ sWhere: '',
+ listData: [],
+ showList: [],
+ page: 1,
+
+ }
+ },
+ onReachBottom: function() {
+ this.page++
+ setTimeout(() => {
+ this.showList = this.showList.concat(this.getPage(this.page, this.listData))
+ }, 100)
+ },
+ onPullDownRefresh: function() {
+ this.cmdSearch()
+ setTimeout(() => {
+ uni.stopPullDownRefresh();
+ }, 1000);
+ },
+ computed: {
+
+ },
+ methods: {
+ // 鍒ゆ柇鍝簺瀛楁闇�瑕佹樉绀�
+ shouldShowField(key, value) {
+ // 鎺掗櫎涓嶉渶瑕佹樉绀虹殑瀛楁
+ const excludeKeys = ['鍗曟嵁鍙�', '鏃ユ湡']; // 杩欎簺瀛楁宸茬粡鍦ㄥ叾浠栧湴鏂规樉绀轰簡
+
+ // 鍒ゆ柇key鏄惁鍏ㄨ嫳鏂囷紙涓嶅寘鍚腑鏂囷級
+ const isAllEnglish = /^[a-zA-Z]+$/.test(key);
+
+ // 鍒ゆ柇key鏄惁鍖呭惈"ID"锛堜笉鍖哄垎澶у皬鍐欙級
+ const containsID = key.toUpperCase().includes('ID');
+
+ return !excludeKeys.includes(key) &&
+ !isAllEnglish && // 鎺掗櫎鍏ㄨ嫳鏂囩殑key
+ !containsID && // 鎺掗櫎鍖呭惈ID鐨刱ey
+ // value !== null &&
+ value !== undefined
+ // &&
+ // value !== '';
+ },
+
+ // 鏍煎紡鍖栧瓧娈靛悕鏄剧ず
+ formatFieldName(key) {
+ // 浣犲彲浠ユ牴鎹渶姹傝嚜瀹氫箟鏄剧ず鍚嶇О
+ const nameMap = {
+ '鐗╂枡浠g爜': '鐗╂枡浠g爜',
+ '鐗╂枡鍚嶇О': '鐗╂枡鍚嶇О',
+ '瑙勬牸鍨嬪彿': '瑙勬牸鍨嬪彿',
+ // ... 鍏朵粬瀛楁鏄犲皠
+ };
+ return nameMap[key] || key;
+ },
+
+ exit() {
+ uni.navigateBack()
+ },
+ getPage(page, list) {
+ let sindex = (parseInt(page) - 1) * 20
+ let eindex = parseInt(page) * 20
+ let newList = list.slice(sindex, eindex)
+ return newList
+ },
+ async cmdSearch() {
+ let sWhere = ' '
+
+ if (this.hform.HMouldName != "") {
+ sWhere += " and 妯″叿鍚嶇О like '%" + this.hform.HMouldName + "%'"
+ }
+ if (this.hform.HMouldNumber != "") {
+ sWhere += " and 妯″叿缂栧彿 like '%" + this.hform.HMouldNumber + "%'"
+ }
+ if (this.hform.HMouldTypeID != "0") {
+ sWhere += " and HMouldTypeID = '" + this.hform.HMouldTypeID + "'"
+ }
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/Gy_Mould/list1',
+ data: {
+ "sWhere": sWhere,
+ "ModRightNameSelect":"Gy_MouldFileList",
+ "user": getUserInfo()["Czymc"]
+ },
+ })
+ if (!res) {
+ return
+ }
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count > 0) {
+ this.listData = res.data.data
+ this.showList = this.getPage(this.page, this.listData)
+
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ } catch (err) {
+ console.warn(err);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触:' + err,
+ icon: 'none'
+ })
+ }
+ },
+ //妯″叿妗f鍒嗙被鑾峰彇鎺ュ彛
+ async mouldTypeSearch() {
+
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/Gy_ModelType/list',
+ data: {
+ "sWhere": '',
+ "ModRightNameSelect":"Gy_MouldTypeList",
+ "user": getUserInfo()["Czymc"]
+ },
+ })
+ if (!res) {
+ return
+ }
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count > 0) {
+ console.log(res.data.data)
+ this.HMouldTypeList.push(...res.data.data)
+
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ } catch (err) {
+ console.warn(err);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触:' + err,
+ icon: 'none'
+ })
+ }
+ },
+
+ },
+ async onShow() {
+ await this.mouldTypeSearch();
+ this.$nextTick(() => {
+ this.cmdSearch()
+ })
+ },
+
+ }
+</script>
+
+<style lang="scss" scoped>
+ .page {
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+ padding: 20rpx 0;
+ position: relative;
+
+ .button-zone {
+ height: auto;
+ box-sizing: border-box;
+ padding-top: 20rpx;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ flex-wrap: wrap;
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+
+ .btn-a {
+ background-color: #3a78ff;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #ff5722;
+ color: #fff;
+ }
+ }
+
+ .search-condition-zone {
+ height: auto;
+ box-sizing: border-box;
+ padding: 0 60rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+
+ .form-item {
+ display: flex;
+ flex-direction: row;
+ gap: 20rpx;
+ align-items: center;
+ font-size: 28rpx;
+
+ .left {
+ width: 4rem;
+ }
+
+ .right {
+ flex: 1;
+ padding: 8rpx 16rpx;
+
+ .search {
+ width: 28rpx;
+ height: 28rpx;
+ }
+
+ input {
+ font-size: 28rpx;
+ }
+
+ .uni-combox {
+ padding: 0;
+ margin: 0;
+
+ ::v-deep .uni-combox__input {
+ font-size: 28rpx;
+ height: auto;
+ }
+ }
+ }
+
+ .general {
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ }
+
+ .disabled {
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+ }
+ }
+
+ .info-list-zone {
+ overflow-y: auto;
+
+ .card-item {
+ .card-detail {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ line-height: 120%;
+
+ .detail {
+ // width: 50%;
+ font-size: 26rpx;
+ margin-bottom: 12rpx;
+ color: #555;
+ margin-right: 20rpx;
+
+ text {
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+ }
+ }
+ }
+
+ .daterange {
+ display: flex;
+ flex-direction: row;
+ gap: 10rpx;
+ justify-content: center;
+ align-items: center;
+ }
+
+ .more {
+ color: #888;
+ font-size: 24rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
+
+ .part {
+ width: 50%;
+ text-align: center;
+ }
+ }
+
+ .op {
+ display: flex;
+ justify-content: space-between;
+ gap: 20rpx;
+ margin-top: 20rpx;
+ flex-wrap: wrap;
+ align-content: flex-start;
+ button {
+ margin: 0;
+ flex-shrink: 0;
+ padding: 0;
+ width: 150rpx;
+ flex-basis: 150rpx;
+ font-size: 25rpx;
+ }
+
+ .op1 {
+ border: 1px solid #41a863;
+ color: #41a863;
+ }
+
+ .op2 {
+ border: 1px solid #d98d00;
+ color: #d98d00;
+ }
+
+ .op3 {
+ border: 1px solid #3a78ff;
+ color: #3a78ff;
+ }
+
+ .op4 {
+ border: 1px solid #da0000;
+ color: #da0000;
+ }
+
+ .op5 {
+ border: 1px solid #888;
+ color: #888;
+ }
+ }
+
+ .pagination-zone {
+ position: fixed;
+ bottom: 0;
+ box-sizing: border-box;
+ background-color: #fff;
+ box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+ padding: 20rpx 40rpx 20rpx 40rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+ justify-content: space-between;
+ width: 100%;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/MJGL/shangmudan/MouldUpperBill.vue b/pages/MJGL/shangmudan/MouldUpperBill.vue
index 53591d2..b8da547 100644
--- a/pages/MJGL/shangmudan/MouldUpperBill.vue
+++ b/pages/MJGL/shangmudan/MouldUpperBill.vue
@@ -833,7 +833,7 @@
success: (res) => {
if (res.data.code == 1 && res.data.data && res.data.data.length > 0) {
this.listData = [];
- this.tabs=1;
+ this.tabs = 1;
res.data.data.forEach((item, index) => {
this.listData.push({
index: index + 1,
@@ -845,7 +845,7 @@
鍣ㄥ叿鏁伴噺: 0
});
});
-
+
this.selectedRows = [...this.listData];
} else {
uni.showToast({
@@ -939,25 +939,25 @@
})
}
// 濡傛灉鏄簨涓氫竴澶勭粍缁囷紝鏍¢獙鍣ㄥ叿鏁伴噺
- if (uni.getStorageSync('OrganizationID') === "100007" && uni.getStorageSync('Organization') === "浜嬩笟涓�澶�") {
- const zeroQtyItem = this.listData.find(item => {
- // 鑰冭檻0銆乶ull銆乽ndefined绛夊紓甯告儏鍐�
- const qty = Number(item.鍣ㄥ叿鏁伴噺) || 0;
- return qty <= 0;
- });
-
- if (zeroQtyItem) {
- // 鎵惧埌绗竴涓暟閲忓紓甯搁」鐨勪綅缃紙绱㈠紩+1锛�
- const index = this.listData.indexOf(zeroQtyItem) + 1;
- const code = zeroQtyItem.鍣ㄥ叿缂栫爜 || '鏈煡缂栫爜';
- uni.showToast({
- title: `绗�${index}琛屻��${code}銆戝櫒鍏锋暟閲忎负0锛岃妫�鏌,
- icon: 'none',
- duration: 3000
- });
- return;
- }
- }
+ // if (uni.getStorageSync('OrganizationID') === "100007" && uni.getStorageSync('Organization') === "浜嬩笟涓�澶�") {
+ // const zeroQtyItem = this.listData.find(item => {
+ // // 鑰冭檻0銆乶ull銆乽ndefined绛夊紓甯告儏鍐�
+ // const qty = Number(item.鍣ㄥ叿鏁伴噺) || 0;
+ // return qty <= 0;
+ // });
+
+ // if (zeroQtyItem) {
+ // // 鎵惧埌绗竴涓暟閲忓紓甯搁」鐨勪綅缃紙绱㈠紩+1锛�
+ // const index = this.listData.indexOf(zeroQtyItem) + 1;
+ // const code = zeroQtyItem.鍣ㄥ叿缂栫爜 || '鏈煡缂栫爜';
+ // uni.showToast({
+ // title: `绗�${index}琛屻��${code}銆戝櫒鍏锋暟閲忎负0锛岃妫�鏌,
+ // icon: 'none',
+ // duration: 3000
+ // });
+ // return;
+ // }
+ // }
if (!this.hform.HEmpName) {
uni.showToast({
title: '璇烽�夋嫨鎿嶄綔鍛�',
diff --git a/pages/caigouruku/POStockInBill.vue b/pages/caigouruku/POStockInBill.vue
index c03ef06..4881325 100644
--- a/pages/caigouruku/POStockInBill.vue
+++ b/pages/caigouruku/POStockInBill.vue
@@ -158,41 +158,45 @@
<view v-if="tabs == 2">
<view class="list" v-for="(item,index) in Materlist" :key="index">
- <uni-card :title="item.鐗╂枡鍚嶇О" :extra="item.鐗╂枡浠g爜" style="margin: 10px;" @tap="delMater(item)">
- <view class="card-detail">
- <view class="detail">
- <text>婧愬崟鍗曞彿锛�</text>{{item.婧愬崟鍗曞彿}}
- </view>
- <view class="detail">
- <text>婧愬崟鏁伴噺锛�</text>{{item.婧愬崟鏁伴噺}}
- </view>
- <view class="detail">
- <text>鏁伴噺锛�</text>{{item.鏁伴噺}}
- </view>
- <view class="detail">
- <text>鏉$爜涓暟锛�</text>{{item.鏉$爜涓暟}}
- </view>
- <view class="detail" v-if="item.瑙勬牸鍨嬪彿">
- <text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
- </view>
- <view class="detail" v-if="item.杈呭姪灞炴��">
- <text>杈呭姪灞炴�э細</text>{{item.杈呭姪灞炴�}
- </view>
- <view class="detail" v-if="item.娆惧彿">
- <text>娆惧彿锛�</text>{{item.娆惧彿}}
- </view>
- <view class="detail" v-if="item.鍚堣鏁伴噺">
- <text>鍚堣鏁伴噺锛�</text>{{item.鍚堣鏁伴噺}}
- </view>
- <view class="detail" v-if="item.鍗曚环">
- <text>鍗曚环锛�</text>{{item.鍗曚环}}
- </view>
- <view class="detail" v-if="materMeta[0].HWHName && /鍏磋揪/.test(hform.HStockOrgName
- )">
- <text>浠撳簱锛�</text>{{materMeta[0].HWHName}}
- </view>
- </view>
- </uni-card>
+ <uni-card :title="item.鐗╂枡鍚嶇О" style="margin: 10px;" @tap="delMater(item, $event)">
+ <!-- 鐗╂枡浠g爜浣滀负鍙偣鍑婚摼鎺� -->
+ <view class="card-header" @tap.stop="gotoInventoryQuery(item.鐗╂枡浠g爜)">
+ <text class="link-text">鐗╂枡浠g爜锛歿{item.鐗╂枡浠g爜}}</text>
+ </view>
+
+ <view class="card-detail">
+ <view class="detail">
+ <text>婧愬崟鍗曞彿锛�</text>{{item.婧愬崟鍗曞彿}}
+ </view>
+ <view class="detail">
+ <text>婧愬崟鏁伴噺锛�</text>{{item.婧愬崟鏁伴噺}}
+ </view>
+ <view class="detail">
+ <text>鏁伴噺锛�</text>{{item.鏁伴噺}}
+ </view>
+ <view class="detail">
+ <text>鏉$爜涓暟锛�</text>{{item.鏉$爜涓暟}}
+ </view>
+ <view class="detail" v-if="item.瑙勬牸鍨嬪彿">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
+ </view>
+ <view class="detail" v-if="item.杈呭姪灞炴��">
+ <text>杈呭姪灞炴�э細</text>{{item.杈呭姪灞炴�}
+ </view>
+ <view class="detail" v-if="item.娆惧彿">
+ <text>娆惧彿锛�</text>{{item.娆惧彿}}
+ </view>
+ <view class="detail" v-if="item.鍚堣鏁伴噺">
+ <text>鍚堣鏁伴噺锛�</text>{{item.鍚堣鏁伴噺}}
+ </view>
+ <view class="detail" v-if="item.鍗曚环">
+ <text>鍗曚环锛�</text>{{item.鍗曚环}}
+ </view>
+ <view class="detail" v-if="materMeta[0].HWHName && /鍏磋揪/.test(hform.HStockOrgName)">
+ <text>浠撳簱锛�</text>{{materMeta[0].HWHName}}
+ </view>
+ </view>
+ </uni-card>
</view>
<view class="over" v-if="Materlist.length == 0">鏆傛棤鏁版嵁</view>
</view>
@@ -1536,7 +1540,30 @@
},
});
},
+ gotoInventoryQuery(HMaterNumber) {
+ console.log('璺宠浆鍒板簱瀛樻煡璇紝鐗╂枡浠g爜锛�', HMaterNumber);
+
+ // 浣跨敤uni.navigateTo璺宠浆鍒版柊椤甸潰
+ uni.navigateTo({
+ url: `/pages/jishikucunchaxun/table?OperationType=2&HMaterNumber=${HMaterNumber}`,
+ success: (res) => {
+ console.log('璺宠浆鎴愬姛');
+ },
+ fail: (err) => {
+ console.error('璺宠浆澶辫触锛�', err);
+ // 濡傛灉椤甸潰涓嶅瓨鍦紝鍙互璺宠浆鍒伴粯璁ら〉闈�
+ uni.showToast({
+ title: '鍔熻兘姝e湪寮�鍙戜腑',
+ icon: 'none'
+ });
+ }
+ });
+ },
delMater(item) {
+ if (event && event.target.classList && event.target.classList.contains('link-text')) {
+ return; // 濡傛灉鏄摼鎺ョ偣鍑伙紝涓嶆墽琛屽垹闄�
+ }
+
uni.showModal({
title: '鎻愮ず',
content: '纭瑕佸垹闄� "' + item.鐗╂枡鍚嶇О + '" 鎵�鏈夋壂鐮佽褰曪紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
@@ -2014,6 +2041,10 @@
color: #fff;
}
}
+ /* 娣诲姞閾炬帴鏍峰紡 */
+ .link-text {
+ color: #3a78ff; /* 钃濊壊锛岀被浼艰秴閾炬帴 */
+ }
.list {
width: 100%;
@@ -2033,9 +2064,10 @@
margin-right: 20rpx;
text {
- color: #999;
- font-size: 26rpx;
- }
+ color: #999;
+ font-size: 26rpx;
+ }
+
}
}
diff --git a/pages/gongxuOut/Cj_StationOutBill.vue b/pages/gongxuOut/Cj_StationOutBill.vue
index 01b78d0..bb69a6f 100644
--- a/pages/gongxuOut/Cj_StationOutBill.vue
+++ b/pages/gongxuOut/Cj_StationOutBill.vue
@@ -107,7 +107,7 @@
<view class="tick-wrapper">
<view class="form-item">
- <view class="title">宸ユ椂:</view>
+ <view class="title">宸ユ椂(灏忔椂):</view>
<view class="right">
<input v-model="hform.HWorkTimes" placeholder="璇疯緭鍏ュ伐鏃�" @blur="HWorkTimesChange" :disabled="hform.HIsTimeFlag!=1"/>
</view>
@@ -121,7 +121,7 @@
</checkbox-group>
</view>
</view>
- <view class="form-item">
+ <view class="form-item" v-show="false">
<view class="title">寮�宸ユ椂闂�:</view>
<view class="right">
<uni-datetime-picker v-model="hform.HRelBeginTime" @change="HRelBeginTimeChange" v-if="hform.HIsTimeFlag==1" :hide-second="true">
@@ -129,7 +129,7 @@
</uni-datetime-picker>
</view>
</view>
- <view class="form-item">
+ <view class="form-item" v-show="false">
<view class="title">瀹屽伐鏃堕棿:</view>
<view class="right">
<uni-datetime-picker v-model="hform.HRelEndTime" @change="HRelEndTimeChange" v-if="hform.HIsTimeFlag==1" :hide-second="true">
diff --git a/pages/index/index.vue b/pages/index/index.vue
index a550a52..bc2581f 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -309,9 +309,9 @@
},
{
img: '../../static/icon/icon8.png',
- text: '涓婃ā鍗�',
- url: `/pages/MJGL/shangmudan/MouldUpperBill`,
- id: 35,
+ text: '妯″叿妗f鏌ヨ',
+ url: `/pages/MJGL/Gy_MouldFile/Gy_MouldFileList`,
+ id: 36,
hidden: false,
},
],
diff --git a/pages/jishikucunchaxun/table.vue b/pages/jishikucunchaxun/table.vue
index 61a0534..90ddd46 100644
--- a/pages/jishikucunchaxun/table.vue
+++ b/pages/jishikucunchaxun/table.vue
@@ -244,7 +244,8 @@
}
},
- onLoad() {
+ onLoad(options) {
+ this.hform.HBarCode = options.HMaterNumber || '';
this.getWHInfo()
this.getStockPlaceInfo()
@@ -253,7 +254,6 @@
})
},
onReady() {
- // #ifndef MP-WEIXIN
let query = uni.createSelectorQuery().in(this)
query.select("#scroll-content").boundingClientRect((data) => {
this.pageMeta.scrollContentTop = data.top
@@ -263,11 +263,6 @@
this.pageMeta.bottomBtnTop = data.top
console.log('this.pageMeta.bottomBtnTop: ',this.pageMeta.bottomBtnTop);
}).exec()
- // #endif
- // #ifdef MP-WEIXIN
- // 寰俊涓嶆敮鎸� uni.createSelectorQuery().in(this)
- // #endif
-
},
}
</script>
diff --git a/uni_modules/zxz-uni-data-select/changelog.md b/uni_modules/zxz-uni-data-select/changelog.md
new file mode 100644
index 0000000..32e10e0
--- /dev/null
+++ b/uni_modules/zxz-uni-data-select/changelog.md
@@ -0,0 +1,49 @@
+## 1.0.20锛�2024-05-09锛�
+1.淇APP鐐瑰嚮涓嬫媺妗嗘棤娉曞叧闂�
+## 1.0.19锛�2024-04-29锛�
+1.淇鐐瑰嚮澶氫釜涓嬫媺妗嗘棤娉曞叧闂�
+2.浼樺寲澶氶�夌被鍨嬫敮鎸佷竴娆¢�夋嫨澶氫釜
+3.淇灏忕▼搴忕偣鍑绘湁涓摑鑹插簳
+4.浼樺寲涓嬫媺鑿滃崟婧㈠嚭灞忓箷搴曢儴鏃舵敼涓哄悜涓婂脊鍑�
+## 1.0.15锛�2023-11-24锛�
+1.浼樺寲澶氶�夐�変腑鏍峰紡锛坱ianheng20**qq.com缃戝弸鎻愪緵锛�
+2.浼樺寲chang浜嬩欢锛坈hang浜嬩欢涓皢杩斿洖鎵�閫変腑鐨勫璞★級
+## 1.0.14锛�2023-10-25锛�
+浼樺寲vue3寤舵椂娣诲姞鏈覆鏌撻棶棰橈紝澶勭悊37锛涘垎鍙疯鍛婇棶棰�
+## 1.0.13锛�2023-10-12锛�
+浼樺寲mixinDatacomResData鎶ラ敊鍜宒efValue鎶ラ敊
+## 1.0.12锛�2023-09-27锛�
+淇鎼滅储杈撳叆鍐呭鐨勬椂鍊欎笅鎷夋鐨勭澶翠細璺戝埌鏂囨湰妗嗗墠闈㈠幓
+浼樺寲褰撴湁閫変腑椤规椂涓嶆樉绀烘竻闄ゆ寜閽�
+## 1.0.11锛�2023-09-05锛�
+鏇存崲change浜嬩欢鎵ц椤哄簭
+淇澶氶�夋洿鏀瑰�兼椂鏈嵆鏃舵洿鏀逛笅鎷夋閫夐」
+淇鍗曢�夋悳绱㈡閫変腑浜�
+淇澶氶�夌瓫閫夎緭鍏ユ椂鐐瑰嚮鍏朵粬鏈竻绌虹瓫閫夊��
+## 1.0.10锛�2023-08-29锛�
+淇鍗曢�夋悳绱㈠洖鏄鹃棶棰�
+## 1.0.9锛�2023-08-28锛�
+鏇存柊鏂囨。
+## 1.0.8锛�2023-08-28锛�
+鏇存柊鏂囨。
+## 1.0.7锛�2023-08-16锛�
+淇缁勪欢绂佺敤bug
+淇鏁版嵁鍥炴樉闂
+娣诲姞澶氶�夋悳绱㈠姛鑳�
+## 1.0.6锛�2023-08-05锛�
+淇娓呯┖鍊煎閫変笅鎷夊垪琛ㄨ繕鏄閫変腑bug
+## 1.0.5锛�2023-07-10锛�
+淇澶氶�夊垵濮嬪寲寮傛鏁版嵁涓嶆樉绀洪棶棰�
+## 1.0.4锛�2023-07-07锛�
+淇寰俊灏忕▼搴忓閫夋樉绀哄吋瀹归棶棰�
+## 1.0.3锛�2023-07-06锛�
+淇bug
+澶氶�夋儏鍐典笅 鍒濆鍖栦箣鍚庨噸鏂伴�夋嫨绗竴涓笉鏄剧ず
+## 1.0.2锛�2023-07-06锛�
+鏇存柊VUE3鍏煎
+## 1.0.1锛�2023-06-30锛�
+娣诲姞澶氶�夊悎骞跺姛鑳�
+## 1.0.0锛�2023-06-16锛�
+娣诲姞涓嬫媺妗嗘绱紝澶氶�夊姛鑳斤紝鑷畾涔夋暟鎹�
+## 1.0.4锛�2023-06-16锛�
+ 娣诲姞涓嬫媺妗嗘绱紝澶氶�夊姛鑳斤紝鑷畾涔夋暟鎹�
diff --git a/uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue b/uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue
new file mode 100644
index 0000000..4c689a5
--- /dev/null
+++ b/uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue
@@ -0,0 +1,823 @@
+<template>
+ <view class="uni-stat__select">
+ <!-- hide-on-phone -->
+ <span v-if="label" class="uni-label-text">{{label + '锛�'}}</span>
+ <view class="uni-stat-box" :class="{'uni-stat__actived': current}">
+ <view class="uni-select" :style="{height:multiple?'100%':' 35px'}"
+ :class="{'uni-select--disabled':disabled}">
+ <view class="uni-select__input-box" :style="{height:multiple?'100%':'35px'}" @click="toggleSelector">
+ <view class="" style="display: flex;flex-wrap: wrap;width: 100%;" v-if="multiple&¤t.length>0">
+ <view class="tag-calss"
+ v-for="(item,index) in collapseTags?current.slice(0,collapseTagsNum):current"
+ :key="item[dataValue]">
+ <span class="text">{{item[dataKey]}}</span>
+ <view class="" @click.stop="delItem(item)">
+ <uni-icons type="clear" style="margin-left: 4px;" color="#c0c4cc" />
+ </view>
+ </view>
+ <view v-if="current.length>collapseTagsNum&&collapseTags" class="tag-calss">
+ <span class="text">+{{current.length-collapseTagsNum}}</span>
+ </view>
+ <input v-if="filterable&&!disabled" @input="inputChange" class="uni-select__input-text"
+ type="text" style="font-size: 12px;height: 52rpx;margin-left: 6px;width: auto;"
+ placeholder="璇疯緭鍏�" v-model="filterInput">
+ </view>
+ <view v-else-if="current&¤t.length>0&&!showSelector" class="uni-select__input-text">
+ {{current}}
+ </view>
+ <input v-else-if="filterable&&showSelector" :focus="isFocus" @input="inputChange"
+ :disabled="disabled" @click.stop="" class="uni-select__input-text" type="text"
+ style="font-size: 12px;position: absolute;z-index: 1;" :placeholder="placeholderOld"
+ v-model="filterInput">
+ <view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
+ <uni-icons v-if="(current.length>0 && clear&&!disabled)||(currentArr.length>0&&clear&&!disabled)"
+ type="clear" color="#c0c4cc" size="24" style="position: absolute;right: 0;" @click="clearVal" />
+ <uni-icons style="right: 0;position: absolute;" v-else :type="showSelector? 'top' : 'bottom'"
+ size="14" color="#999" />
+ </view>
+ <view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
+ <view class="uni-select__selector"
+ :class="isDown?'uni-select__selector__down':'uni-select__selector__upwards'" v-if="showSelector">
+ <view class="uni-popper__arrow"></view>
+ <scroll-view scroll-y="true" class="uni-select__selector-scroll">
+ <view class="uni-select__selector-empty" v-if="filterMixinDatacomResData.length === 0">
+ <span>{{emptyTips}}</span>
+ </view>
+ <view v-else :class="['uni-select__selector-item', {'uni-select_selector-item_active' :multiple
+ && currentArr.includes(item[dataValue])}]"
+ style="display: flex;justify-content: space-between;align-items: center;"
+ v-for="(item,index) in filterMixinDatacomResData" :key="index" @click="change(item)">
+ <span
+ :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</span>
+ <uni-icons v-if="multiple&¤tArr.includes(item[dataValue])" type="checkmarkempty"
+ color="#007aff" />
+ </view>
+ </scroll-view>
+ </view>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ /**
+ * DataChecklist 鏁版嵁閫夋嫨鍣�
+ * @description 閫氳繃鏁版嵁娓叉煋鐨勪笅鎷夋缁勪欢
+ * @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
+ * @property {String} collapseTagsNum 澶氶�夋椂閫変腑鍊兼寜鏂囧瓧鐨勫舰寮忓睍绀虹殑鏁伴噺
+ * @property {String} collapseTags 澶氶�夋椂鏄惁灏嗛�変腑鍊兼寜鏂囧瓧鐨勫舰寮忓睍绀�
+ * @property {String} dataKey 浣滀负 key 鍞竴鏍囪瘑鐨勯敭鍚�
+ * @property {String} dataValue 浣滀负 value 鍞竴鏍囪瘑鐨勯敭鍚�
+ * @property {Array} multiple 鏄惁澶氶��
+ * @property {Array} filterable 鏄惁寮�鍚悳绱�
+ * @property {Array} localdata 鏈湴鏁版嵁 锛屾牸寮� [{text:'',value:''}]
+ * @property {Boolean} clear 鏄惁鍙互娓呯┖宸查�夐」
+ * @property {Boolean} emptyText 娌℃湁鏁版嵁鏃舵樉绀虹殑鏂囧瓧 锛屾湰鍦版暟鎹棤鏁�
+ * @property {String} label 宸︿晶鏍囬
+ * @property {String} placeholder 杈撳叆妗嗙殑鎻愮ず鏂囧瓧
+ * @property {Boolean} disabled 鏄惁绂佺敤
+ * @event {Function} change 閫変腑鍙戠敓鍙樺寲瑙﹀彂
+ */
+
+ export default {
+ name: "uni-stat-select",
+ mixins: [uniCloud.mixinDatacom || {}],
+ props: {
+ collapseTagsNum: {
+ type: Number,
+ default: 1
+ },
+ collapseTags: {
+ type: Boolean,
+ default: false
+ },
+ dataKey: {
+ type: [String],
+ default: 'text'
+ },
+ dataValue: {
+ type: [String],
+ default: 'value'
+ },
+ multiple: {
+ type: Boolean,
+ default: false
+ },
+ filterable: {
+ type: Boolean,
+ default: false
+ },
+ localdata: {
+ type: Array,
+ default () {
+ return []
+ }
+ },
+ // #ifndef VUE3
+ value: {
+ type: [String, Number, Array],
+ default: ''
+ },
+ // #endif
+ // #ifdef VUE3
+ modelValue: {
+ type: [String, Number, Array],
+ default: ''
+ },
+ // #endif
+ label: {
+ type: String,
+ default: ''
+ },
+ placeholder: {
+ type: String,
+ default: '璇烽�夋嫨'
+ },
+ emptyTips: {
+ type: String,
+ default: '鏃犻�夐」'
+ },
+ clear: {
+ type: Boolean,
+ default: true
+ },
+ 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: ''
+ },
+ },
+ data() {
+ return {
+ showSelector: false,
+ current: [],
+ mixinDatacomResData: [],
+ apps: [],
+ channels: [],
+ cacheKey: "uni-data-select-lastSelectedValue",
+ placeholderOld: "",
+ currentArr: [],
+ filterInput: "",
+ isFocus: false,
+ windowHeight:0,
+ isDown:true,//涓嬫媺妗嗘槸鍚︽湞涓�
+ };
+ },
+ created() {
+ this.windowHeight=uni.getSystemInfoSync().windowHeight
+ if (this.multiple) {
+ // #ifndef VUE3
+ this.currentArr = this.value || []
+ // #endif
+ // #ifdef VUE3
+ this.currentArr = this.modelValue || []
+ // #endif
+ if (this.current.length > 0) {
+ this.current = []
+ }
+ // #ifndef VUE3
+ if (this.value && this.value.length > 0 && this.filterMixinDatacomResData.length > 0) {
+ this.current = this.value.map(item => {
+ let current = this.mixinDatacomResData.find(e =>
+ e[this.dataValue] == item
+ )
+ return {
+ ...current
+ }
+ })
+ }
+ // #endif
+ // #ifdef VUE3
+ if (this.modelValue && this.modelValue.length > 0 && this.filterMixinDatacomResData.length > 0) {
+ this.current = this.modelValue.map(item => {
+ let current = this.mixinDatacomResData.find(e =>
+ e[this.dataValue] == item
+ )
+ return {
+ ...current
+ }
+ })
+ }
+ // #endif
+
+ } else {
+
+ // #ifndef VUE3
+ if (this.value || this.value == 0) {
+ this.current = this.formatItemName(this.filterMixinDatacomResData.find(e =>
+ e[this.dataValue] == this.value
+ ))
+ }
+ // #endif
+ // #ifdef VUE3
+ if (this.modelValue || this.value == 0) {
+ this.current = this.formatItemName(this.filterMixinDatacomResData.find(e =>
+ e[this.dataValue] == this.modelValue
+ ))
+ }
+ // #endif
+ }
+ this.placeholderOld = this.placeholder
+ this.debounceGet = this.debounce(() => {
+ this.query();
+ }, 300);
+ if (this.collection && !this.localdata.length) {
+ this.debounceGet();
+ }
+ },
+ computed: {
+ filterMixinDatacomResData() {
+ if (this.filterable && this.filterInput) {
+ return this.mixinDatacomResData.filter(e => e[this.dataKey].includes(this.filterInput))
+ } else {
+ return this.mixinDatacomResData
+ }
+ },
+ typePlaceholder() {
+ const text = {
+ 'opendb-stat-app-versions': '鐗堟湰',
+ 'opendb-app-channels': '娓犻亾',
+ 'opendb-app-list': '搴旂敤'
+ }
+ const common = this.placeholder
+ const placeholder = text[this.collection]
+ return placeholder ?
+ common + placeholder :
+ common
+ },
+ valueCom() {
+ // #ifdef VUE3
+ return this.modelValue;
+ // #endif
+ // #ifndef VUE3
+ return this.value;
+ // #endif
+ }
+ },
+ watch: {
+ localdata: {
+ immediate: true,
+ handler(val, old) {
+ if (Array.isArray(val) && old !== val) {
+ this.mixinDatacomResData = val || []
+ }
+
+ }
+ },
+ valueCom: {
+ handler(newVal, oldVal) {
+ // console.log(newVal, oldVal);
+ this.initDefVal()
+ },
+ deep: true,
+ immediate: true
+ },
+ mixinDatacomResData: {
+ immediate: true,
+ handler(val) {
+ if (val.length) {
+ this.initDefVal()
+ }
+ }
+ },
+ },
+ methods: {
+ getIsDown(){
+ const query = uni.createSelectorQuery().in(this);
+ const _this=this
+ query
+ .select(".uni-stat-box")
+ .boundingClientRect((data) => {
+ if(_this.windowHeight-data.top>200){
+ _this.isDown=true
+ }else{
+ _this.isDown=false
+ }
+ })
+ .exec();
+ },
+ 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.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
+ defValue = this.valueCom
+ } else {
+ let strogeValue
+ if (this.collection) {
+ strogeValue = this.getCache()
+ }
+ if (strogeValue || strogeValue === 0) {
+ defValue = strogeValue
+ } else {
+ let defItem = ''
+ if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
+ defItem = this.mixinDatacomResData[this.defItem - 1][this.dataValue]
+ }
+ defValue = defItem
+ }
+ if (defValue || defValue === 0) {
+ this.emit(defValue)
+ }
+ }
+ if (this.multiple) {
+ const mixinDatacomResData = this.mixinDatacomResData || []
+ if (!defValue) defValue = []
+ this.current = defValue.map(item => {
+ const current = mixinDatacomResData.find(e => {
+ return e[this.dataValue] == item
+ })
+ return {
+ ...current
+ }
+ })
+ this.currentArr = this.current.map(e => e[this.dataValue])
+ if (defValue.length < 1) {
+ this.currentArr = []
+ }
+ } else {
+ const def = this.mixinDatacomResData.find(item => item[this.dataValue] === defValue)
+ this.current = def ? this.formatItemName(def) : ''
+ }
+ },
+ /**
+ * @param {[String, Number]} value
+ * 鍒ゆ柇鐢ㄦ埛缁欑殑 value 鏄惁鍚屾椂涓虹鐢ㄧ姸鎬�
+ */
+ isDisabled(value) {
+ let isDisabled = false;
+
+ this.mixinDatacomResData.forEach(item => {
+ if (item[this.dataValue] === value) {
+ isDisabled = item.disable
+ }
+ })
+ return isDisabled;
+ },
+ inputChange(e) {
+ this.$emit('inputChange', e.detail.value)
+ },
+ clearVal() {
+ if (this.disabled) {
+ return
+ }
+ if (this.multiple) {
+ this.current = []
+ this.currentArr = []
+ this.emit([])
+ } else {
+ this.current = ""
+ this.currentArr = []
+ this.emit('')
+ }
+ if (this.collection) {
+ this.removeCache()
+ }
+ this.placeholderOld = this.placeholder
+ this.filterInput = ""
+ },
+ change(item) {
+ if (!item.disable) {
+ if (this.multiple) {
+ if (!this.current) {
+ this.current = []
+ }
+ if (!this.currentArr) {
+ this.currentArr = []
+ }
+ if (this.currentArr.includes(item[this.dataValue])) {
+ let index = this.current.findIndex(e => {
+ return e[this.dataValue] == item[this.dataValue]
+ })
+ this.current.splice(index, 1)
+ this.currentArr.splice(index, 1)
+ this.emit(this.current)
+ } else {
+ this.current.push(item)
+ this.currentArr.push(item[this.dataValue])
+ this.emit(this.current)
+
+ }
+ this.filterInput = ""
+ } else {
+ this.showSelector = false
+ this.current = this.formatItemName(item)
+ if (this.filterable) {
+ this.filterInput = item[this.dataKey]
+ }
+ this.emit(item[this.dataValue])
+ }
+ }
+ },
+ delItem(item) {
+ if (this.disabled) {
+ return
+ }
+ if (this.currentArr.includes(item[this.dataValue])) {
+ let index = this.current.findIndex(e => {
+ return e[this.dataValue] == item[this.dataValue]
+ })
+ this.current.splice(index, 1)
+ this.currentArr.splice(index, 1)
+ this.emit(this.current)
+ }
+ },
+ emit(val) {
+ if (this.multiple) {
+ this.$emit('input', this.currentArr)
+ this.$emit('update:modelValue', this.currentArr)
+ const currentArr = this.mixinDatacomResData.filter(item => this.currentArr.includes(item[this
+ .dataValue]))
+ this.$emit('change', currentArr)
+ } else {
+ this.$emit('input', val)
+ this.$emit('update:modelValue', val)
+ const current = this.mixinDatacomResData.find(item => val == item[this.dataValue])
+ console.log(current);
+ this.$emit('change', current)
+ }
+ if (this.collection) {
+ this.setCache(val);
+ }
+ },
+ toggleSelector() {
+ if (this.disabled) {
+ return
+ }
+ // if (this.filterable && this.filterInput && this.mixinDatacomResData.findIndex(e => {
+ // return e[this.dataKey] == this
+ // .filterInput
+ // }) < 0) {
+ // if (!this.multiple) {
+ // this.filterInput = ""
+ // }
+
+ // }
+ this.getIsDown()
+ this.showSelector = !this.showSelector
+ this.isFocus = this.showSelector
+ if (this.filterable && this.current && this.showSelector) {
+ if (!this.multiple) {
+ this.placeholderOld = this.current
+ // this.filterInput = ""
+ }
+ } else if (this.filterable && !this.current && !this.showSelector) {
+ if (this.placeholderOld != this.placeholder) {
+ if (!this.multiple) {
+ this.current = this.placeholderOld
+ }
+ }
+ }
+ this.filterInput = ""
+
+ },
+ formatItemName(item) {
+ if (!item) {
+ return ""
+ }
+ let text = item[this.dataKey]
+ let value = item[this.dataValue]
+ let {
+ channel_code
+ } = item
+ channel_code = channel_code ? `(${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);
+ },
+ }
+ }
+</script>
+
+<style lang="scss">
+ $uni-base-color: #6a6a6a !default;
+ $uni-main-color: #333 !default;
+ $uni-secondary-color: #909399 !default;
+ $uni-border-3: #e5e5e5;
+
+
+ /* #ifndef APP-NVUE */
+ @media screen and (max-width: 500px) {
+ .hide-on-phone {
+ display: none;
+ }
+ }
+
+ /* #endif */
+ .uni-stat__select {
+ display: flex;
+ align-items: center;
+ // padding: 15px;
+ // cursor: pointer;
+ width: 100%;
+ flex: 1;
+ box-sizing: border-box;
+ }
+
+ .uni-stat-box {
+ width: 100%;
+ flex: 1;
+ }
+
+ .uni-stat__actived {
+ width: 100%;
+ flex: 1;
+ // outline: 1px solid #2979ff;
+ }
+
+ .uni-label-text {
+ font-size: 14px;
+ font-weight: bold;
+ color: $uni-base-color;
+ margin: auto 0;
+ margin-right: 5px;
+ }
+
+ .uni-select {
+ font-size: 14px;
+ border: 1px solid $uni-border-3;
+ box-sizing: border-box;
+ border-radius: 4px;
+ padding: 0 5px;
+ padding-left: 10px;
+ position: relative;
+ /* #ifndef APP-NVUE */
+ display: flex;
+ user-select: none;
+ /* #endif */
+ flex-direction: row;
+ align-items: center;
+ border-bottom: solid 1px $uni-border-3;
+ width: 100%;
+ flex: 1;
+ height: 35px;
+ min-height: 35px;
+
+ &--disabled {
+ background-color: #f5f7fa;
+ cursor: not-allowed;
+ }
+ }
+
+ .uni-select__label {
+ font-size: 16px;
+ // line-height: 22px;
+ min-height: 35px;
+ height: 35px;
+ padding-right: 10px;
+ color: $uni-secondary-color;
+ }
+
+ .uni-select__input-box {
+ width: 100%;
+ height: 35px;
+ position: relative;
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex: 1;
+ flex-direction: row;
+ align-items: center;
+
+ .tag-calss {
+ font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
+ font-weight: 400;
+ -webkit-font-smoothing: antialiased;
+ -webkit-tap-highlight-color: transparent;
+ font-size: 12px;
+ border: 1px solid #d9ecff;
+ border-radius: 4px;
+ white-space: nowrap;
+ height: 24px;
+ padding: 0 4px 0px 8px;
+ line-height: 22px;
+ box-sizing: border-box;
+ margin: 2px 0 2px 6px;
+ display: flex;
+ max-width: 100%;
+ align-items: center;
+ background-color: #f4f4f5;
+ border-color: #e9e9eb;
+ color: #909399;
+
+ .text {
+ font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
+ font-weight: 400;
+ -webkit-font-smoothing: antialiased;
+ -webkit-tap-highlight-color: transparent;
+ font-size: 12px;
+ white-space: nowrap;
+ line-height: 22px;
+ color: #909399;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+ }
+
+ .uni-select__input {
+ flex: 1;
+ font-size: 14px;
+ height: 22px;
+ line-height: 22px;
+ }
+
+ .uni-select__input-plac {
+ font-size: 14px;
+ color: $uni-secondary-color;
+ }
+
+ .uni-select__selector__down {
+ top: calc(100% + 12px);
+
+ .uni-popper__arrow {
+ transform: rotateX(0deg);
+ top: -6px;
+ }
+ }
+
+ .uni-select__selector__upwards {
+ bottom: calc(100% + 12px);
+
+ .uni-popper__arrow {
+ transform: rotateX(180deg);
+ bottom: -6px;
+ }
+ }
+
+ .uni-select__selector {
+ /* #ifndef APP-NVUE */
+ box-sizing: border-box;
+ /* #endif */
+ position: absolute;
+
+ 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: 3;
+ padding: 4px 0;
+ }
+
+ .uni-select__selector-scroll {
+ /* #ifndef APP-NVUE */
+ max-height: 200px;
+ box-sizing: border-box;
+ /* #endif */
+ }
+
+ .uni-select__selector-empty,
+ .uni-select__selector-item {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ // cursor: pointer;
+ /* #endif */
+ line-height: 35px;
+ font-size: 14px;
+ text-align: center;
+ /* border-bottom: solid 1px $uni-border-3; */
+ padding: 0px 10px;
+ }
+
+ .uni-select__selector-item:hover {
+ background-color: #f9f9f9;
+ }
+
+ .uni-select__selector-empty:last-child,
+ .uni-select__selector-item:last-child {
+ /* #ifndef APP-NVUE */
+ border-bottom: none;
+ /* #endif */
+ }
+
+ .uni-select_selector-item_active {
+ color: #409eff;
+ font-weight: bold;
+ background-color: #f5f7fa;
+ border-radius: 3px;
+ }
+
+ .uni-select__selector__disabled {
+ opacity: 0.4;
+ cursor: default;
+ }
+
+ /* 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 {
+ filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
+
+ left: 10%;
+ margin-right: 3px;
+ border-top-width: 0;
+ border-bottom-color: #EBEEF5;
+ }
+
+ .uni-popper__arrow::after {
+ content: " ";
+ top: 1px;
+ margin-left: -6px;
+ border-top-width: 0;
+ border-bottom-color: #fff;
+ }
+
+ .uni-select__input-text {
+ // width: 280px;
+ width: 90%;
+ color: $uni-main-color;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ -o-text-overflow: ellipsis;
+ overflow: hidden;
+ }
+
+ .uni-select__input-placeholder {
+ color: $uni-base-color;
+ font-size: 12px;
+ }
+
+ .uni-select--mask {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ right: 0;
+ left: 0;
+ z-index: 2;
+ }
+</style>
\ No newline at end of file
diff --git a/uni_modules/zxz-uni-data-select/package.json b/uni_modules/zxz-uni-data-select/package.json
new file mode 100644
index 0000000..397169b
--- /dev/null
+++ b/uni_modules/zxz-uni-data-select/package.json
@@ -0,0 +1,86 @@
+{
+ "id": "zxz-uni-data-select",
+ "displayName": "zxz-uni-data-select 涓嬫媺妗嗛�夋嫨鍣�(娣诲姞涓嬫媺妗嗘绱紝澶氶�夊姛鑳斤紝澶氶�夋悳绱㈠姛鑳斤紝鑷畾涔夋暟鎹�)",
+ "version": "1.0.20",
+ "description": "閫氳繃鏁版嵁椹卞姩鐨勪笅鎷夋閫夋嫨鍣�(娣诲姞涓嬫媺妗嗘绱紝澶氶�夊姛鑳斤紝澶氶�夋悳绱㈠姛鑳斤紝鑷畾涔夋暟鎹�)",
+ "keywords": [
+ "uni-ui",
+ "select",
+ "uni-data-select",
+ "涓嬫媺妗�",
+ "涓嬫媺閫夋嫨妗�"
+],
+ "repository": "",
+ "engines": {
+ "HBuilderX": "^3.1.1"
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+"dcloudext": {
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "鏃�",
+ "data": "鏃�",
+ "permissions": "鏃�"
+ },
+ "npmurl": "",
+ "type": "component-vue"
+ },
+ "uni_modules": {
+ "dependencies": ["uni-load-more"],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y",
+ "alipay": "n"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "寰俊娴忚鍣�(Android)": "y",
+ "QQ娴忚鍣�(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "灏忕▼搴�": {
+ "寰俊": "y",
+ "闃块噷": "y",
+ "鐧惧害": "y",
+ "瀛楄妭璺冲姩": "y",
+ "QQ": "y",
+ "浜笢": "y"
+ },
+ "蹇簲鐢�": {
+ "鍗庝负": "y",
+ "鑱旂洘": "y"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
diff --git a/uni_modules/zxz-uni-data-select/readme.md b/uni_modules/zxz-uni-data-select/readme.md
new file mode 100644
index 0000000..cfd4ea0
--- /dev/null
+++ b/uni_modules/zxz-uni-data-select/readme.md
@@ -0,0 +1,37 @@
+## DataSelect 涓嬫媺妗嗛�夋嫨鍣� <strong style="color:orangered;"><em>鍏堝鍏ョず渚嬮」鐩�</em></strong> 鐪嬬湅鏄惁婊¤冻闇�姹傦紝鐒跺悗鍐嶄笅杞芥彃浠讹紝鏈夐棶棰樺彲浠ュ姞寰�<strong style="color:orangered;"><em>weiyila520</em></strong>
+> **缁勪欢鍚嶏細zxz-uni-data-select**
+> 浠g爜鍧楋細 `zxz-uni-data-select`
+
+鏈彃浠跺熀浜庡畼鏂规彃浠� [uni-data-select](https://ext.dcloud.net.cn/plugin?id=7993) 杩涜浜屾寮�鍙戞嫇灞曞姛鑳斤紝鏀寔uni-data-select鏈韩鍔熻兘涓嶅彉锛堣〃鍗曢獙璇佺瓑锛�
+
+<h1>鎷撳睍鍔熻兘</h1>
+<ol>
+<li>鏀寔澶氶�夊姛鑳�</li>
+<li>鏀寔閫夐」绂佺敤</li>
+<li>鏀寔鑷畾涔夋樉绀哄��</li>
+<li>鏀寔鎼滅储</li>
+<li>鏀寔澶氶�夋椂灏嗛�変腑鍊兼寜鏂囧瓧褰㈠紡灞曠ず</li>
+<li>鏀寔涓嬫媺鑿滃崟婧㈠嚭灞忓箷搴曢儴鏃惰嚜鍔ㄦ敼涓哄悜涓婂脊鍑�</li>
+<li>鐩戝惉鎼滅储杈撳叆浜嬩欢</li>
+</ol>
+
+<h2>API</h2>
+### zxz-uni-data-select Props
+
+| 灞炴�у悕 | 绫诲瀷 | 榛樿鍊� | 璇存槑 |
+| - | - | - | - |
+| v-model | String銆丄rray銆丯umber |- | 閫変腑椤圭粦瀹氬�� |
+| multiple | Boolean | false | 鏄惁澶氶�� |
+| disabled | Boolean |false | 鏄惁绂佺敤 |
+| dataKey | String |"key" | 浣滀负 key 鍞竴鏍囪瘑鐨勯敭鍚� |
+| dataValue | String | "value" | 浣滀负 value 鍞竴鏍囪瘑鐨勯敭鍚� |
+| filterable | Boolean | false | 鏄惁寮�鍚悳绱� |
+| collapseTags | Boolean | false | 澶氶�夋椂鏄惁灏嗛�変腑鍊兼寜鏂囧瓧鐨勫舰寮忓睍绀� |
+|collapseTagsNum|Number | 1 | 澶氶�夋椂閫変腑鍊兼寜鏂囧瓧鐨勫舰寮忓睍绀虹殑鏁伴噺 |
+| localdata | Array |- | 涓嬫媺鍒楄〃鏈湴鏁版嵁 |
+|label | String | - | 宸︿晶鏍囬 |
+|placeholder | String | "璇烽�夋嫨" | 杈撳叆妗嗙殑鎻愮ず鏂囧瓧 |
+|emptyTips | String |"鏃犻�夐」" | 鏃犻�夐」鎻愮ず |
+|clear | Boolean | true | 鏄惁娓呯┖ |
+|format | String | - | 鏍煎紡鍖栬緭鍑� 鐢ㄦ硶 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"|
+|@inputChange | event | event(String) | 鎼滅储杈撳叆浜嬩欢 |
\ No newline at end of file
--
Gitblit v1.9.1