From 71b93327e8f3fb3bffffc7c033c1f782e7b6ab32 Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期一, 22 五月 2023 17:37:16 +0800
Subject: [PATCH] test

---
 force-app/main/default/lwc/lexConsumable/lexConsumable.html |  254 +++++++++++++++++++-------------------------------
 1 files changed, 99 insertions(+), 155 deletions(-)

diff --git a/force-app/main/default/lwc/lexConsumable/lexConsumable.html b/force-app/main/default/lwc/lexConsumable/lexConsumable.html
index c691916..b0a480c 100644
--- a/force-app/main/default/lwc/lexConsumable/lexConsumable.html
+++ b/force-app/main/default/lwc/lexConsumable/lexConsumable.html
@@ -2,6 +2,7 @@
     <template if:true={showSpinner}>
         <lightning-spinner size="medium" variant="brand"></lightning-spinner>
     </template>
+    <c-common-toast></c-common-toast>
     <template if:true={showPage}>
         <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;">
             <div style="padding:10px;">
@@ -34,17 +35,18 @@
                     <lightning-button style="margin: 5px;" label="鍐嶇敵璇�" onclick={reapplyOrder}></lightning-button>
                 </template>
                 <p style="height: 10px;"></p>
-                <!-- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;">
-                    <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
-                    </div>
-                    <div style="padding:10px;">
-                    </div>
-                </div> -->
                 <!-- 璁㈠崟淇℃伅 -->
                 <template if:false={editAble}>
                     <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
                         <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
-                            <p style="font-size: 16px;"><strong>璁㈠崟淇℃伅</strong></p>
+                            <lightning-layout>
+                                <lightning-layout-item padding="around-small">
+                                    <p style="font-size: 16px">
+                                        <strong>璁㈠崟淇℃伅</strong>
+                                    </p>
+                                </lightning-layout-item>
+                            </lightning-layout>
+                            <!-- <p style="font-size: 16px;"><strong>璁㈠崟淇℃伅</strong></p> -->
                         </div>
                         <div style="padding:10px;">
                             <lightning-record-view-form record-id={cocId} object-api-name="Consumable_order__c">
@@ -64,11 +66,12 @@
                                                 </template>
                                             </td>
                                             <td>
-                                                <div class="slds-grid slds-grid_vertical-align-center">
+                                                <!-- <div class="slds-grid slds-grid_vertical-align-center">
                                                     <div class="slds-form-element__label"><lightning-formatted-text value={contractLabel}></lightning-formatted-text>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                                     <lightning-formatted-text value={contractName}></lightning-formatted-text>
-                                                </div>
-                                                <!-- <lightning-output-field field-name="Order_effective_contact__c"></lightning-output-field> -->
+                                                </div> -->
+                                                <!-- style="pointer-events: none;" -->
+                                                    <lightning-output-field class="showContract" field-name="Order_effective_contact__c"  ></lightning-output-field>
                                             </td>
                                             <!-- <td>鍚堝悓锛�<lightning-formatted-text value={coc.Order_effective_contact__r.Name}></lightning-formatted-text></td> -->
                                             <td></td>
@@ -79,21 +82,18 @@
                                                 <template if:false={edoffersPrice}>
                                                     <lightning-output-field id="sumPrice_buttom1" field-name="Offers_Price__c"></lightning-output-field>
                                                 </template>
-                                            </td>
-                                            <td></td>
-                                            <td></td>
-                                        </tr>
-                                        <tr>
-                                            <td></td>
-                                            <td>
                                                 <template if:true={edoffersPrice}>
                                                     <lightning-input label="鐗逛环鎬婚噾棰�" variant="label-inline" id="sumPrice_buttom2" value={coc.Offers_Price__c} onchange={offerPriceChange}></lightning-input>
                                                 </template>
                                             </td>
-                                            <td></td>
+                                            <td>
+                                                <template if:true={showAttUploadDate}>
+                                                    <lightning-output-field field-name="Consumable_pdf_insert_day__c"></lightning-output-field>
+                                                </template>
+                                            </td>
                                             <td></td>
                                         </tr>
-                                        <tr>
+                                        <!-- <tr>
                                             <td></td>
                                             <td>
                                                 <template if:true={showAttUploadDate}>
@@ -102,7 +102,7 @@
                                             </td>
                                             <td></td>
                                             <td></td>
-                                        </tr>
+                                        </tr> -->
                                         <tr>
                                             <td></td>
                                             <td>
@@ -111,6 +111,36 @@
                                                 </template>
                                             </td>
                                             <td></td>
