Тема: урок посвящён добавлению дополнительной вычислимой колонки в документ, создаваемый на терминале сбора данных.
Содержание: показана возможность заведения вычислимых колонок на примере создания операции, результатом работы которой будет документ заказа клиента. Добавление колонок, не требующих автоматического вычисления, рассмотрено в уроке «Добавление колонки в документ».
Рекомендуется к прочтению:
Материалы к уроку:
демооперация, использованная в уроке. Для добавления в свою конфигурацию нужно выполнить следующие действия:
- Скопировать приведённый текст в буфер обмена (Ctrl+C);
- Открыть Панель управления Mobile SMARTS;
- Выбрать узел «Типы документов», вставить содержимое буфера (Ctrl+V).
После выполнения этой последовательности в конфигурации появится операция «Демооперация».
<DocumentTypealias="Демооперация"allowRemoveDocuments="True"askWarehouseBeforeDocumentSelection="False"autoCreateNewDocument="False"autoOpenSigleDocument="False"autoStartNewDocumentCreation="False"autoStartNewDocumentCreationForEmptyList="False"barcodeDocumentSelection="True"checkServerBarcodes="True"clientCreating="True"cyclic="False"defaultMainButtonHeight="26"documentSelectionText=""fullscreen="False"inaccessibleForDocumentAbsence="False"input="False"itemFormat=""manualDocumentSelection="True"manualExit="False"name="Демооперация"output="False"refreshTimeForServerList="0"removeAfterFinish="False"removingDelay="0"runDataExchangeOnDocumentCompleted="True"showDeclaredQuantities="False"showDocumentsFromServerInList="False"showFinishedServerDocuments="False"showInProcessServerDocuments="False"virtual="False"writeChangeInfoToDocument="False"><Actionscapacity="8"><QuestionActionautoCloseTime="0"backgroundImage=""breakPoint="False"cancelType="None"defaultButtonHeight="0"fullscreen="Inherit"id="312adc9c-00e5-4888-a924-d92ee3ea39f8"indent="0"name="Главное меню"nextDirection=""transactionNotch="True"welcomeText=""><ButtonDirectionscapacity="4"><String>Сканирование</String><String>Просмотр строк</String><String>abort</String><String>return</String></ButtonDirections><ButtonTextscapacity="4"><String>Начать/продолжить</String><String>Просмотр строк</String><String>Временно выйти</String><String>Завершить</String></ButtonTexts><KeyJumpscapacity="0"/></QuestionAction><ScanActionautoCloseTime="0"autoSelectSingleProduct="True"autoShowSelectionList="False"backgroundImage=""barcodeConvertion="ToUpper"barcodeSessionVariable="ScannedBarcode"breakPoint="False"cancelType="None"canManualShowProductList="True"canSelectCell="False"canSelectPallet="False"cellDirection=""errorSelectDirection="Товар не найден"fullscreen="Inherit"headerText="(esc) - выход в меню"id="bfb485eb-726b-41ee-8058-4483ab7d9398"ignoreBaseBarcodes="False"ignoreQuantityPolicy="False"indent="0"name="Сканирование"nextDirection=""notFoundErrorText="товар не найден"palletDirection=""playAudioOnError="True"processSessionBarcode="False"productsListHeaderText=""quickSelectProduct="False"searchingProducts=""searchPreviousSelected="False"selectionCellNum="0"selectionCellText=""selectionFirstCellText=""selectionListFormat=""selectionPalletText=""selectionSecondCellText=""selectionStorageVariable=""sucsessSelectDirection="Ввод количества"transactionNotch="True"useOnlyDocumentProducts="False"waitImage=""welcomeText="Отсканируйте штрихкод товара:"withoutControls="False"><ExcludeClassificatorscapacity="0"/><IncludeClassificatorscapacity="0"/><KeyJumpscapacity="4"><KeyToActionaction="Главное меню"barcode=""condition=""key="Escape"modifiers="None"/></KeyJumps><TreeTypeIdscapacity="0"/></ScanAction><SimpleQuantityActionautoCloseTime="0"backgroundImage=""breakPoint="False"cancelType="None"fullscreen="Inherit"headerText="(esc) - назад
<r color="blue">{SelectedProduct.Product.Name}</r>
<r color="green">Набрано: {SelectedProduct.Product.CurrentQuantity}</r>

