Ver código fonte

优化修改资产单据页面

LinWuTai 1 ano atrás
pai
commit
bf3d5bdbe2

+ 9 - 8
ruoyi-admin/src/main/java/com/ruoyi/order/controller/TbOrderController.java

@@ -262,14 +262,15 @@ public class TbOrderController extends BaseController
         }
         }
 
 
         if (!tbOrder.getOrderType().equals(OrderTypeEnum.ADJUSTMENT.getTypeCode())) {
         if (!tbOrder.getOrderType().equals(OrderTypeEnum.ADJUSTMENT.getTypeCode())) {
-            String assetTotalNetValue = tbOrder.getAssetTotalNetValue();
-            String assetTotalOriginalValue = tbOrder.getAssetTotalOriginalValue();
-            if (StrUtil.isBlank(assetTotalNetValue)) {
-                return error("资产总净值不能为空");
-            }
-            if (StrUtil.isBlank(assetTotalOriginalValue)) {
-                return error("资产总原值不能为空");
-            }
+            return error("新增单据无法提交,请完善单据详细");
+//            String assetTotalNetValue = tbOrder.getAssetTotalNetValue();
+//            String assetTotalOriginalValue = tbOrder.getAssetTotalOriginalValue();
+//            if (StrUtil.isBlank(assetTotalNetValue)) {
+//                return error("资产总净值不能为空");
+//            }
+//            if (StrUtil.isBlank(assetTotalOriginalValue)) {
+//                return error("资产总原值不能为空");
+//            }
         }
         }
 
 
         return null;
         return null;

+ 13 - 5
ruoyi-ui/src/views/order/order/index.vue

@@ -310,10 +310,10 @@
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
         <el-form-item v-if="form.orderType !== 1" label="资产总原值" prop="assetTotalOriginalValue">
         <el-form-item v-if="form.orderType !== 1" label="资产总原值" prop="assetTotalOriginalValue">
-          <el-input v-model="form.assetTotalOriginalValue" placeholder="请输入资产总原值" />
+          <el-input v-model="form.assetTotalOriginalValue" placeholder="资产总原值(系统自动补充)" disabled/>
         </el-form-item>
         </el-form-item>
         <el-form-item v-if="form.orderType !== 1" label="资产总净值" prop="assetTotalNetValue">
         <el-form-item v-if="form.orderType !== 1" label="资产总净值" prop="assetTotalNetValue">
-          <el-input v-model="form.assetTotalNetValue" placeholder="请输入资产总净值" />
+          <el-input v-model="form.assetTotalNetValue" placeholder="资产总净值(系统自动补充)" disabled/>
         </el-form-item>
         </el-form-item>
         <el-form-item label="申请日期" prop="applicationDate">
         <el-form-item label="申请日期" prop="applicationDate">
           <el-date-picker clearable
           <el-date-picker clearable
@@ -418,9 +418,10 @@
           </el-select>
           </el-select>
         </el-form-item> -->
         </el-form-item> -->
       </el-form>
       </el-form>
+      <p class="msg" v-if="form.orderType !== 1"><i class="el-icon-info"></i> 保存生成单据后,记得完善单据明细后再提交哦</p>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm(1)">提 交</el-button>
-        <el-button type="warning" @click="submitForm(0)">保 存</el-button>
+        <el-button v-if="form.orderType === 1" type="warning" @click="submitForm(1)">提 交</el-button>
+        <el-button type="primary" @click="submitForm(0)">保 存</el-button>
         <el-button @click="cancel">取 消</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
@@ -465,7 +466,7 @@ export default {
       openAdjustment: false,
       openAdjustment: false,
       adjustmentOriginalAssetInfo: null,
       adjustmentOriginalAssetInfo: null,
       // 部门树选项
       // 部门树选项
-      deptOptions: undefined,
+      deptOptions: [],
       // 弹出层标题
       // 弹出层标题
       title: "",
       title: "",
       // 是否显示弹出层
       // 是否显示弹出层
@@ -520,6 +521,9 @@ export default {
         // corporation: [
         // corporation: [
         //   { required: true, message: "所属公司不能为空", trigger: "blur" }
         //   { required: true, message: "所属公司不能为空", trigger: "blur" }
         // ],
         // ],
+        reason: [
+          { required: true, message: "原因说明不能为空", trigger: "blur" }
+        ],
         recordStatus: [
         recordStatus: [
           { required: true, message: "记录状态不能为空", trigger: "change" }
           { required: true, message: "记录状态不能为空", trigger: "change" }
         ]
         ]
@@ -715,4 +719,8 @@ export default {
     height: 32px;
     height: 32px;
   }
   }
 }
 }
+.msg {
+  text-align: center;
+  color: red;
+}
 </style>
 </style>