+                                            <td></td>
+                                        </tr>
+                                        <tr>
+                                            <td></td>
+                                            <td colspan="2">
+                                                <lightning-card class="attListTitle" variant="Narrow"  title="闄勪欢鍒楄〃" icon-name="utility:attach">
+                                                    <lightning-layout slot="footer" multiple-rows="true">
+                                                        <template for:each={attachmentRecoeds} for:item="item" for:index="index">
+                                                            <lightning-layout-item padding="around-none" size="3" key={item.recordId} style="text-align: left;padding:5px">
+                                                                <a title={item.fileFullName} href={item.attUrl} target="_blank">
+                                                                    {item.fileName}
+                                                                </a>
+                                                                <p>
+                                                                    <!-- <a data-fileid ={item.documentId} onclick={previweAtt}> -->
+                                                                    <a href={item.attUrl} target="_blank">
+                                                                        棰勮
+                                                                    </a>&nbsp;路&nbsp;
+                                                                    <a href={item.downloadUrl}>
+                                                                        涓嬭浇
+                                                                    </a>&nbsp;路&nbsp;
+                                                                    <a data-fileid ={item.recordId} onclick={deleteAtt}>
+                                                                        鍒犻櫎
+                                                                    </a>
+                                                                </p>
+                                                                <!-- <p>{item.updateDate} 路 {item.ownerName}</p> -->
+                                                            </lightning-layout-item>
+                                                        </template>
+                                                    </lightning-layout>
+                                                </lightning-card>
+                                            </td>
                                             <td></td>
                                         </tr>
                                     </tbody>
@@ -222,116 +252,55 @@
                 <!-- 娑堣�楀搧鏄庣粏 -->
                 <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
                     <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
-                        <p style="font-size: 16px;"><strong>娑堣�楀搧鏄庣粏</strong></p>
+                        <lightning-layout>
+                            <lightning-layout-item padding="around-small">
+                                <p style="font-size: 16px">
+                                    <strong>娑堣�楀搧鏄庣粏</strong>
+                                </p>
+                            </lightning-layout-item>
+                        </lightning-layout>
+                        <!-- <p style="font-size: 16px;"><strong>娑堣�楀搧鏄庣粏</strong></p> -->
                     </div>
                     <div style="padding:10px;">
-                        <!-- <table style="width: 100%;" class="conTable">
-                            <thead>
-                                <tr style="border-bottom: 1px solid #D4D4D4;">
-                                    <template if:true={editAble}>
-                                        <th><lightning-input type="checkbox" onchange={checkAll} name="checkAll"></lightning-input></th>
-                                    </template>
-                                    <th style="width: 20%;">娑堣�楀搧鍚嶇О</th>
-                                    <th>瑙勬牸</th>
-                                    <th>CFDA鐘舵��</th>
-                                    <th>娉ㄥ唽璇佺紪鐮佸彿</th>
-                                    <th>娉ㄥ唽璇佹晥鏈�</th>
-                                    <th>绗�3鍒嗙被</th>
-                                    <th>绗�4鍒嗙被</th>
-                                    <th>绗�5鍒嗙被</th>
-                                    <template if:true={cansee}>
-                                        <th>鏍囧噯鍗曚环(鍏�)</th>
-                                    </template>
-                                    <th style="width: 5%;">閲囪喘鏁伴噺</th>
-                                    <th>鍦ㄥ簱鏁颁笅闄�</th>
-                                    <th>鍦ㄥ簱鏁颁笂闄�</th>
-                                    <th>鏈夋晥鏈熷簱瀛�(鐩�)</th>
-                                    <th>鏈夋晥鏈熷簱瀛�(涓�)</th>
-                                </tr>
-                            </thead>
-                            <tbody>
-                                <template for:each={consumableorderdetailsRecordsview} for:item="record" for:index="index">
-                                    <tr key={record.Prod.Name}>
-                                        <template if:true={editAble}>
-                                            <td>
-                                                <lightning-input data-index={index} type="checkbox" checked={record.check} onchange={check} name="check"></lightning-input>
-                                                <lightning-input data-index={index} type="checkbox" checked={record.oldCheck} onchange={check} name="check" style="display:none;"></lightning-input>
-                                            </td>
-                                        </template>
-                                        <td>
-                                            {record.Prod.Name__c}
-                                        </td>
-                                        <td>
-                                            <div class="slds-truncate" title="Value Proposition">{record.packing_list}</div>
-                                        </td>
-                                        <td>
-                                            <div class="slds-truncate" title="Value Proposition">{record.Prod.SFDA_Status__c}</div>
-                                        </td>
-                                        <td>
-                                            <div class="slds-truncate" title="Value Proposition">{record.approbation_No}</div>
-                                        </td>
-                                        <td>
-                                            <div class="slds-truncate" title="Value Proposition">{record.expiration_Date}</div>
-                                        </td>
-                                        <td>
-                                            <div class="slds-truncate" title="Value Proposition">{record.Prod.Category3__c}</div>
-                                        </td>
-                                        <td>
-                                            <div class="slds-truncate" title="Value Proposition">{record.Prod.Category4__c}</div>
-                                        </td>
-                                        <td>
-                                            <div class="slds-truncate" title="Value Proposition">{record.Prod.Category5__c}</div>
-                                        </td>
-                                        <template if:true={cansee}>
-                                            <td>
-                                                <div class="slds-truncate" title="Value Proposition">{record.Prod.Intra_Trade_List_RMB__c}</div>
-                                            </td>
-                                        </template>
-                                        <td>
-                                            <template if:true={editAble}>
-                                                <lightning-input style="margin-bottom: 10px;" data-index={index} value={record.esd.Consumable_count__c} onchange={consumableCountChange}></lightning-input>
-                                            </template>
-                                            <template if:false={editAble}>
-                                                <div class="slds-truncate" title="Value Proposition">{record.esd.Consumable_count__c}</div>
-                                            </template>
-                                        </td>
-                                        <td>
-                                            <div class="slds-truncate" title="Value Proposition">{record.lowerlimit}</div>
-                                        </td>
-                                        <td>
-                                            <div class="slds-truncate" title="Value Proposition">{record.upperlimit}</div>
-                                        </td>
-                                        <td>
-                                            <div class="slds-truncate" title="Value Proposition">{record.allnumber}</div>
-                                        </td>
-                                        <td>
-                                            <div class="slds-truncate" title="Value Proposition">{record.allnumber_piece}</div>
-                                        </td>
-                                    </tr>
-                                </template>
-                            </tbody>
-                        </table> -->
                         <template if:true={editAble}>