"id="5b940bca-1bff-45ed-bf7e-632bc44b7c26"indent="0"name="Ввод количества"nextDirection=""transactionNotch="True"><KeyJumpscapacity="4"><KeyToActionaction="undo"barcode=""condition=""key="Escape"modifiers="None"/></KeyJumps></SimpleQuantityAction><FieldEditActionautoCloseTime="0"backgroundImage=""breakPoint="False"cancelType="None"eanAI="None"editType="DocumentColumn"fieldName="Цена"format=""fullscreen="Inherit"headerText="(esc) - назад
<r color="blue">{SelectedProduct.Product.Name}</r>"id="a01a43bf-04ed-4e01-932f-d9acf0c567af"indent="0"listItemFormat=""nextDirection=""rememberPreviousValue="True"setForBuffer="False"showEditBox="True"showList="False"sizeType="Normal"transactionNotch="True"viewItems=""welcomeText="Введите цену:"><Columnscapacity="0"/><KeyJumpscapacity="4"><KeyToActionaction="undo"barcode=""condition=""key="Escape"modifiers="None"/></KeyJumps><QuerycopySelection="False"documentLines="Declared"whereExpression=""><Fieldscapacity="0"/><GroupBycapacity="0"/><SortBycapacity="0"/><Wherecapacity="0"/></Query></FieldEditAction><AcceptInDocumentActionbreakPoint="False"checkDocumentInfill="False"checkQuantity="False"combineEqualCurrentItems="False"declaredExpression=""errorQuantityMessage="Товара больше, чем разрешает документ."id="a0876cca-eeb9-4277-b529-a33b18bc93b8"ignoreFieldsInDocument="False"indent="0"name="Запись в документ"nextDirection=""noProductErrorDirection=""noProductInDocumentMessage="Такой товар отсутствует в документе."onlyInCurrentItems="False"quantityErrorDirection=""useSelectedLine="False"><ComparingFieldNamescapacity="0"/><ComparingFieldNamesForCurrentItemscapacity="0"/></AcceptInDocumentAction><ItemsViewActionid="e7673503-3f3e-4052-9f49-5af26cab8d66"name="Просмотр строк"nextDirection="Сканирование"headerText="(esc) - выход в меню 
(enter) - перейти к сканированию"transactionNotch="True"cancelType="None"backgroundImage=""format=""selectedItem=""viewItems=""welcomeText="Товары:"><KeyJumpscapacity="4"><KeyToActionaction="Главное меню"barcode=""condition=""key="Escape"modifiers="None"/></KeyJumps><Columnscapacity="4"><ItemsColumnalign="TopLeft"allBorder="0"backColor="White"bottomBorder="0"format="{Item.Product.Name}"leftBorder="0"rightBorder="0"title="Название"topBorder="0"width="100%"/><ItemsColumnalign="TopCenter"allBorder="0"backColor="White"bottomBorder="0"format="{Item.Product.CurrentQuantity}"leftBorder="0"rightBorder="0"title="Набрано"topBorder="0"width="30%"/><ItemsColumnalign="TopCenter"allBorder="0"backColor="White"bottomBorder="0"format="{Item.Цена}"leftBorder="0"rightBorder="0"title="Цена"topBorder="0"width="20%"/></Columns><QuerycopySelection="False"documentLines="Declared"whereExpression=""><Fieldscapacity="0"/><GroupBycapacity="0"/><SortBycapacity="0"/><Wherecapacity="0"/></Query></ItemsViewAction><QuestionYesNoActionautoCloseTime="0"backgroundImage=""breakPoint="False"cancelType="None"fullscreen="Inherit"id="fa1b0032-ea5e-4877-8743-0499044a7ff5"indent="0"message="Товар не найден. Повторить сканирование?"name="Товар не найден"nextDirection=""noDirection="Главное меню"transactionNotch="True"yesDirection="Сканирование"><KeyJumpscapacity="0"/></QuestionYesNoAction></Actions><Columnscapacity="4"><FieldInfoeanAI="None"fieldName="Цена"fieldType="Double"valueTemplate=""/></Columns><Errorscapacity="0"/><Fieldscapacity="0"/><InfoStringscapacity="0"/><Tablescapacity="0"/></DocumentType>
Смотрите также: