| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-20 17:16:48 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-05-24 15:52:37 |
| | | * @LastEditTime: 2023-05-31 11:44:24 |
| | | --> |
| | | <template> |
| | | <lightning-card data-id="test"> |
| | | <template if:true={isEdit}> |
| | | |
| | | <template if:true={isCreateOrEdit}> |
| | | <lightning-card id="my-element1" class="card" variant="Narrow" data-id="my-card"> |
| | | <div style="padding: 0 20px"> |
| | | <lightning-layout> |
| | |
| | | <div style="margin-left: 550px;"> |
| | | <lightning-layout-item size="12"> |
| | | <lightning-button label="追加品牌" onclick={addBrandJs}></lightning-button> |
| | | <template if:true={isEdit}> |
| | | <lightning-button name="save" label="保存1" onclick={saveBrandToEditJs}></lightning-button> |
| | | </template> |
| | | <template if:false={isEdit}> |
| | | <lightning-button name="save" label="保存" onclick={saveBrandJs}></lightning-button> |
| | | </template> |
| | | <lightning-button label="返回询价" onclick={cancel}></lightning-button> |
| | | </lightning-layout-item> |
| | | </div> |
| | |
| | | <template for:each={LostReport.LostBrands} for:item="brand" for:index="i"> |
| | | <li key={brand.index}> |
| | | <lightning-accordion-section class="" data-id={i} name="失单品牌" label="失单品牌"> |
| | | <lightning-button name={i} label="保存" onclick={saveBrandJs}></lightning-button> |
| | | <template if:true={isEdit}> |
| | | <lightning-button name="save" label="保存1" onclick={saveBrandToEditJs}></lightning-button> |
| | | </template> |
| | | <template if:false={isEdit}> |
| | | <lightning-button name="save" label="保存" onclick={saveBrandJs}></lightning-button> |
| | | </template> |
| | | <lightning-button name={i} label="删除" onclick={deleteBrandJs} disabled={isBrandCount2}></lightning-button> |
| | | <lightning-layout> |
| | | <lightning-layout-item size="4" padding="around-small"> |
| | | <template if:true={isEdit}> |
| | | <c-multi-select-combobox name={i} onselect={setBrandMannualName} data-id="Lost_By_Company" class="mycombobox" options={brandOptions} selected-value={reasonValue} label="失单品牌: " placeholder={brand.lostBrand.Lost_By_Company__c} required></c-multi-select-combobox> |
| | | </template> |
| | | <template if:false={isEdit}> |
| | | <c-multi-select-combobox name={i} onselect={setBrandMannualName} data-id="Lost_By_Company" class="mycombobox" options={brandOptions} selected-value={reasonValue} label="失单品牌: " required></c-multi-select-combobox> |
| | | </template> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto" padding="around-small"> |
| | | <lightning-combobox name={i} label="失单原因(主):" value={brand.lostBrand.Lost_reason_main__c} options={columns2} |
| | |
| | | <lightning-layout-item size="4" padding="horizontal-small"> |
| | | <lightning-input name={i} value={brand.lostBrand.AgencyMannual__c} type="text" label="中标经销商(手动):" class="searchField" onchange={handleAgencyMannualOutChange}></lightning-input> |
| | | </lightning-layout-item> |
| | | |
| | | </lightning-layout> |
| | | <lightning-layout> |
| | | <lightning-layout-item flexibility="auto" padding="around-small"> |
| | |
| | | <lightning-combobox placeholder={product.LostProductss.LostBrandName__c} class="BrandName" name={j} title={i} options={brandOptions} value={product.LostProductss.LostBrandName__c} onchange={handleLostBrandNameChange} read-only="true"></lightning-combobox> |
| | | </td> |
| | | <td> |
| | | <lightning-record-edit-form |
| | | <!-- <lightning-record-edit-form |
| | | object-api-name='PCLLostProduct__c' |
| | | record-id='' |
| | | > |
| | | <lightning-input-field class="LostProduct" data-id={i} title={i} value={product.LostProductss.LostProduct__c} name={j} field-name='LostProduct__c' onchange={handleLostProductChange} variant="label-hidden"> </lightning-input-field> |
| | | </lightning-record-edit-form> |
| | | </lightning-record-edit-form> --> |
| | | <template if:true={isEdit}> |
| | | <c-lex-lookup-lwc class="Product" data-id={i} title={i} name={j} iconname="standard:product_item" query-brand={product.LostProductss.LostBrandName__c} objectname="Product2" onselected={handleSelected} init-value={product.productName}></c-lex-lookup-lwc> |
| | | </template> |
| | | <template if:false={isEdit}> |
| | | <c-lex-lookup-lwc class="Product" data-id={i} title={i} name={j} iconname="standard:product_item" query-brand={product.LostProductss.LostBrandName__c} objectname="Product2" onselected={handleSelected}></c-lex-lookup-lwc> |
| | | </template> |
| | | </td> |
| | | <td> |
| | | <lightning-input class="Quantity" title={i} name={j} value={product.LostProductss.Quantity__c} onchange={handleQuantityChange}></lightning-input> |
| | |
| | | <lightning-input class="LostProductMannual" title={i} name={j} value={product.LostProductss.LostProductMannual__c} onchange={handleLostProductMannualChange}></lightning-input> |
| | | </td> |
| | | <td> |
| | | <lightning-combobox class="ProductClass" placeholder="--无--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> |
| | | <lightning-combobox class="ProductClass" data-id={i} placeholder="--无--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> |
| | | </td> |
| | | <td> |
| | | <lightning-combobox class="ProductCategory" data-id={i} placeholder="--无--" title={i} name={j} options={product.productOptions} value={product.LostProductss.ProductCategory__c} onchange={handleProductCategoryChange} read-only="true"></lightning-combobox> |
| | |
| | | <div class="slds-align_absolute-center"> |
| | | <lightning-layout-item size="12"> |
| | | <lightning-button label="追加品牌" onclick={addBrandJs}></lightning-button> |
| | | <template if:true={isEdit}> |
| | | <lightning-button name="save" label="保存1" onclick={saveBrandToEditJs}></lightning-button> |
| | | </template> |
| | | <template if:false={isEdit}> |
| | | <lightning-button name="save" label="保存" onclick={saveBrandJs}></lightning-button> |
| | | </template> |
| | | <lightning-button label="返回询价" onclick={cancel}></lightning-button> |
| | | </lightning-layout-item> |
| | | </div> |
| | |
| | | </lightning-card> |
| | | </template> |
| | | <template if:true={isView}> |
| | | <lightning-card> |
| | | <lightning-card id="my-element2" class="card" variant="Narrow" data-id="my-card"> |
| | | <div style="padding: 0 20px"> |
| | | <lightning-layout> |
| | |
| | | </lightning-layout> |
| | | <div style="margin-top: 5px"> |
| | | <lightning-layout> |
| | | <lightning-layout-item size="2" padding="around-small"> |
| | | <div class="slds-form_horizontal my-combobox"> |
| | | <lightning-layout-item size="1"> |
| | | <label>失单类型:</label> |
| | | <lightning-formatted-text value={LostReport.lostReport.LostType__c}></lightning-formatted-text> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="3" padding="around-small"> |
| | | <lightning-layout-item size="1"> |
| | | <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={reportId} density="comfy"> |
| | | <lightning-output-field field-name="LostType__c" variant="label-hidden"></lightning-output-field> |
| | | </lightning-record-view-form> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | <lightning-layout-item size="2"> |
| | | <label>失单总金额(元):</label> |
| | | <lightning-formatted-number value={LostReport.lostReport.LostTotalAmount__c}></lightning-formatted-number> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="3" padding="around-small"> |
| | | <lightning-layout-item size="1"> |
| | | <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={reportId} density="comfy"> |
| | | <lightning-output-field field-name="LostTotalAmount__c" variant="label-hidden"></lightning-output-field> |
| | | </lightning-record-view-form> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | <lightning-layout-item size="1"> |
| | | <label>包含超声:</label> |
| | | <lightning-formatted-text value={LostReport.lostReport.InclusionUltrasound__c}></lightning-formatted-text> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="3" padding="around-small"> |
| | | <lightning-layout-item size="1"> |
| | | <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={reportId} density="comfy"> |
| | | <lightning-output-field field-name="InclusionUltrasound__c" variant="label-hidden"></lightning-output-field> |
| | | </lightning-record-view-form> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | <lightning-layout-item size="1"> |
| | | <label>状态:</label> |
| | | <lightning-formatted-text value={LostReport.lostReport.Report_Status__c}></lightning-formatted-text> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="1"> |
| | | <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={reportId} density="comfy"> |
| | | <lightning-output-field field-name="Report_Status__c" variant="label-hidden"></lightning-output-field> |
| | | </lightning-record-view-form> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | <lightning-accordion allow-multiple-sections-open class="myAccordion"> |
| | |
| | | <li key={brand.index}> |
| | | <lightning-accordion-section class="text-container" data-id={i} name="失单品牌" label="失单品牌"> |
| | | <lightning-layout> |
| | | <lightning-layout-item size="4" padding="around-small"> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <label>失单品牌:</label> |
| | | <lightning-formatted-text name={i} value={brand.lostBrand.Lost_By_Company__c}></lightning-formatted-text> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto" padding="around-small"> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy"> |
| | | <lightning-output-field field-name="Lost_By_Company__c" variant="label-hidden"></lightning-output-field> |
| | | </lightning-record-view-form> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <label>失单原因(主):</label> |
| | | <lightning-formatted-text name={i} value={brand.lostBrand.Lost_reason_main__c}></lightning-formatted-text> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto" padding="around-small"> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy"> |
| | | <lightning-output-field field-name="Lost_reason_main__c" variant="label-hidden"></lightning-output-field> |
| | | </lightning-record-view-form> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <label>失单原因(次):</label> |
| | | <lightning-formatted-text name={i} value={brand.lostBrand.Lost_Reason_Sub__c}></lightning-formatted-text> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy"> |
| | | <lightning-output-field field-name="Lost_Reason_Sub__c" variant="label-hidden"></lightning-output-field> |
| | | </lightning-record-view-form> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | <lightning-layout> |
| | | <lightning-layout-item size="4" padding="horizontal-small"> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <label>失单品牌(手动):</label> |
| | | <lightning-formatted-text name={i} value={brand.lostBrand.Lost_By_Company_Mannual__c}></lightning-formatted-text> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="4" padding="horizontal-small"> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy"> |
| | | <lightning-output-field field-name="Lost_By_Company_Mannual__c" variant="label-hidden"></lightning-output-field> |
| | | </lightning-record-view-form> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <label>失单金额(元):</label> |
| | | <lightning-formatted-text name={i} value={brand.lostBrand.LostPrice__c}></lightning-formatted-text> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="4" padding="horizontal-small"> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy"> |
| | | <lightning-output-field field-name="LostPrice__c" variant="label-hidden"></lightning-output-field> |
| | | </lightning-record-view-form> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <label>中标经销商:</label> |
| | | <lightning-formatted-text name={i} value={brand.lostBrand.Agency__c}></lightning-formatted-text> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy"> |
| | | <lightning-output-field field-name="Agency__c" variant="label-hidden"></lightning-output-field> |
| | | </lightning-record-view-form> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | <lightning-layout> |
| | | <lightning-layout-item size="4" padding="horizontal-small"> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <label>中标经销商(手动):</label> |
| | | <lightning-formatted-text name={i} value={brand.lostBrand.AgencyMannual__c}></lightning-formatted-text> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;"> |
| | | <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy"> |
| | | <lightning-output-field field-name="AgencyMannual__c" variant="label-hidden"></lightning-output-field> |
| | | </lightning-record-view-form> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | <lightning-layout> |
| | |
| | | </lightning-layout-item> |
| | | </div> |
| | | </lightning-layout> |
| | | |
| | | <template if:true={isSubmit}> |
| | | <div>...test...</div> |
| | | </template> |
| | | </div> |
| | | </div> |
| | | </lightning-card> |
| | | </lightning-card> |
| | | </template> |
| | | </lightning-card> |
| | | |
| | | </template> |