Browse Source

优化资产单据页面

LinWuTai 1 year ago
parent
commit
3e8ec97d3a
1 changed files with 8 additions and 39 deletions
  1. 8 39
      ruoyi-ui/src/views/order/order/index.vue

+ 8 - 39
ruoyi-ui/src/views/order/order/index.vue

@@ -399,50 +399,15 @@
         </el-form-item> -->
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button type="primary" @click="submitForm(1)">提 交</el-button>
+        <el-button type="warning" @click="submitForm(0)">保 存</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
 
     <!-- 【调整】资产信息 -->
     <el-dialog title="资产调整" :visible.sync="openAdjustment" width="900px" append-to-body>
-      <el-descriptions title="资产原信息" v-if="adjustmentOriginalAssetInfo" :column="3" border>
-        <el-descriptions-item label="资产ID" v-if="adjustmentOriginalAssetInfo.id">{{adjustmentOriginalAssetInfo.id}}</el-descriptions-item>
-        <el-descriptions-item label="资产名称" v-if="adjustmentOriginalAssetInfo.name">{{adjustmentOriginalAssetInfo.name}}</el-descriptions-item>
-        <el-descriptions-item label="资产条码" v-if="adjustmentOriginalAssetInfo.code">{{adjustmentOriginalAssetInfo.code}}</el-descriptions-item>
-        <el-descriptions-item label="资产编号" v-if="adjustmentOriginalAssetInfo.number">{{adjustmentOriginalAssetInfo.number}}</el-descriptions-item>
-        <el-descriptions-item label="资产分类" v-if="adjustmentOriginalAssetInfo.categoryNumber">{{adjustmentOriginalAssetInfo.categoryNumber}}</el-descriptions-item>
-        <el-descriptions-item label="规格型号" v-if="adjustmentOriginalAssetInfo.specificationsModel">{{adjustmentOriginalAssetInfo.specificationsModel}}</el-descriptions-item>
-        <el-descriptions-item label="ABC分类" v-if="adjustmentOriginalAssetInfo.abcCategory">{{adjustmentOriginalAssetInfo.abcCategory}}</el-descriptions-item>
-        <el-descriptions-item label="管理状态" v-if="adjustmentOriginalAssetInfo.manageStatus">{{adjustmentOriginalAssetInfo.manageStatus}}</el-descriptions-item>
-        <el-descriptions-item label="使用部门" v-if="adjustmentOriginalAssetInfo.userDepartment">{{adjustmentOriginalAssetInfo.userDepartment}}</el-descriptions-item>
-        <el-descriptions-item label="管理部门" v-if="adjustmentOriginalAssetInfo.department">{{adjustmentOriginalAssetInfo.department}}</el-descriptions-item>
-        <el-descriptions-item label="责任人" v-if="adjustmentOriginalAssetInfo.responsiblePerson">{{adjustmentOriginalAssetInfo.responsiblePerson}}</el-descriptions-item>
-        <el-descriptions-item label="所在位置编号" v-if="adjustmentOriginalAssetInfo.locationNumber">{{adjustmentOriginalAssetInfo.locationNumber}}</el-descriptions-item>
-        <el-descriptions-item label="资产性质" v-if="adjustmentOriginalAssetInfo.property">{{adjustmentOriginalAssetInfo.property}}</el-descriptions-item>
-        <el-descriptions-item label="购置日期" v-if="adjustmentOriginalAssetInfo.purchaseDate">{{adjustmentOriginalAssetInfo.purchaseDate}}</el-descriptions-item>
-        <el-descriptions-item label="启用日期" v-if="adjustmentOriginalAssetInfo.commissioningDate">{{adjustmentOriginalAssetInfo.commissioningDate}}</el-descriptions-item>
-        <el-descriptions-item label="资产原值(元)" v-if="adjustmentOriginalAssetInfo.originalValue">{{adjustmentOriginalAssetInfo.originalValue}}</el-descriptions-item>
-        <el-descriptions-item label="使用年限">{{adjustmentOriginalAssetInfo.durableYears}}</el-descriptions-item>
-        <el-descriptions-item label="资产净值(元)" v-if="adjustmentOriginalAssetInfo.netValue">{{adjustmentOriginalAssetInfo.netValue}}</el-descriptions-item>
-        <el-descriptions-item label="资产残值(元)" v-if="adjustmentOriginalAssetInfo.residualValue">{{adjustmentOriginalAssetInfo.residualValue}}</el-descriptions-item>
-        <el-descriptions-item label="累计折旧(元)" v-if="adjustmentOriginalAssetInfo.accumulatedDepreciation">{{adjustmentOriginalAssetInfo.accumulatedDepreciation}}</el-descriptions-item>
-        <el-descriptions-item label="最近折旧日期" v-if="adjustmentOriginalAssetInfo.lastDepreciationDate">{{adjustmentOriginalAssetInfo.lastDepreciationDate}}</el-descriptions-item>
-        <el-descriptions-item label="折旧方式" v-if="adjustmentOriginalAssetInfo.depreciationMethod">{{adjustmentOriginalAssetInfo.depreciationMethod}}</el-descriptions-item>
-        <el-descriptions-item label="合同编号" v-if="adjustmentOriginalAssetInfo.contractNumber">{{adjustmentOriginalAssetInfo.contractNumber}}</el-descriptions-item>
-        <el-descriptions-item label="出厂编号" v-if="adjustmentOriginalAssetInfo.id">{{adjustmentOriginalAssetInfo.factoryNumber}}</el-descriptions-item>
-        <el-descriptions-item label="制造商" v-if="adjustmentOriginalAssetInfo.id">{{adjustmentOriginalAssetInfo.manufacturer}}</el-descriptions-item>
-        <el-descriptions-item label="供应商" v-if="adjustmentOriginalAssetInfo.id">{{adjustmentOriginalAssetInfo.supplier}}</el-descriptions-item>
-        <el-descriptions-item label="资产用途" v-if="adjustmentOriginalAssetInfo.id">{{adjustmentOriginalAssetInfo.purpose}}</el-descriptions-item>
-        <el-descriptions-item label="维保到期日期" v-if="adjustmentOriginalAssetInfo.id">{{adjustmentOriginalAssetInfo.maintenanceDate}}</el-descriptions-item>
-        <el-descriptions-item label="维修电话" v-if="adjustmentOriginalAssetInfo.id">{{adjustmentOriginalAssetInfo.maintenanceTel}}</el-descriptions-item>
-        <el-descriptions-item label="维修人员" v-if="adjustmentOriginalAssetInfo.id">{{adjustmentOriginalAssetInfo.maintenanceUser}}</el-descriptions-item>
-        <el-descriptions-item label="所属公司" v-if="adjustmentOriginalAssetInfo.id">{{adjustmentOriginalAssetInfo.corporation}}</el-descriptions-item>
-        <el-descriptions-item label="记录状态" v-if="adjustmentOriginalAssetInfo.id">{{adjustmentOriginalAssetInfo.recordStatus}}</el-descriptions-item>
-        <el-descriptions-item label="备注">
-          <el-tag size="small">学校</el-tag>
-        </el-descriptions-item>
-      </el-descriptions>
+      <AssetInfo :title="'资产原信息'" :assetInfo="adjustmentOriginalAssetInfo"/>
     </el-dialog>
   </div>
 </template>
@@ -453,6 +418,9 @@ import { listOrder, getOrder, delOrder, addOrder, updateOrder } from "@/api/orde
 export default {
   name: "Order",
   dicts: ['asset_order_type', 'asset_record_status'],
+  components: {
+    AssetInfo: () => import('@/components/asset/assetCard.vue')
+  },
   data() {
     return {
       // 遮罩层
@@ -665,10 +633,11 @@ export default {
       });
     },
     /** 提交按钮 */
-    submitForm() {
+    submitForm(recordStatus) {
       this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.id != null) {
+            this.form.recordStatus = recordStatus
             updateOrder(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;