From ab826d12b52265bc4f25044d43a042df2104f972 Mon Sep 17 00:00:00 2001 From: kyy <3283105747@qq.com> Date: 星期一, 14 七月 2025 21:34:10 +0800 Subject: [PATCH] 最新代码 --- pages/QC/LLJ/List.vue | 1406 ++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 870 insertions(+), 536 deletions(-) diff --git a/pages/QC/LLJ/List.vue b/pages/QC/LLJ/List.vue index 92925a3..a9ab9c8 100644 --- a/pages/QC/LLJ/List.vue +++ b/pages/QC/LLJ/List.vue @@ -1,309 +1,271 @@ <template> - <view> - <!-- 鍒锋柊椤甸潰鍚庣殑椤堕儴鎻愮ず妗� --> + <view class="page-container"> + <!-- 鍒锋柊鎻愮ず妗� --> <view class="tips" :class="{ 'tips-ani': tipShow }">鍒锋柊鎴愬姛</view> - <!-- 鎼滅储妗� --> - <view class="search-bar"> - <view class="search-bar-box"> - <input class="search-text" type="text" v-model="searchQuery" @keypress.enter="getInputValue" - placeholder="瑙勬牸" style="font-size: 16px;" /> - <input class="search-text" type="text" v-model="searchQueryItemNo" @keypress.enter="getInputValue" - placeholder="鐗╂枡缂栧彿" style="font-size: 16px;"/> - <input class="search-text" type="text" v-model="searchQueryItemName" @keypress.enter="getInputValue" - placeholder="鐗╂枡鍚嶇О" style="font-size: 16px;"/> - <input class="search-text" type="text" v-model="searchQuerySupp" @keypress.enter="getInputValue" - placeholder="渚涘簲鍟�" style="font-size: 16px;"/> - <input class="search-text" type="text" v-model="searchQueryBy" @keypress.enter="getInputValue" - placeholder="閫佹浜�" style="font-size: 16px;"/> - <input class="search-text" type="text" v-model="searchQueryReNo" @keypress.enter="getInputValue" - placeholder="妫�楠屽崟鍙�" style="font-size: 16px;"/> - - <button class="search-btn" @click="getInputValue">鎼滅储</button> + <!-- 鍥哄畾澶撮儴鍖哄煙 --> + <view class="fixed-header"> + <!-- 鎼滅储鏍忔牱寮� --> + <view class="search-bar"> + <view class="search-card"> + <picker mode="selector" :range="searchOptions" v-model="selectedOption" @change="onPickerChange"> + <view class="picker"> + {{ searchOptions[selectedOption] }} + </view> + </picker> + <input class="search-input" type="text" v-model="searchValue" @keypress.enter="getInputValue" + placeholder="璇疯緭鍏ユ悳绱㈠��" /> + <button class="search-btn" @click="getInputValue">鎼滅储</button> + </view> + </view> + + <!-- 閫夐」鍗℃牱寮� --> + <view class="newsTab"> + <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="button" + active-color="#165DFF"></uni-segmented-control> </view> </view> + <!-- 鍐呭鍖哄煙 --> + <view class="content-container"> + <view v-show="current === 0"> + <uni-list> + <uni-list-item class="list-card" v-for="item in data" :key="item.id" + :to="'Add?id=' + item.id + '&lotNo=' + item.lotNo + '&releaseNo=' + item.releaseNo"> + <template v-slot:header> + <view class="card-header"> + <view class="header-content"> + <!-- 鍗曞彿淇℃伅鍖哄煙 - 浼樺寲甯冨眬 --> + <view class="order-info"> + <view class="order-row"> + <view class="order-item"> + <view class="order-label">閿�鍞崟鍙�</view> + <view class="order-value">{{ item.salesOrderId }}</view> + </view> + <view class="order-item"> + <view class="order-label">妫�楠屽崟鍙�</view> + <view class="order-value">{{ item.releaseNo }}</view> + </view> + </view> + <view class="order-row"> + <view class="order-item"> + <view class="order-label">鍒拌揣鍗曞彿</view> + <view class="order-value">{{ item.lotNo }}</view> + </view> + </view> + </view> - <view class="newsTab"> - <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="button" - active-color="#87cefa"></uni-segmented-control> - <view class="content"> - <view v-show="current===0"> - <!-- 鍩轰簬 uni-list 鐨勯〉闈㈠竷灞� --> - <uni-list> - <!-- to 灞炴�ф惡甯﹀弬鏁拌烦杞鎯呴〉闈紝褰撳墠鍙负鍙傝�� --> - <uni-list-item - style="margin-top: 10px;background-color:#EFEFF4;border-radius: 5px;border: 5px solid #0d9ff5;" - class="list-item" direction="column" v-for="item in data" :key="item.id" - :to="'Add?id='+item.id+'&lotNo='+item.lotNo+'&releaseNo='+item.releaseNo"> - <!-- 閫氳繃header鎻掓Ы瀹氫箟鍒楄〃鐨勬爣棰� --> - - <template v-slot:header> - <view class="form-group uni-title" style="margin-bottom: 0;"> - <label class="form-label">閿�鍞崟鍙�:</label> - <input class="form-input" disabled="true" type="text" v-model="item.salesOrderId" /> - </view> - <view class="form-group uni-title" style="margin-bottom: 0;"> - <label class="form-label">妫�楠屽崟鍙�:</label> - <input class="form-input" disabled="true" type="text" v-model="item.releaseNo" /> - </view> - </template> - <!-- 閫氳繃body鎻掓Ы瀹氫箟鍒楄〃鍐呭鏄剧ず --> - <template v-slot:body> - - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label lab">鍒拌揣鍗曞彿:</label> - <input class="form-input" disabled="true" type="text" v-model="item.lotNo" /> + <!-- 鐘舵�佹爣绛� - 璋冩暣浣嶇疆 --> + <view class="status-badge" :class="item.fsubmit == 1 ? 'approved' : 'pending'"> + {{ item.fsubmit == 1 ? '宸叉彁浜�' : '寰呮彁浜�' }} </view> </view> - <checkbox-group style="background-color: white;border-bottom: 1px solid #c7c7c7;"> - <label> + </view> + </template> + <template v-slot:body> + <view class="card-body"> + <!-- 妫�楠屼汉淇℃伅绉昏嚦姝ゅ --> + <view class="inspector-info"> + <view class="info-row"> + <view class="info-label">妫�楠屼汉</view> + <view class="info-value">{{ item.modify1By || '寰呮楠�' }}</view> + </view> + <view class="info-row"> + <view class="info-label">妫�楠屾椂闂�</view> + <view class="info-value">{{ item.iqcDate || '鏈楠�' }}</view> + </view> + <view class="info-row"> + <view class="info-label">妫�娴嬬粨鏋�</view> + <view class="info-value result-badge" :class="{ + 'pass': item.fcheckResu === '鍚堟牸', + 'fail': item.fcheckResu === '涓嶅悎鏍�', + 'pending': !item.fcheckResu || item.fcheckResu === '鏈楠�' + }"> + {{ item.fcheckResu || '鏈楠�' }} + </view> + </view> + </view> + + <view class="checkbox-group"> + <label class="checkbox-item"> <checkbox value="F_TYPE" disabled="true" :checked="item.ftype == 1" /> 濮斿 </label> - <label> + <label class="checkbox-item"> <checkbox value="URGENT_FLAG" disabled="true" :checked="item.urgentFlag == 1" /> 鎬ユ枡鏍囪瘑 </label> - <label> - <checkbox value="URGENT_FLAG" disabled="true" :checked="item.fsubmit == 1" /> - 鎻愪氦鏍囪瘑 - </label> - </checkbox-group> - <view style="margin-top: 0;"> - <view class="uni-content"> - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label lab">鍒涘缓鏃堕棿:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.createDate" /> - </view> - </view> - <view class="uni-note"> - <view class="form-group"> - <label class="form-label lab">鍒涘缓浜�:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.createBy" /> - </view> - </view> + </view> - - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label lab">鐗╂枡缂栫爜:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.itemNo" /> - </view> + <!-- 淇℃伅缃戞牸甯冨眬 - 浼樺寲鍒楀垎閰� --> + <view class="info-grid"> + <view class="grid-row"> + <view class="grid-item"> + <label class="grid-label">鍒涘缓鏃堕棿</label> + <view class="grid-value">{{ item.createDate }}</view> </view> - - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label">鐗╂枡鍚嶇О:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.itemName" /> - </view> + <view class="grid-item"> + <label class="grid-label">鍒涘缓浜�</label> + <view class="grid-value">{{ item.createBy }}</view> </view> - - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label">瑙勬牸鍨嬪彿:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.itemModel" /> - </view> + <view class="grid-item"> + <label class="grid-label">鐗╂枡缂栫爜</label> + <view class="grid-value">{{ item.itemNo }}</view> </view> - - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label">鏁伴噺:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.fcovertQty" /> - </view> + </view> + <view class="grid-row"> + <view class="grid-item"> + <label class="grid-label">鐗╂枡鍚嶇О</label> + <view class="grid-value">{{ item.itemName }}</view> </view> - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label">渚涘簲鍟�:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.suppName" /> - </view> + <view class="grid-item"> + <label class="grid-label">瑙勬牸鍨嬪彿</label> + <view class="grid-value">{{ item.itemModel }}</view> </view> - <view class="uni-note" style="color: red"> - <view class="form-group"> - <label class="form-label lab">閫侀獙浜�:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.fcheckBy" /> - </view> - </view> - <view class="uni-note" style="color: red"> - <view class="form-group"> - <label class="form-label lab">妫�楠屼汉:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.modify1By" /> - </view> + <view class="grid-item"> + <label class="grid-label">鏁伴噺</label> + <view class="grid-value">{{ item.fcovertQty }}</view> </view> - <view class="uni-note" style="color: red"> - <view class="form-group"> - <label class="form-label lab">妫�楠屾椂闂�:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.iqcDate" /> - </view> + </view> + <view class="grid-row"> + <view class="grid-item"> + <label class="grid-label">渚涘簲鍟�</label> + <view class="grid-value">{{ item.suppName }}</view> </view> - <view class="uni-note" style="color: red"> - <view class="form-group"> - <label class="form-label lab">妫�娴嬬粨鏋�:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.fcheckResu" /> - </view> + <view class="grid-item"> + <label class="grid-label">閫侀獙浜�</label> + <view class="grid-value">{{ item.fcheckBy }}</view> </view> </view> </view> - </template> - </uni-list-item> - </uni-list> - <!-- 閫氳繃 loadMore 缁勪欢瀹炵幇涓婃媺鍔犺浇鏁堟灉锛屽闇�鑷畾涔夋樉绀哄唴瀹癸紝鍙弬鑰冿細https://ext.dcloud.net.cn/plugin?id=29 --> - <!-- <uni-load-more v-if="loading || options.status === 'noMore' " :status="options.status" /> --> - - <!-- <view class="fab" @click="handleFabClick"> - <text class="fab-icon">+</text> - </view> --> - <view class="plus-button" @click="handleFabClick"> - + - </view> - </view> - <view v-show="current===1"> - <uni-list> - <!-- to 灞炴�ф惡甯﹀弬鏁拌烦杞鎯呴〉闈紝褰撳墠鍙负鍙傝�� --> - <uni-list-item style="margin-top: 10px;background-color:#EFEFF4;border-radius:5px;" - class="list-item" direction="column" v-for="item in data" :key="item.id" - :to="'Add?id='+item.id+'&lotNo='+item.lotNo+'&releaseNo='+item.releaseNo"> - <!-- 閫氳繃header鎻掓Ы瀹氫箟鍒楄〃鐨勬爣棰� --> - - <template v-slot:header> - <view class="form-group uni-title" style="margin-bottom: 0;"> - <label class="form-label">閿�鍞崟鍙�:</label> - <input class="form-input" disabled="true" type="text" v-model="item.salesOrderId" /> - </view> - <view class="form-group uni-title" style="margin-bottom: 0;"> - <label class="form-label">妫�楠屽崟鍙�:</label> - <input class="form-input" disabled="true" type="text" v-model="item.releaseNo" /> - </view> - </template> - <!-- 閫氳繃body鎻掓Ы瀹氫箟鍒楄〃鍐呭鏄剧ず --> - - <template v-slot:body> - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label lab">鍒拌揣鍗曞彿:</label> - <input class="form-input" disabled="true" type="text" v-model="item.lotNo" /> - </view> - </view> - <checkbox-group style="background-color: white;border-bottom: 1px solid #c7c7c7;"> - <label> - <checkbox value="F_TYPE" disabled="true" :checked="item.fType == 1" /> - 濮斿 - </label> - <label> - <checkbox value="URGENT_FLAG" disabled="true" :checked="item.urgentFlag == 1" /> - 鎬ユ枡鏍囪瘑 - </label> - <label> - <checkbox value="URGENT_FLAG" disabled="true" :checked="item.fsubmit == 1" /> - 鎻愪氦鏍囪瘑 - </label> - </checkbox-group> - - <view style="margin-top: 0;"> - <view class="uni-content"> - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label lab">鍒涘缓鏃堕棿:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.createDate" /> - </view> - </view> - <view class="uni-note"> - <view class="form-group"> - <label class="form-label lab">鍒涘缓浜�:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.createBy" /> - </view> - </view> - - - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label lab">鐗╂枡缂栫爜:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.itemNo" /> - </view> - </view> - - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label">鐗╂枡鍚嶇О:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.itemName" /> - </view> - </view> - - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label">瑙勬牸鍨嬪彿:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.itemModel" /> - </view> - </view> - - - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label">鏁伴噺:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.fcovertQty" /> - </view> - </view> - </view> - <view class="uni-title-sub uni-ellipsis-2"> - <view class="form-group"> - <label class="form-label">渚涘簲鍟�:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.suppName" /> - </view> - <view class="uni-note" style="color: red"> - <view class="form-group"> - <label class="form-label lab">閫佹浜�:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.fcheckBy" /> - </view> - </view> - <view class="uni-note" style="color: red"> - <view class="form-group"> - <label class="form-label lab">妫�楠屼汉:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.modify1By" /> - </view> - </view> - <view class="uni-note" style="color: red"> - <view class="form-group"> - <label class="form-label lab">妫�楠屾椂闂�:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.iqcDate" /> - </view> - </view> - <view class="uni-note" style="color: red"> - <view class="form-group"> - <label class="form-label lab">妫�娴嬬粨鏋�:</label> - <input class="form-input" disabled="true" type="text" - v-model="item.fcheckResu" /> - </view> - </view> - </view> - </view> - </template> - </uni-list-item> - </uni-list> + </view> + </template> + </uni-list-item> + </uni-list> + <view class="plus-button" @click="handleFabClick"> + + </view> </view> + <!-- 绗簩涓�夐」鍗″唴瀹圭渷鐣ワ紝涓庣涓�涓被浼� --> + <view v-show="current === 1"> + <uni-list> + <uni-list-item class="list-card" v-for="item in data" :key="item.id" + :to="'Add?id=' + item.id + '&lotNo=' + item.lotNo + '&releaseNo=' + item.releaseNo"> + <template v-slot:header> + <view class="card-header"> + <view class="header-content"> + <!-- 鍗曞彿淇℃伅鍖哄煙 - 浼樺寲甯冨眬 --> + <view class="order-info"> + <view class="order-row"> + <view class="order-item"> + <view class="order-label">閿�鍞崟鍙�</view> + <view class="order-value">{{ item.salesOrderId }}</view> + </view> + <view class="order-item"> + <view class="order-label">妫�楠屽崟鍙�</view> + <view class="order-value">{{ item.releaseNo }}</view> + </view> + </view> + <view class="order-row"> + <view class="order-item"> + <view class="order-label">鍒拌揣鍗曞彿</view> + <view class="order-value">{{ item.lotNo }}</view> + </view> + </view> + </view> + + <!-- 鐘舵�佹爣绛� - 璋冩暣浣嶇疆 --> + <view class="status-badge" :class="item.fsubmit == 1 ? 'approved' : 'pending'"> + {{ item.fsubmit == 1 ? '宸叉彁浜�' : '寰呮彁浜�' }} + </view> + </view> + </view> + </template> + <template v-slot:body> + <view class="card-body"> + <!-- 妫�楠屼汉淇℃伅绉昏嚦姝ゅ --> + <view class="inspector-info"> + <view class="info-row"> + <view class="info-label">妫�楠屼汉</view> + <view class="info-value">{{ item.modify1By || '寰呮楠�' }}</view> + </view> + <view class="info-row"> + <view class="info-label">妫�楠屾椂闂�</view> + <view class="info-value">{{ item.iqcDate || '鏈楠�' }}</view> + </view> + <view class="info-row"> + <view class="info-label">妫�娴嬬粨鏋�</view> + <view class="info-value result-badge" :class="{ + 'pass': item.fcheckResu === '鍚堟牸', + 'fail': item.fcheckResu === '涓嶅悎鏍�', + 'pending': !item.fcheckResu || item.fcheckResu === '鏈楠�' + }"> + {{ item.fcheckResu || '鏈楠�' }} + </view> + </view> + </view> + + <view class="checkbox-group"> + <label class="checkbox-item"> + <checkbox value="F_TYPE" disabled="true" :checked="item.ftype == 1" /> + 濮斿 + </label> + <label class="checkbox-item"> + <checkbox value="URGENT_FLAG" disabled="true" :checked="item.urgentFlag == 1" /> + 鎬ユ枡鏍囪瘑 + </label> + </view> + + <!-- 淇℃伅缃戞牸甯冨眬 - 浼樺寲鍒楀垎閰� --> + <view class="info-grid"> + <view class="grid-row"> + <view class="grid-item"> + <label class="grid-label">鍒涘缓鏃堕棿</label> + <view class="grid-value">{{ item.createDate }}</view> + </view> + <view class="grid-item"> + <label class="grid-label">鍒涘缓浜�</label> + <view class="grid-value">{{ item.createBy }}</view> + </view> + <view class="grid-item"> + <label class="grid-label">鐗╂枡缂栫爜</label> + <view class="grid-value">{{ item.itemNo }}</view> + </view> + </view> + <view class="grid-row"> + <view class="grid-item"> + <label class="grid-label">鐗╂枡鍚嶇О</label> + <view class="grid-value">{{ item.itemName }}</view> + </view> + <view class="grid-item"> + <label class="grid-label">瑙勬牸鍨嬪彿</label> + <view class="grid-value">{{ item.itemModel }}</view> + </view> + <view class="grid-item"> + <label class="grid-label">鏁伴噺</label> + <view class="grid-value">{{ item.fcovertQty }}</view> + </view> + </view> + <view class="grid-row"> + <view class="grid-item"> + <label class="grid-label">渚涘簲鍟�</label> + <view class="grid-value">{{ item.suppName }}</view> + </view> + <view class="grid-item"> + <label class="grid-label">閫侀獙浜�</label> + <view class="grid-value">{{ item.fcheckBy }}</view> + </view> + </view> + </view> + </view> + </template> + </uni-list-item> + </uni-list> + <view class="plus-button" @click="handleFabClick"> + + + </view> + </view> + </view> </view> </template> @@ -320,143 +282,100 @@ limit: 20, totalPage: 0, totalCount: 0, - noData: false, // 娌℃湁鏇村鏁版嵁浜� - isLoading: false, // 鏄惁姝e湪鍔犺浇 + noData: false, + isLoading: false, tipShow: false, - searchQuery: '' ,//鎼滅储閿�鍞鍗曞彿鍐呭 - searchQueryItemNo:'',//鎼滅储鐗╂枡鍐呭 - searchQuerySupp:'',//鎼滅储渚涘簲鍟� - searchQueryBy:'',//鎼滅储閫佹浜� - searchQueryItemName:'',//鎼滅储鐗╂枡鍚嶇О - searchQueryReNo:'',//鎼滅储閫佹鍗曞彿 + searchOptions: ['鐗╂枡缂栧彿', '瑙勬牸', '鐗╂枡鍚嶇О', '渚涘簲鍟�', '閫佹浜�', '妫�楠屽崟鍙�'], + selectedOption: 0, + searchValue: '', + copiedText: '', + headerHeight: 0, }; }, onLoad() { - //椤甸潰鍔犺浇鏃惰皟鐢ㄧ殑浜嬩欢 + uni.createSelectorQuery().select('.fixed-header').boundingClientRect(rect => { + this.headerHeight = rect.height; + }).exec(); + this.init(); }, methods: { - - //2024-10-28 kyy + onPickerChange(e) { + this.selectedOption = e.detail.value; + }, getInputValue() { - console.log('杩欐槸杈撳叆鐨勫��:', this.searchQuery); // 妫�鏌ヤ簨浠舵槸鍚﹁Е鍙� + this.pageIndex = 1; // 鎼滅储鏃堕噸缃〉鐮� + this.loadData(); // 璋冪敤缁熶竴鐨勬暟鎹姞杞芥柟娉� + }, + loadData() { let result = "鏈畬鎴�"; if (this.current === 1) { result = "宸插畬鎴�"; } - if (this.isLoading) return; // 濡傛灉姝e湪鍔犺浇鍒欎笉缁х画鎵ц + if (this.isLoading) return; this.isLoading = true; - //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴� let userName = this.$loginInfo.account; - let url1; - /*if (this.searchQuery == null || this.searchQuery.trim() === ''&& - this.searchQueryItemNo == null || this.searchQueryItemNo.trim() === ''&& - this.searchQuerySupp == null || this.searchQuerySupp.trim() === '' - ) */ - if (this.searchQuery != null && this.searchQuery.trim() !== '' || - this.searchQueryItemNo != null && this.searchQueryItemNo.trim() !== '' || - this.searchQueryBy != null && this.searchQueryBy.trim() !== '' || - this.searchQueryItemName != null && this.searchQueryItemName.trim() !== '' || - this.searchQueryReNo != null && this.searchQueryReNo.trim() !== '' || - this.searchQuerySupp != null && this.searchQuerySupp.trim() !== '' - ) - { - url1 = '/LLJ/getSearchPage'; - - } else { - url1 = '/LLJ/getPage'; - //url1 = '/LLJ/getSearchPage'; - + let url = "/LLJ/getPage"; // 榛樿璋冪敤getPage + let requestData = { + pageIndex: this.pageIndex, + limit: this.limit, + createUser: userName, + result: result }; - //閲嶇疆璧峰椤� - //this.pageIndex = 1; - console.log('杩欐槸杈撳叆鐨勫��:', url1); // 妫�鏌ヤ簨浠舵槸鍚﹁Е鍙� - //椤甸潰鍔犺浇鏃惰皟鐢ㄧ殑浜嬩欢 - this.$post({ - url: url1, - data: { - pageIndex: this.pageIndex, - limit: this.limit, - createUser: userName, - SalesOrder: this.searchQuery, - ItemNo: this.searchQueryItemNo, - SuppNameContains: this.searchQuerySupp, - SongJ: this.searchQueryBy, - SongNo: this.searchQueryReNo, - ItemName:this.searchQueryItemName, - result: result + + // 鍒ゆ柇鎼滅储妗嗘槸鍚︽湁鍊� + if (this.searchValue != null && this.searchValue.trim() !== '') { + url = '/LLJ/getSearchPage'; // 鏈夊�煎垯璋冪敤getSearchPage + + // 鏍规嵁閫夋嫨鐨勬悳绱㈤�夐」璁剧疆鎼滅储鏉′欢 + switch (this.selectedOption) { + case 0: + requestData.ItemNo = this.searchValue; + break; + case 1: + requestData.SalesOrder = this.searchValue; + break; + case 2: + requestData.ItemName = this.searchValue; + break; + case 3: + requestData.SuppNameContains = this.searchValue; + break; + case 4: + requestData.SongJ = this.searchValue; + break; + case 5: + requestData.SongNo = this.searchValue; + break; } + } + + this.$post({ + url: url, + data: requestData }).then(res => { if (this.pageIndex === 1) { - // 濡傛灉鏄涓�椤碉紝鐩存帴瑕嗙洊鍘熸暟鎹� - this.data = []; this.data = res.data.tbBillList; } else { - if (res.data.tbBillList.length > 0) { - // 濡傛灉鏄笅涓�椤碉紝杩藉姞鏂版暟鎹� this.data = [...this.data, ...res.data.tbBillList]; } - } this.totalCount = res.data.totalCount; this.totalPage = Math.ceil(this.totalCount / this.limit); this.noData = this.pageIndex >= this.totalPage; - this.isLoading = false; // 缁撴潫鍔犺浇 + this.isLoading = false; }).catch(() => { - this.isLoading = false; // 鍑虹幇閿欒鏃剁粨鏉熷姞杞� + this.isLoading = false; + this.searchValue = ''; }); - }, init() { - - let result = "鏈畬鎴�"; - if (this.current === 1) { - result = "宸插畬鎴�"; - } - - if (this.isLoading) return; // 濡傛灉姝e湪鍔犺浇鍒欎笉缁х画鎵ц - - this.isLoading = true; - - //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴� - let userName = this.$loginInfo.account; - - //椤甸潰鍔犺浇鏃惰皟鐢ㄧ殑浜嬩欢 - this.$post({ - url: "/LLJ/getPage", - data: { - pageIndex: this.pageIndex, - limit: this.limit, - //pageIndex: 1, - //limit: 20, - createUser: userName, - result: result - } - }).then(res => { - if (this.pageIndex === 1) { - // 濡傛灉鏄涓�椤碉紝鐩存帴瑕嗙洊鍘熸暟鎹� - this.data = res.data.tbBillList; - } else { - - if (res.data.tbBillList.length > 0) { - // 濡傛灉鏄笅涓�椤碉紝杩藉姞鏂版暟鎹� - this.data = [...this.data, ...res.data.tbBillList]; - } - - } - this.totalCount = res.data.totalCount; - this.totalPage = Math.ceil(this.totalCount / this.limit); - - this.noData = this.pageIndex >= this.totalPage; - this.isLoading = false; // 缁撴潫鍔犺浇 - }).catch(() => { - this.isLoading = false; // 鍑虹幇閿欒鏃剁粨鏉熷姞杞� - }); + this.loadData(); // 缁熶竴璋冪敤loadData鏂规硶 }, handleFabClick() { uni.navigateTo({ @@ -468,218 +387,633 @@ this.current = index.currentIndex; this.data = []; this.pageIndex = 1; - this.init(); + this.loadData(); // 閫夐」鍗″垏鎹㈡椂璋冪敤loadData } }, + copyText(text) { + uni.setClipboardData({ + data: text, + success: () => { + this.copiedText = text; + this.tipShow = true; + setTimeout(() => { + this.tipShow = false; + }, 1000); + } + }); + } }, - - - /** - * 涓嬫媺鍒锋柊鍥炶皟鍑芥暟 - */ onPullDownRefresh() { this.pageIndex = 1; - //閲嶆柊鎵ц涓�閬嶆煡璇� - this.init(); + this.loadData(); this.tipShow = true; - //鍏抽棴鍔ㄧ敾 uni.stopPullDownRefresh(); - setTimeout(function() { + setTimeout(() => { this.tipShow = false; - }, 3000); + }, 1000); }, - /** - * 涓婃媺鍔犺浇鍥炶皟鍑芥暟 - */ onReachBottom() { if (this.noData || this.isLoading) return; this.pageIndex++; - this.init(); // 鍔犺浇鏇村鏁版嵁 - - setTimeout(function() { - this.tipShow = false; - console.log(111); - }, 3000); - }, - onShow() { - //姣忔杩涘叆椤甸潰閮戒細鎵ц鐨勬柟娉� - //this.pageIndex = 1; - // this.data = []; - // //this.current = 0 - // this.init(); + this.loadData(); // 涓婃媺鍔犺浇鏃惰皟鐢╨oadData } - }; </script> <style lang="scss"> - @import '@/common/uni-ui.scss'; - - .uni-note { - margin-top: 0; + /* 鍩虹閰嶈壊鏂规涓嶅彉 */ + :root { + --primary-color: #4080FF; + /* 涓昏壊璋� - 钃濊壊 */ + --primary-light: #E6F0FF; + /* 涓昏壊娴呰壊 */ + --success-color: #00B42A; + /* 鎴愬姛鑹� - 缁胯壊 */ + --warning-color: #FF7D00; + /* 璀﹀憡鑹� - 姗欒壊 */ + --danger-color: #F53F3F; + /* 鍗遍櫓鑹� - 绾㈣壊 */ + --pending-color: #FFC107; + /* 寰呭鐞嗚壊 - 榛勮壊 */ + --text-color: #1D2129; + /* 涓绘枃鏈壊 */ + --text-secondary: #4E5969; + /* 娆¤鏂囨湰鑹� */ + --bg-color: #F7F8FA; + /* 鑳屾櫙鑹� */ + --card-bg: #FFFFFF; + /* 鍗$墖鑳屾櫙鑹� */ + --border-color: #E5E6EB; + /* 杈规鑹� */ } - /* Set the input backgrounds to be gray */ - .form-input { - background-color: #f2f2f2; - /* Or any other shade of gray you prefer */ - } - - /* Ensure automatic adaptation based on page size */ - .form-group { - display: flex; - align-items: center; - } - - .form-label { - margin-bottom: 0; - border-bottom: 1px solid #FFFFFF; - padding: 5px; - font-size: 12px; - width: 60px; - /* Adjust the font size as per your requirement */ - } - - .form-input { - flex: 1; - margin-bottom: 0; - border-bottom: 1px solid #c7c7c7; - padding: 5px; - font-size: 12px; - background-color: #FFFFFF; - /* Adjust the font size as per your requirement */ - } - - .plus-button { - position: fixed; - bottom: 20px; - right: 20px; - width: 60px; - height: 60px; - border-radius: 50%; - background-color: #007bff; - color: #ffffff; - text-align: center; - line-height: 59px; - font-size: 24px; - cursor: pointer; - z-index: 1000; - margin-bottom: 35px; - } - + /* 椤甸潰鏁翠綋鏍峰紡涓嶅彉 */ page { + background-color: var(--bg-color); + min-height: 100vh; display: flex; flex-direction: column; - box-sizing: border-box; - background-color: #efeff4; - min-height: 100%; - height: auto; } + .page-container { + padding: 0; + flex: 1; + display: flex; + flex-direction: column; + } + + /* 椤堕儴鎻愮ず妗嗕笉鍙� */ .tips { - color: #67c23a; - font-size: 14px; - line-height: 40px; + color: var(--success-color); + font-size: 28rpx; + line-height: 80rpx; text-align: center; - background-color: #f0f9eb; + background-color: rgba(0, 180, 42, 0.1); + border-radius: 16rpx; height: 0; opacity: 0; - transform: translateY(-100%); + transform: translateY(-20rpx); transition: all 0.3s; + margin: 20rpx 20rpx 0 20rpx; + box-shadow: 0 2rpx 10rpx rgba(0, 180, 42, 0.15); + z-index: 2000; + position: relative; } .tips-ani { transform: translateY(0); - height: 40px; + height: 80rpx; opacity: 1; } - .content { - width: 100%; + /* 鍥哄畾澶撮儴鍖哄煙浼樺寲 */ + .fixed-header { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 1000; + background-color: var(--bg-color); + padding: 16rpx; + /* 鍑忓皬椤堕儴鍖哄煙鍐呰竟璺� */ + box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06); } - .list-picture { - width: 100%; - height: 145px; - } - - .thumb-image { - width: 100%; - height: 100%; - } - - .ellipsis { - display: flex; - overflow: hidden; - } - - .uni-ellipsis-1 { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - - .uni-ellipsis-2 { - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - } - - // 鎼滅储妗� + /* 鎼滅储鏍忔牱寮忎紭鍖� */ .search-bar { - width: 100%; - height: 100rpx; - margin-top: 2%; + margin-bottom: 16rpx; + /* 鍑忓皬搴曢儴杈硅窛 */ } - .search-bar-box { + .search-card { display: flex; - margin: 0 auto; - width: 620rpx; + align-items: center; + background-color: var(--card-bg); + border-radius: 20rpx; + /* 鍑忓皬鍦嗚鍗婂緞 */ + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05); + /* 鍑忓皬闃村奖 */ height: 70rpx; - border: 5rpx solid #00a8cc; - border-radius: 50rpx; + /* 鍑忓皬楂樺害 */ } - .search-span { - width: 100rpx; - height: 56rpx; - margin-top: 6rpx; - margin-left: 30rpx; + .picker { + width: 180rpx; + /* 鍑忓皬閫夋嫨鍣ㄥ搴� */ + height: 70rpx; + line-height: 70rpx; + text-align: center; + font-size: 24rpx; + /* 鍑忓皬瀛椾綋澶у皬 */ + color: var(--text-secondary); + border-right: 1rpx solid var(--border-color); + white-space: nowrap; } - .search-text { - width: 100%; - margin-top: 10rpx; - margin-left: 20rpx; - font-size: 30rpx; - color: #7f7f81; + .search-input { + flex: 1; + height: 70rpx; + line-height: 70rpx; + font-size: 24rpx; + /* 鍑忓皬瀛椾綋澶у皬 */ + color: var(--text-color); + padding: 0 20rpx; + /* 鍑忓皬鍐呰竟璺� */ + border: none; + outline: none; } .search-btn { - background-color: #00a8cc; - /* Green */ + background: linear-gradient(135deg, var(--primary-color), #2B67FF); color: white; text-align: center; - display: inline-block; - font-size: 35rpx; - width: 240rpx; + font-size: 24rpx; + /* 鍑忓皬瀛椾綋澶у皬 */ + width: 160rpx; + /* 鍑忓皬鎸夐挳瀹藉害 */ height: 70rpx; - line-height: 65rpx; - border-radius: 30rpx; - letter-spacing: 3rpx; + line-height: 70rpx; + border-radius: 0; + letter-spacing: 2rpx; + /* 鍑忓皬瀛楅棿璺� */ + display: flex; + justify-content: center; + align-items: center; + transition: all 0.3s; + box-shadow: 0 2rpx 6rpx rgba(64, 128, 255, 0.2); + /* 鍑忓皬闃村奖 */ } - uni-button { - margin: 0; - margin-top: 0px; - margin-right: 0px; - margin-bottom: 0px; - margin-left: 0px; + .search-btn:hover { + background: linear-gradient(135deg, #2B67FF, #1A53FF); + transform: translateY(-1rpx); + box-shadow: 0 3rpx 8rpx rgba(64, 128, 255, 0.25); } - // + .search-btn:active { + transform: translateY(1rpx); + box-shadow: 0 1rpx 4rpx rgba(64, 128, 255, 0.15); + } + + /* 閫夐」鍗℃牱寮忎紭鍖� */ + .newsTab { + margin-bottom: 0; + } + + uni-segmented-control { + background-color: var(--card-bg); + border-radius: 20rpx; + /* 鍑忓皬鍦嗚鍗婂緞 */ + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05); + /* 鍑忓皬闃村奖 */ + overflow: hidden; + height: 70rpx; + /* 鍑忓皬楂樺害 */ + } + + uni-segmented-control .uni-segmented-control__item { + font-size: 24rpx; + /* 鍑忓皬瀛椾綋澶у皬 */ + color: var(--text-secondary); + height: 70rpx; + line-height: 70rpx; + font-weight: 500; + } + + uni-segmented-control .uni-segmented-control__item--active { + color: var(--primary-color); + border-bottom: 2rpx solid var(--primary-color); + /* 鍑忓皬涓嬪垝绾块珮搴� */ + } + + /* 鍐呭鍖哄煙鏍峰紡浼樺寲 */ + .content-container { + margin-top: 180rpx; + /* 鍑忓皬椤堕儴杈硅窛 */ + padding: 16rpx; + /* 鍑忓皬鍐呭鍖哄煙鍐呰竟璺� */ + flex: 1; + overflow-y: auto; + } + + /* 鍒楄〃鍗$墖鏍峰紡浼樺寲 */ + .list-card { + margin-bottom: 20rpx; + /* 鍑忓皬搴曢儴杈硅窛 */ + background-color: var(--card-bg); + border-radius: 16rpx; + /* 鍑忓皬鍦嗚鍗婂緞 */ + box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); + /* 鍑忓皬闃村奖 */ + overflow: hidden; + transition: all 0.3s; + } + + .list-card:hover { + transform: translateY(-2rpx); + /* 鍑忓皬鎮仠鏃剁殑涓婄Щ璺濈 */ + box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08); + } + + /* 鍗$墖澶撮儴鏍峰紡浼樺寲 */ + .card-header { + padding: 0; + background-color: var(--primary-light); + } + + .header-content { + display: flex; + justify-content: space-between; + align-items: center; + padding: 12rpx 16rpx; + /* 鍑忓皬澶撮儴鍖哄煙鍐呰竟璺� */ + position: relative; + } + + /* 鍗曞彿淇℃伅鍖哄煙浼樺寲 */ + .order-info { + flex: 1; + margin-right: 16rpx; + /* 鍑忓皬鍙充晶杈硅窛 */ + } + + .order-row { + display: flex; + flex-wrap: wrap; + gap: 12rpx; + /* 鍑忓皬鍏冪礌闂磋窛 */ + } + + .order-item { + flex: 1; + min-width: 160rpx; + /* 鍑忓皬鏈�灏忓搴� */ + } + + .order-label { + font-size: 20rpx; + /* 鍑忓皬鏍囩瀛椾綋澶у皬 */ + color: var(--text-secondary); + margin-bottom: 2rpx; + /* 鍑忓皬鏍囩涓庡�间箣闂寸殑闂磋窛 */ + display: block; + font-weight: 500; + } + + .order-value { + font-size: 22rpx; + /* 鍑忓皬鍊煎瓧浣撳ぇ灏� */ + color: var(--text-color); + font-weight: 500; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + /* 鐘舵�佹爣绛句紭鍖� */ + .status-badge { + display: inline-block; + padding: 4rpx 10rpx; + /* 鍑忓皬鐘舵�佹爣绛惧昂瀵� */ + border-radius: 8rpx; + /* 鍑忓皬鍦嗚鍗婂緞 */ + font-size: 18rpx; + /* 鍑忓皬鐘舵�佹爣绛惧瓧浣撳ぇ灏� */ + font-weight: 500; + white-space: nowrap; + flex-shrink: 0; + } + + .approved { + background-color: rgba(0, 180, 42, 0.1); + color: var(--success-color); + } + + .pending { + background-color: rgba(245, 63, 63, 0.1); + color: var(--danger-color); + } + + /* 妫�楠屼汉淇℃伅鍖哄煙浼樺寲 */ + .inspector-info { + background-color: rgba(245, 63, 63, 0.05); + padding: 12rpx 16rpx; + /* 鍑忓皬鍐呰竟璺� */ + border-radius: 0; + margin-bottom: 12rpx; + /* 涓庝笅鏂瑰唴瀹逛繚鎸侀�傚綋闂磋窛 */ + } + + .info-row { + display: flex; + margin-bottom: 8rpx; + /* 鍑忓皬琛岄棿璺� */ + align-items: center; + } + + .info-label { + font-size: 20rpx; + /* 鍑忓皬鏍囩瀛椾綋澶у皬 */ + color: var(--text-secondary); + width: 120rpx; + /* 鍑忓皬鏍囩瀹藉害 */ + } + + .info-value { + font-size: 22rpx; + /* 鍑忓皬鍊煎瓧浣撳ぇ灏� */ + color: var(--text-color); + font-weight: 500; + } + + .result-badge { + padding: 4rpx 10rpx; + /* 鍑忓皬缁撴灉鏍囩灏哄 */ + border-radius: 8rpx; + /* 鍑忓皬鍦嗚鍗婂緞 */ + } + + .pass { + background-color: rgba(0, 180, 42, 0.1); + color: var(--success-color); + } + + .fail { + background-color: rgba(245, 63, 63, 0.1); + color: var(--danger-color); + } + + .pending { + background-color: rgba(255, 193, 7, 0.2); + /* 榛勮壊鑳屾櫙 */ + color: #FF7D00; + /* 姗欒壊鏂囧瓧 */ + font-weight: 600; + /* 鍔犵矖鏂囧瓧 */ + } + + /* 澶嶉�夋缁勬牱寮忎紭鍖� */ + .checkbox-group { + display: flex; + padding: 12rpx 16rpx; + /* 鍑忓皬鍐呰竟璺� */ + border-bottom: 1rpx solid var(--border-color); + background-color: rgba(230, 240, 255, 0.3); + } + + .checkbox-item { + display: flex; + align-items: center; + margin-right: 24rpx; + /* 鍑忓皬鍙充晶杈硅窛 */ + font-size: 22rpx; + /* 鍑忓皬瀛椾綋澶у皬 */ + color: var(--text-secondary); + } + + checkbox { + transform: scale(0.8); + /* 鍑忓皬澶嶉�夋澶у皬 */ + margin-right: 10rpx; + /* 鍑忓皬鍙充晶杈硅窛 */ + } + + /* 淇℃伅缃戞牸甯冨眬浼樺寲 */ + .info-grid { + padding: 12rpx 16rpx; + /* 鍑忓皬鍐呰竟璺� */ + } + + .grid-row { + display: flex; + flex-wrap: wrap; + margin-bottom: 12rpx; + /* 鍑忓皬琛岄棿璺� */ + } + + .grid-item { + flex: 1; + min-width: 200rpx; + /* 鍑忓皬鏈�灏忓搴� */ + margin-right: 16rpx; + /* 鍑忓皬鍙充晶杈硅窛 */ + } + + .grid-item:last-child { + margin-right: 0; + } + + .grid-label { + font-size: 20rpx; + /* 鍑忓皬鏍囩瀛椾綋澶у皬 */ + color: var(--text-secondary); + margin-bottom: 3rpx; + /* 鍑忓皬鏍囩涓庡�间箣闂寸殑闂磋窛 */ + display: block; + } + + .grid-value { + font-size: 22rpx; + /* 鍑忓皬鍊煎瓧浣撳ぇ灏� */ + color: var(--text-color); + font-weight: 500; + } + + /* 娴姩鎸夐挳鏍峰紡浼樺寲 */ + .plus-button { + position: fixed; + bottom: 30rpx; + right: 30rpx; + width: 80rpx; + /* 鍑忓皬鎸夐挳澶у皬 */ + height: 80rpx; + border-radius: 50%; + background: linear-gradient(135deg, var(--primary-color), #2B67FF); + color: white; + text-align: center; + line-height: 80rpx; + font-size: 40rpx; + /* 鍑忓皬瀛椾綋澶у皬 */ + cursor: pointer; + z-index: 1000; + box-shadow: 0 4rpx 16rpx rgba(64, 128, 255, 0.25); + transition: all 0.3s; + } + + .plus-button:hover { + background: linear-gradient(135deg, #2B67FF, #1A53FF); + transform: translateY(-4rpx); + box-shadow: 0 8rpx 24rpx rgba(64, 128, 255, 0.35); + } + + .plus-button:active { + transform: translateY(2rpx); + box-shadow: 0 2rpx 8rpx rgba(64, 128, 255, 0.2); + } + + /* 鍝嶅簲寮忚璁′紭鍖� */ + @media (max-width: 768px) { + .fixed-header { + padding: 12rpx; + } + + .search-bar { + margin-bottom: 12rpx; + } + + .search-card { + height: 60rpx; + } + + .picker { + width: 160rpx; + height: 60rpx; + line-height: 60rpx; + font-size: 22rpx; + } + + .search-input { + height: 60rpx; + line-height: 60rpx; + font-size: 22rpx; + padding: 0 16rpx; + } + + .search-btn { + width: 140rpx; + height: 60rpx; + line-height: 60rpx; + font-size: 22rpx; + } + + uni-segmented-control { + height: 60rpx; + } + + uni-segmented-control .uni-segmented-control__item { + height: 60rpx; + line-height: 60rpx; + font-size: 22rpx; + } + + .content-container { + margin-top: 160rpx; + padding: 12rpx; + } + + .list-card { + margin-bottom: 16rpx; + border-radius: 12rpx; + } + + .header-content { + padding: 8rpx 12rpx; + /* 杩涗竴姝ュ噺灏忓ご閮ㄥ尯鍩熼珮搴� */ + } + + .order-row { + gap: 10rpx; + } + + .order-item { + min-width: 140rpx; + } + + .order-label { + font-size: 18rpx; + margin-bottom: 2rpx; + } + + .order-value { + font-size: 20rpx; + } + + .status-badge { + padding: 3rpx 8rpx; + font-size: 16rpx; + } + + .inspector-info { + padding: 8rpx 12rpx; + margin-bottom: 8rpx; + } + + .info-row { + margin-bottom: 6rpx; + } + + .info-label { + font-size: 18rpx; + width: 100rpx; + } + + .info-value { + font-size: 20rpx; + } + + .result-badge { + padding: 3rpx 8rpx; + } + + .pending { + background-color: rgba(255, 193, 7, 0.2); + /* 榛勮壊鑳屾櫙 */ + color: #FF7D00; + /* 姗欒壊鏂囧瓧 */ + } + + .checkbox-group, + .info-grid { + padding: 8rpx 12rpx; + } + + .checkbox-item { + margin-right: 20rpx; + font-size: 20rpx; + } + + .grid-item { + min-width: 180rpx; + margin-right: 12rpx; + } + + .grid-label { + font-size: 18rpx; + margin-bottom: 2rpx; + } + + .grid-value { + font-size: 20rpx; + } + + .plus-button { + width: 70rpx; + height: 70rpx; + line-height: 70rpx; + font-size: 35rpx; + bottom: 20rpx; + right: 20rpx; + } + } </style> \ No newline at end of file -- Gitblit v1.9.3