-                            <c-lex-custom-lightning-datatable key-field="recordId" data={consumableorderdetailsRecordsview} columns={cols} selected-rows={selectRows} onrowselection={checkRows} onchangevalue={conCountChange}></c-lex-custom-lightning-datatable>
+                            <c-lex-custom-lightning-datatable class="wrapped-header-datatable" key-field="recordId" data={currentRecord} columns={cols}
+                            selected-rows={selectRows} onrowselection={checkRows} onchangevalue={conCountChange} onvalueblur={conCountBlur}
+                            default-sort-direction="asc" sorted-direction={sortDirection} sorted-by={sortedBy} onsort={onHandleSort}></c-lex-custom-lightning-datatable>
+                            <c-paginator onprevious={prePageClick} onnext={nextPageClick}
+                                onpageschange={pageSizeChange} onfirst={goFirstPage} onlast={goLastPage}
+                                page-size-options={pageSizeOptions} previous-button-disabled={previousButtonDisabled}
+                                next-button-disabled={nextButtonDisabled} record-start={recordStart}
+                                record-end={recordEnd} total-records={totalRecords}></c-paginator>
                         </template>
                         <template if:false={editAble}>
-                            <c-lex-custom-lightning-datatable hide-checkbox-column key-field="recordId" data={consumableorderdetailsRecordsview} columns={cols}></c-lex-custom-lightning-datatable>
+                            <c-lex-custom-lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="recordId" data={consumableorderdetailsRecordsview} columns={cols}></c-lex-custom-lightning-datatable>
+                            <c-paginator onprevious={prePageClick} onnext={nextPageClick}
+                                onpageschange={pageSizeChange} onfirst={goFirstPage} onlast={goLastPage}
+                                page-size-options={pageSizeOptions} previous-button-disabled={previousButtonDisabled}
+                                next-button-disabled={nextButtonDisabled} record-start={recordStart}
+                                record-end={recordEnd} total-records={totalRecords}></c-paginator>
                         </template>
                     </div>
                 </div>
             </div>
         </div>
         <!-- 闄勪欢 -->
-        <template if:false={editAble}>
+        <!-- <template if:false={editAble}>
             <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-top:10px;">
                 <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
-                    <p style="font-size: 16px;"><strong>闄勪欢</strong></p>
+                    <lightning-layout>
+                        <lightning-layout-item padding="around-small">
+                            <p style="font-size: 16px">
+                                <strong>闄勪欢</strong>
+                            </p>
+                        </lightning-layout-item>
+                    </lightning-layout>
                 </div>
                 <div style="padding:10px;">
