Przeglądaj źródła

服务项目维护中的项目列表增加一列项目应用

张田田 8 miesięcy temu
rodzic
commit
50b55d3d7f
1 zmienionych plików z 18 dodań i 0 usunięć
  1. 18 0
      src/service/ServiceItemsList.vue

+ 18 - 0
src/service/ServiceItemsList.vue

@@ -135,6 +135,7 @@ const gridOptions = reactive<VxeGridProps<SystemItemModel>>({
   columns: [
     { field: 'name', title: '项目名称' },
     { field: 'conditioningProgramType', title: '方案类型' },
+    { field: 'isForWrapCell', title: '项目应用', slots: { default: 'isForWrapCell' } },
     { field: 'cpFixedPricingRule.unitPrice', title: '单价(元)', slots: { default: 'unitPriceCell' } },
     { field: 'cpFixedPricingRule.pricingUnit', title: '计价单位' },
     { field: 'cpFixedPricingRule.convertDose', title: '计价说明', slots: { default: 'convertDoseCell' } },
@@ -328,6 +329,23 @@ defineExpose({
     </header>
     <main class="flex-auto overflow-hidden">
       <vxe-grid ref="gridRef" v-bind="gridOptions" v-on="gridEvents" :loading="loading">
+        <template #isForWrapCell="{ row }">
+          {{
+            (() => {
+              const isWrap = row.isForWrap === 'Y';
+              const isInfer = row.isForInfer === 'Y';
+              if (isWrap && isInfer) {
+                return '服务包项目;调理方案项目';
+              } else if (isWrap) {
+                return '服务包项目';
+              } else if (isInfer) {
+                return '调理方案项目';
+              } else {
+                return '';
+              }
+            })()
+          }}
+        </template>
         <template #unitPriceCell="{ row }">
           {{ row.pricingType === '1' ? `` : row.cpFixedPricingRule?.unitPrice }}
         </template>