Browse Source

修改提交

HuRongxin 1 month ago
parent
commit
e772068771

+ 6 - 0
src/api/warehouse/productNutrition/types.ts

@@ -549,6 +549,8 @@ export interface NutritionVO {
      */
     productAttachments: string;
 
+    productAttachmentsList: string[];
+
     /**
      * 状态(1:启用 0:禁用)
      */
@@ -1129,6 +1131,8 @@ export interface NutritionForm extends BaseEntity {
      */
     productAttachments?: string;
 
+    productAttachmentsList?: string[];
+
     /**
      * 状态(1:启用 0:禁用)
      */
@@ -1696,6 +1700,8 @@ export interface NutritionQuery extends PageQuery {
      */
     productAttachments?: string;
 
+    productAttachmentsList?: string[];
+
     /**
      * 状态(1:启用 0:禁用)
      */

+ 67 - 77
src/views/warehouse/nutriProduct/index.vue

@@ -234,7 +234,7 @@
                             <el-row :gutter="20">
                                 <el-col :span="12">
                                     <el-form-item label="商品许可证有效期至:" prop="productLicenseExpiry">
-                                        <el-date-picker v-model="form.productLicenseExpiry" type="date" placeholder="选择" value-format="YYYY-MM-DD" />
+                                        <el-date-picker v-model="form.productLicenseExpiry" type="date" placeholder="选择一天" value-format="YYYY-MM-DD" />
                                     </el-form-item>
                                 </el-col>
                                 <el-col :span="12">
@@ -252,7 +252,7 @@
                                 <el-col :span="12">
                                     <el-form-item label="入货价格:" prop="purchasePrice" required>
                                         <el-input v-model="form.purchasePrice" placeholder="请输入">
-                                            <template #append>元/盒</template>
+                                            <template #append>元</template>
                                         </el-input>
                                     </el-form-item>
                                 </el-col>
@@ -294,7 +294,7 @@
                                     </el-form-item>
                                 </el-col>
                             </el-row>
-                            <el-divider content-position="left">预包装销售设置:</el-divider>
+                            <el-divider content-position="left">预包装销售设置</el-divider>
                             <el-row :gutter="20">
                                 <el-col :span="12">
                                     <el-form-item label="预包装销售价:" prop="packagePrice" required>
@@ -348,7 +348,6 @@
 
                     <el-tab-pane label="热能及三大营养素" name="nutrition">
                         <span style="color: red; font-size: 16px; margin-bottom: 20px">注:每100(g/ml) 含量</span>
-
                         <el-form ref="nutritionFormRef" :model="form" :rules="rules" label-width="200px">
                             <el-row :gutter="20" style="margin-top:20px">
                                 <el-col :span="8">
@@ -396,7 +395,6 @@
 
                     <el-tab-pane label="常量元素" name="macroElements">
                         <span style="color: red; font-size: 16px; margin-bottom: 10px">注:每100(g/ml) 含量</span>
-
                         <el-form ref="nutritionFormRef" :model="form" :rules="rules" label-width="200px">
                             <el-row :gutter="20" style="margin-top:20px">
                                 <el-col :span="8">
@@ -445,13 +443,11 @@
                                     </el-form-item>
                                 </el-col>
                             </el-row>
-
                         </el-form>
                     </el-tab-pane>
 
                     <el-tab-pane label="微量元素" name="microElements">
                         <span style="color: red; font-size: 16px; margin-bottom: 10px">注:每100(g/ml) 含量</span>
-
                         <el-form ref="nutritionFormRef" :model="form" :rules="rules" label-width="200px">
                             <el-row :gutter="20" style="margin-top:20px">
                                 <el-col :span="8">
@@ -478,7 +474,6 @@
                             </el-row>
 
                             <el-row :gutter="20">
-
                                 <el-col :span="8">
                                     <el-form-item label="铜:" prop="cu">
                                         <el-input v-model="form.cu" placeholder="请输入">
@@ -733,7 +728,6 @@
 
                     <el-tab-pane label="维生素" name="vitamins">
                         <span style="color: red; font-size: 16px; margin-bottom: 10px">注:每100(g/ml) 含量</span>
-
                         <el-form ref="nutritionFormRef" :model="form" :rules="rules" label-width="200px">
                             <el-row :gutter="20" style="margin-top:20px">
                                 <el-col :span="8">
@@ -1001,13 +995,7 @@
                     <el-tab-pane label="商品附件" name="productAttachments">
                         <el-form ref="nutritionFormRef" :model="form" :rules="rules" label-width="200px" style="margin-top: 30px">
                             <el-form-item label="商品附件" prop="productAttachments">
-                                <FileUpload 
-                                    v-model="form.productAttachments" 
-                                    :limit="10"
-                                    :file-size="10"
-                                    :file-type="['jpg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx']"
-                                    :is-show-tip="true"
-                                />
+                                <FileUpload v-model="form.productAttachmentList" :limit="10" :file-size="10" :file-type="['jpg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx']" :is-show-tip="true" />
                             </el-form-item>
                         </el-form>
                     </el-tab-pane>
@@ -1044,7 +1032,7 @@
                 <el-scrollbar height="calc(80vh - 120px)">
                     <el-tab-pane label="基本信息" name="basic">
                         <el-divider content-position="left">基本信息:</el-divider>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="12">
                                 <div><b>产品名称:</b>{{ form.productName || '--' }}</div>
                                 <div><b>院方系统编码:</b>{{ form.hospitalSystemCode || '--' }}</div>
@@ -1069,7 +1057,7 @@
                             </el-col>
                         </el-row>
                         <el-divider content-position="left">入货信息:</el-divider>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="12">
                                 <div><b>入货价格:</b>{{ form.purchasePrice || '--' }} 元</div>
                                 <div><b>默认用法:</b>{{ getDictLabel(default_usage, form.defaultUsage) || '--' }}</div>
@@ -1081,7 +1069,7 @@
                             </el-col>
                         </el-row>
                         <el-divider content-position="left">预包装销售设置:</el-divider>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="12">
                                 <div><b>预包装销售价:</b>{{ form.packagePrice || '--' }}元/{{ getDictLabel(product_package_unit, form.packageUnit) || '--' }}</div>
                                 <div><b>最小包装规格:</b>{{ form.minSpec || '--' }} {{getDictLabel(product_spec_unit ,form.productSpecUnit )|| '--' }}/{{ getDictLabel(product_package_unit, form.minUnit) || '--' }}</div>
@@ -1092,7 +1080,7 @@
                             </el-col>
                         </el-row>
                         <el-divider content-position="left">配置销售设置:</el-divider>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="12">
                                 <div><b>配置销售价格:</b>{{ form.configSalePrice || '--' }} 元/{{getDictLabel(product_spec_unit ,form.productSpecUnit )|| '--' }}</div>
                             </el-col>
@@ -1102,8 +1090,8 @@
                         </el-row>
                     </el-tab-pane>
                     <el-tab-pane label="热能及三大营养素" name="nutrition">
-                        <el-divider content-position="left">热能及三大营养素:</el-divider>
-                        <el-row :gutter="40">
+                        <span style="color: red; font-size: 16px; margin-bottom: 10px">注:每100(g/ml) 含量</span>
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>热量:</b>{{ form.calorie || '--' }} kcal</div>
                             </el-col>
@@ -1117,15 +1105,15 @@
                                 <div><b>蛋白质:</b>{{ form.protein || '--' }} g</div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>脂肪:</b>{{ form.fat || '--' }} g</div>
                             </el-col>
                         </el-row>
                     </el-tab-pane>
                     <el-tab-pane label="常量元素" name="macroElements">
-                        <el-divider content-position="left">常量元素:</el-divider>
-                        <el-row :gutter="40">
+                        <span style="color: red; font-size: 16px; margin-bottom: 10px">注:每100(g/ml) 含量</span>
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>钙:</b>{{ form.ca || '--' }} mg</div>
                             </el-col>
@@ -1139,7 +1127,7 @@
                                 <div><b>钠:</b>{{ form.na || '--' }} mg</div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>镁:</b>{{ form.mg || '--' }} mg</div>
                             </el-col>
@@ -1149,8 +1137,8 @@
                         </el-row>
                     </el-tab-pane>
                     <el-tab-pane label="微量元素" name="microElements">
-                        <el-divider content-position="left">微量元素:</el-divider>
-                        <el-row :gutter="40">
+                        <span style="color: red; font-size: 16px; margin-bottom: 10px">注:每100(g/ml) 含量</span>
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>铁:</b>{{ form.fe || '--' }} mg</div>
                             </el-col>
@@ -1164,7 +1152,7 @@
                                 <div><b>铜:</b>{{ form.cu || '--' }} mg</div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>锰:</b>{{ form.mn || '--' }} mg</div>
                             </el-col>
@@ -1178,7 +1166,7 @@
                                 <div><b>铬:</b>{{ form.cr || '--' }} μg</div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="12">
                                 <div><b>钼:</b>{{ form.mo || '--' }} μg</div>
                             </el-col>
@@ -1186,8 +1174,8 @@
 
                     </el-tab-pane>
                     <el-tab-pane label="氨基酸" name="aminoAcids">
-                        <el-divider content-position="left">氨基酸:</el-divider>
-                        <el-row :gutter="40">
+                        <span style="color: red; font-size: 16px; margin-bottom: 10px">注:每100(g/ml) 含量</span>
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>异亮氨酸:</b>{{ form.isoleucine || '--' }} mg</div>
                             </el-col>
@@ -1201,7 +1189,7 @@
                                 <div><b>组氨酸:</b>{{ form.histidine || '--' }} mg</div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>芳香族氨基酸:</b>{{ form.aromaticAminoAcid || '--' }} mg</div>
                             </el-col>
@@ -1215,7 +1203,7 @@
                                 <div><b>丝氨酸:</b>{{ form.serine || '--' }} mg</div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>精氨酸:</b>{{ form.arginine || '--' }} mg</div>
                             </el-col>
@@ -1229,7 +1217,7 @@
                                 <div><b>胱氨酸:</b>{{ form.cysteine || '--' }} mg</div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>脯氨酸:</b>{{ form.proline || '--' }} mg</div>
                             </el-col>
@@ -1243,7 +1231,7 @@
                                 <div><b>缬氨酸:</b>{{ form.valine || '--' }} mg</div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>蛋氨酸:</b>{{ form.methionine || '--' }} mg</div>
                             </el-col>
@@ -1259,8 +1247,8 @@
                         </el-row>
                     </el-tab-pane>
                     <el-tab-pane label="脂肪酸" name="fattyAcids">
-                        <el-divider content-position="left">脂肪酸:</el-divider>
-                        <el-row :gutter="40">
+                        <span style="color: red; font-size: 16px; margin-bottom: 10px">注:每100(g/ml) 含量</span>
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>脂肪酸:</b>{{ form.fattyAcid || '--' }} mg</div>
                             </el-col>
@@ -1277,8 +1265,8 @@
 
                     </el-tab-pane>
                     <el-tab-pane label="维生素" name="vitamins">
-                        <el-divider content-position="left">维生素:</el-divider>
-                        <el-row :gutter="40">
+                        <span style="color: red; font-size: 16px; margin-bottom: 10px">注:每100(g/ml) 含量</span>
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>维生素A:</b>{{ form.vitaminA || '--' }} mg</div>
                             </el-col>
@@ -1292,7 +1280,7 @@
                                 <div><b>维生素D:</b>{{ form.vitaminD || '--' }} mg</div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>维生素E:</b>{{ form.vitaminE || '--' }} mg</div>
                             </el-col>
@@ -1306,7 +1294,7 @@
                                 <div><b>维生素B1:</b>{{ form.vitaminBOne || '--' }} mg</div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>维生素B2:</b>{{ form.vitaminBTwo || '--' }} mg</div>
                             </el-col>
@@ -1320,7 +1308,7 @@
                                 <div><b>烟酸(尼克酸):</b>{{ form.niacin || '--' }} mg</div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>维生素C:</b>{{ form.vitaminC || '--' }} mg</div>
                             </el-col>
@@ -1334,24 +1322,24 @@
                                 <div><b>生物素:</b>{{ form.biotin || '--' }} mg</div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>泛酸:</b>{{ form.pantothenicAcid || '--' }} mg</div>
                             </el-col>
                         </el-row>
                     </el-tab-pane>
                     <el-tab-pane label="脂类" name="lipids">
-                        <el-divider content-position="left">脂类:</el-divider>
-                        <el-row :gutter="40">
+                        <span style="color: red; font-size: 16px; margin-bottom: 10px">注:每100(g/ml) 含量</span>
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="12">
                                 <div><b>胆固醇:</b>{{ form.cholesterol || '--' }} mg</div>
                             </el-col>
                         </el-row>
                     </el-tab-pane>
                     <el-tab-pane label="其他" name="others">
-                        <el-divider content-position="left">其他:</el-divider>
-                        <el-row :gutter="40">
-                            <el-col :span="6">
+                        <span style="color: red; font-size: 16px; margin-bottom: 10px">注:每100(g/ml) 含量</span>
+                        <el-row :gutter="40" style="margin-top: 30px">
+                            <el-col :span="6" >
                                 <div><b>血糖生成指数:</b>{{ form.bloodGlucoseIndex || '--' }} mg</div>
                             </el-col>
                             <el-col :span="6">
@@ -1364,7 +1352,7 @@
                                 <div><b>灰分:</b>{{ form.ash || '--' }} mg</div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="6">
                                 <div><b>可溶性膳食纤维:</b>{{ form.solubleDietaryFiber || '--' }} mg</div>
                             </el-col>
@@ -1372,56 +1360,57 @@
 
                     </el-tab-pane>
                     <el-tab-pane label="商品说明" name="productDescription">
-                        <el-divider content-position="left">商品说明:</el-divider>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 50px">
                             <el-col :span="12">
-                                <div><b>适用人群:</b>{{ form.applicableCrowd || '--' }} mg</div>
+                                <div><b>适用人群:</b>{{ form.applicableCrowd || '--' }} </div>
                             </el-col>
                             <el-col :span="12">
-                                <div><b>不适用人群:</b>{{ form.unsuitableCrowd || '--' }} mg</div>
+                                <div><b>不适用人群:</b>{{ form.unsuitableCrowd || '--' }} </div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 50px">
                             <el-col :span="12">
-                                <div><b>渗透压:</b>{{ form.osmoticPressure || '--' }} mg</div>
+                                <div><b>渗透压:</b>{{ form.osmoticPressure || '--' }} </div>
                             </el-col>
                             <el-col :span="12">
-                                <div><b>原料:</b>{{ form.rawMaterial || '--' }} mg</div>
+                                <div><b>原料:</b>{{ form.rawMaterial || '--' }} </div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 50px">
                             <el-col :span="12">
-                                <div><b>适应症及禁忌:</b>{{ form.indicationsContraindications || '--' }} mg</div>
+                                <div><b>适应症及禁忌:</b>{{ form.indicationsContraindications || '--' }} </div>
                             </el-col>
                             <el-col :span="12">
-                                <div><b>食用方法和食用量:</b>{{ form.usageAndDosage || '--' }} mg</div>
+                                <div><b>食用方法和食用量:</b>{{ form.usageAndDosage || '--' }} </div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 50px">
                             <el-col :span="12">
-                                <div><b>产品特点:</b>{{ form.productFeatures || '--' }} mg</div>
+                                <div><b>产品特点:</b>{{ form.productFeatures || '--' }} </div>
                             </el-col>
                             <el-col :span="12">
-                                <div><b>储存条件:</b>{{ form.storageConditions || '--' }} mg</div>
+                                <div><b>储存条件:</b>{{ form.storageConditions || '--' }} </div>
                             </el-col>
                         </el-row>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 50px">
                             <el-col :span="12">
-                                <div><b>警示说明及注意事项:</b>{{ form.warningInstructions || '--' }} mg</div>
+                                <div><b>警示说明及注意事项:</b>{{ form.warningInstructions || '--' }} </div>
                             </el-col>
                         </el-row>
 
                     </el-tab-pane>
                     <el-tab-pane label="商品附件" name="productAttachments">
-                        <el-divider content-position="left">商品附件:</el-divider>
-                        <el-row :gutter="40">
+                        <el-row :gutter="40" style="margin-top: 30px">
                             <el-col :span="24">
-                                <div v-if="form.productAttachments && form.productAttachments.length">
-                                    <div v-for="(file, idx) in form.productAttachments" :key="idx">
-                                        <a :href="file.url" target="_blank">{{ file.name }}</a>
+                                <div>
+                                    <b>商品附件:</b>
+                                    <div v-if="form.productAttachmentsList && form.productAttachmentsList.length">
+                                        <div v-for="(file, idx) in form.productAttachmentsList" :key="idx">
+                                            <a :href="file.url" target="_blank">{{ file.name }}</a>
+                                        </div>
                                     </div>
+                                    <div v-else>--</div>
                                 </div>
-                                <div v-else>--</div>
                             </el-col>
                         </el-row>
                     </el-tab-pane>
@@ -1523,14 +1512,14 @@
         shelfLifeReminder: undefined,
         shelfLife: undefined,
         purchasePrice: undefined,
-        purchaseUnit: '',
-        defaultUsage: '口服',
-        packageUnit: '',
+        purchaseUnit: '2',
+        defaultUsage: '2',
+        packageUnit: '2',
         productSpec: undefined,
         productSpecValue: undefined,
-        productSpecUnit: 'g',
+        productSpecUnit: '1',
         packagePrice: undefined,
-        minUnit: '',
+        minUnit: '3',
         minSpec: undefined,
         netContent: undefined,
         configSalePrice: undefined,
@@ -1612,7 +1601,8 @@
         productFeatures: undefined,
         storageConditions: undefined,
         warningInstructions: undefined,
-        productAttachments: [],
+        productAttachments: undefined,
+        productAttachmentsList: [],
         status: undefined,
         putFlag: undefined,
         outboundNumber: undefined,