-                    <lightning-datatable hide-checkbox-column key-field="recordId" columns={attCols} data={attachmentRecoeds}></lightning-datatable>
+                    <c-lex-custom-lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="recordId" columns={attCols} data={attachmentRecoeds} onclickicon={deleteAtt}></c-lex-custom-lightning-datatable>
                 </div>
             </div>
-        </template>
+        </template> -->
         <!-- 涓婁紶闄勪欢寮圭獥 -->
         <template if:true={showAttPop}>
             <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_small" style="border: 1px solid #D4D4D4;">
@@ -398,27 +367,17 @@
                         <!-- <p>宸查�夋嫨鍖婚櫌锛歿chooseHospital}</p> -->
                         <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
                             <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
-                                <p style="font-size: 16px;"><strong>鎼滅储缁撴灉</strong></p>
+                                <lightning-layout>
+                                    <lightning-layout-item padding="around-small">
+                                        <p style="font-size: 16px">
+                                            <strong>鎼滅储缁撴灉</strong>
+                                        </p>
+                                    </lightning-layout-item>
+                                </lightning-layout>
+                                <!-- <p style="font-size: 16px;"><strong>鎼滅储缁撴灉</strong></p> -->
                             </div>
                             <div class="myTable" style="padding:10px;">
-                                <!-- <table>
-                                    <thead>
-                                        <th style="width: 50%;">鍖婚櫌鍚嶇О</th>
-                                        <th style="width: 10%;">鐪佷唤</th>
-                                        <th style="width: 40%;">鍦板潃</th>
-                                    </thead>
-                                    <tbody>
-                                        <template for:each={hospitalList} for:item="hos" for:index="index">
-                                            <tr key={hos.Id}>
-                                                <td><a data-hosid={hos.Id} data-name={hos.Name} onclick={chooseHos}>{hos.Name}</a></td>
-                                                <td>{hos.StateMaster}</td>
-                                                <td>{hos.Address__c}</td>
-                                            </tr>
-                                        </template>
-                                        <tr></tr>
-                                    </tbody>
-                                </table> -->
-                                <lightning-datatable key-field="id" hide-checkbox-column="true" data={hospitalList} columns={hosCols} onrowaction={chooseHos}></lightning-datatable>
+                                <lightning-datatable class="wrapped-header-datatable" key-field="id" hide-checkbox-column="true" data={hospitalList} columns={hosCols} onrowaction={chooseHos}></lightning-datatable>
                             </div>
                         </div>
                     </div>
@@ -459,31 +418,16 @@
                         <!-- <p>宸查�夋嫨鍚堝悓锛歿chooseContract}</p> -->
                         <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
                             <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
-                                <p style="font-size: 16px;"><strong>鎼滅储缁撴灉</strong></p>
+                                <lightning-layout>
+                                    <lightning-layout-item padding="around-small">
+                                        <p style="font-size: 16px">
+                                            <strong>鎼滅储缁撴灉</strong>
+                                        </p>
+                                    </lightning-layout-item>
+                                </lightning-layout>
                             </div>
                             <div style="padding:20px;">
-                                <!-- <table>
-                                    <thead>
-                                        <th style="width: 30%;">鍚堝悓鍚嶇О</th>
-                                        <th style="width: 10%;">鐪佷唤</th>
-                                        <th style="width: 20%;">鐢宠閿�鍞</th>
-                                        <th style="width: 20%;">鍏佽鎶ヤ环鏈熼棿(寮�濮嬫棩)</th>
-                                        <th style="width: 20%;">鍏佽鎶ヤ环鏈熼棿(缁撴潫鏃�)</th>
-                                    </thead>
-                                    <tbody>
-                                        <template for:each={contractList} for:item="con" for:index="index">
-                                            <tr key={con.Id}>
-                                                <td><a data-hosid={con.Id} data-name={con.Name} onclick={chooseCon}>{con.Name}</a></td>
-                                                <td>{con.StateMaster}</td>
-                                                <td>{con.Sales_Section__c}</td>
-                                                <td>{con.Contract_Decide_Start_Date__c}</td>
-                                                <td>{con.Contract_Decide_End_Date__c}</td>
-                                            </tr>
-                                        </template>
-                                        <tr></tr>
-                                    </tbody>
-                                </table> -->
-                                <lightning-datatable key-field="id" hide-checkbox-column="true" data={contractList} columns={conCols} onrowaction={chooseCon}></lightning-datatable>
+                                <lightning-datatable class="wrapped-header-datatable" key-field="id" hide-checkbox-column="true" data={contractList} columns={conCols} onrowaction={chooseCon}></lightning-datatable>
                             </div>
                         </div>
                     </div>

--
Gitblit v1.9.1