Explorar el Código

单据管理添加审核撤回按钮和接口,添加资产下拉框

ljx hace 1 año
padre
commit
21615f1928

+ 37 - 1
ruoyi-admin/src/main/java/com/ruoyi/order/controller/TbOrderController.java

@@ -201,7 +201,7 @@ public class TbOrderController extends BaseController
     }
     }
 
 
     /**
     /**
-     * 修改资产单据
+     * 审批资产单据
      */
      */
     @PreAuthorize("@ss.hasPermi('order:order:audit')")
     @PreAuthorize("@ss.hasPermi('order:order:audit')")
     @Log(title = "资产单据", businessType = BusinessType.UPDATE)
     @Log(title = "资产单据", businessType = BusinessType.UPDATE)
@@ -212,6 +212,42 @@ public class TbOrderController extends BaseController
     }
     }
 
 
     /**
     /**
+     * 多选审批资产单据
+     */
+    @PreAuthorize("@ss.hasPermi('order:order:audit')")
+    @Log(title = "资产单据", businessType = BusinessType.UPDATE)
+    @PutMapping("/auditMore")
+    public AjaxResult auditMore(@RequestBody Long[] ids)
+    {
+        for (int i = 0; i<ids.length; i++){
+            TbOrder tbOrder = tbOrderService.selectTbOrderById(ids[i]);
+            if (tbOrder.getRecordStatus() == 1){
+                tbOrder.setRecordStatus(2L);
+                tbOrderService.updateTbOrder(tbOrder);
+            }
+        }
+        return toAjax(true);
+    }
+
+    /**
+     * 多选撤销资产单据
+     */
+    @PreAuthorize("@ss.hasPermi('order:order:audit')")
+    @Log(title = "资产单据", businessType = BusinessType.UPDATE)
+    @PutMapping("/withdraw")
+    public AjaxResult withdraw(@RequestBody Long[] ids)
+    {
+        for (int i = 0; i<ids.length; i++){
+            TbOrder tbOrder = tbOrderService.selectTbOrderById(ids[i]);
+            if (tbOrder.getRecordStatus() == 1){
+                tbOrder.setRecordStatus(0L);
+                tbOrderService.updateTbOrder(tbOrder);
+            }
+        }
+        return toAjax(true);
+    }
+
+    /**
      * 删除资产单据
      * 删除资产单据
      */
      */
     @PreAuthorize("@ss.hasPermi('order:order:remove')")
     @PreAuthorize("@ss.hasPermi('order:order:remove')")

+ 18 - 0
ruoyi-ui/src/api/order/order.js

@@ -44,6 +44,24 @@ export function auditOrder(data) {
   })
   })
 }
 }
 
 
+// 多选审批资产单据
+export function auditMoreOrder(data) {
+  return request({
+    url: '/order/order/auditMore',
+    method: 'put',
+    data: data
+  })
+}
+
+// 多选撤回资产单据
+export function withdrawMoreOrder(data) {
+  return request({
+    url: '/order/order/withdraw',
+    method: 'put',
+    data: data
+  })
+}
+
 // 删除资产单据
 // 删除资产单据
 export function delOrder(id) {
 export function delOrder(id) {
   return request({
   return request({

+ 63 - 15
ruoyi-ui/src/views/change/orderDetail/index.vue

@@ -1,6 +1,13 @@
 <template>
 <template>
   <div class="app-container">
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="单据编号" prop="orderNumber">
       <el-form-item label="单据编号" prop="orderNumber">
         <el-input
         <el-input
           v-model="queryParams.orderNumber"
           v-model="queryParams.orderNumber"
@@ -18,8 +25,16 @@
         />
         />
       </el-form-item>
       </el-form-item>
       <el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
       </el-form-item>
       </el-form-item>
     </el-form>
     </el-form>
 
 
@@ -32,7 +47,8 @@
           size="mini"
           size="mini"
           @click="handleAdd"
           @click="handleAdd"
           v-hasPermi="['change:orderDetail:add']"
           v-hasPermi="['change:orderDetail:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       </el-col>
       <el-col :span="1.5">
       <el-col :span="1.5">
         <el-button
         <el-button
@@ -43,7 +59,8 @@
           :disabled="single"
           :disabled="single"
           @click="handleUpdate"
           @click="handleUpdate"
           v-hasPermi="['change:orderDetail:edit']"
           v-hasPermi="['change:orderDetail:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       </el-col>
       <el-col :span="1.5">
       <el-col :span="1.5">
         <el-button
         <el-button
@@ -54,7 +71,8 @@
           :disabled="multiple"
           :disabled="multiple"
           @click="handleDelete"
           @click="handleDelete"
           v-hasPermi="['change:orderDetail:remove']"
           v-hasPermi="['change:orderDetail:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       </el-col>
       <el-col :span="1.5">
       <el-col :span="1.5">
         <el-button
         <el-button
@@ -64,18 +82,30 @@
           size="mini"
           size="mini"
           @click="handleExport"
           @click="handleExport"
           v-hasPermi="['change:orderDetail:export']"
           v-hasPermi="['change:orderDetail:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
     </el-row>
 
 
-    <el-table v-loading="loading" :data="orderDetailList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="orderDetailList"
+      @selection-change="handleSelectionChange"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="编号" align="center" prop="id" />
       <el-table-column label="编号" align="center" prop="id" />
       <el-table-column label="单据编号" align="center" prop="orderNumber" />
       <el-table-column label="单据编号" align="center" prop="orderNumber" />
       <el-table-column label="资产编号" align="center" prop="assetNumber" />
       <el-table-column label="资产编号" align="center" prop="assetNumber" />
       <el-table-column label="备注" align="center" prop="remark" />
       <el-table-column label="备注" align="center" prop="remark" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-button
           <el-button
             size="mini"
             size="mini"
@@ -83,20 +113,22 @@
             icon="el-icon-edit"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['change:orderDetail:edit']"
             v-hasPermi="['change:orderDetail:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
           <el-button
             size="mini"
             size="mini"
             type="text"
             type="text"
             icon="el-icon-delete"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             @click="handleDelete(scope.row)"
             v-hasPermi="['change:orderDetail:remove']"
             v-hasPermi="['change:orderDetail:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
-    
+
     <pagination
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :total="total"
       :page.sync="queryParams.pageNum"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       :limit.sync="queryParams.pageSize"
@@ -110,7 +142,17 @@
           <el-input v-model="form.orderNumber" placeholder="请输入单据编号" />
           <el-input v-model="form.orderNumber" placeholder="请输入单据编号" />
         </el-form-item>
         </el-form-item>
         <el-form-item label="资产编号" prop="assetNumber">
         <el-form-item label="资产编号" prop="assetNumber">
-          <el-input v-model="form.assetNumber" placeholder="请输入资产编号" />
+          <template>
+            <el-select v-model="form.assetNumber" filterable placeholder="请输入资产编号">
+              <el-option
+                v-for="item in informationList"
+                :key="item.number"
+                :label="item.name"
+                :value="item.number"
+              >
+              </el-option>
+            </el-select>
+          </template>
         </el-form-item>
         </el-form-item>
         <el-form-item label="备注" prop="remark">
         <el-form-item label="备注" prop="remark">
           <el-input v-model="form.remark" placeholder="请输入备注" />
           <el-input v-model="form.remark" placeholder="请输入备注" />
@@ -126,6 +168,7 @@
 
 
 <script>
 <script>
 import { listOrderDetail, getOrderDetail, delOrderDetail, addOrderDetail, updateOrderDetail } from "@/api/change/orderDetail";
 import { listOrderDetail, getOrderDetail, delOrderDetail, addOrderDetail, updateOrderDetail } from "@/api/change/orderDetail";
+import { listInformation } from "@/api/asset/information";
 
 
 export default {
 export default {
   name: "OrderDetail",
   name: "OrderDetail",
@@ -145,6 +188,8 @@ export default {
       total: 0,
       total: 0,
       // 资产单据明细表格数据
       // 资产单据明细表格数据
       orderDetailList: [],
       orderDetailList: [],
+      // 资产信息表格数据
+      informationList: [],
       // 弹出层标题
       // 弹出层标题
       title: "",
       title: "",
       // 是否显示弹出层
       // 是否显示弹出层
@@ -176,6 +221,9 @@ export default {
     /** 查询资产单据明细列表 */
     /** 查询资产单据明细列表 */
     getList() {
     getList() {
       this.loading = true;
       this.loading = true;
+      listInformation().then(response => {
+        this.informationList = response.rows;
+      });
       listOrderDetail(this.queryParams).then(response => {
       listOrderDetail(this.queryParams).then(response => {
         this.orderDetailList = response.rows;
         this.orderDetailList = response.rows;
         this.total = response.total;
         this.total = response.total;

+ 27 - 0
ruoyi-ui/src/views/index.vue

@@ -46,6 +46,21 @@
                 >
                 >
               </el-descriptions-item>
               </el-descriptions-item>
               <el-descriptions-item
               <el-descriptions-item
+                v-if="props.row.orderType !== 1"
+                label="资产明细"
+              >
+                <el-button
+                  type="text"
+                  icon="el-icon-search"
+                  @click="
+                    onSelectopenDetail(
+                      props.row
+                    )
+                  "
+                  >查看</el-button
+                >
+              </el-descriptions-item>
+              <el-descriptions-item
                 v-if="props.row.orderType === 2"
                 v-if="props.row.orderType === 2"
                 label="【调拨】调出部门"
                 label="【调拨】调出部门"
               >
               >
@@ -200,6 +215,9 @@
         :assetInfo="adjustmentOriginalAssetInfo"
         :assetInfo="adjustmentOriginalAssetInfo"
       />
       />
     </el-dialog>
     </el-dialog>
+    <el-dialog title="单据详细信息" :visible.sync="openDetail" width="1300px" append-to-body>
+      <OrderDetail v-if="openDetail" :orderInfo="orderInfo"/>
+    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -210,6 +228,7 @@ export default {
   dicts: ["asset_order_type", "asset_record_status"],
   dicts: ["asset_order_type", "asset_record_status"],
   components: {
   components: {
     AssetInfo: () => import("@/components/asset/assetCard.vue"),
     AssetInfo: () => import("@/components/asset/assetCard.vue"),
+    OrderDetail: () => import('@/views/order/detail/index.vue'),
   },
   },
   data() {
   data() {
     return {
     return {
@@ -220,6 +239,9 @@ export default {
       // 资产原信息
       // 资产原信息
       openAdjustment: false,
       openAdjustment: false,
       adjustmentOriginalAssetInfo: null,
       adjustmentOriginalAssetInfo: null,
+      // 单据详细
+      openDetail: false,
+      orderInfo: null,
       // 查询参数
       // 查询参数
       queryParams: {
       queryParams: {
         pageNum: 1,
         pageNum: 1,
@@ -277,6 +299,11 @@ export default {
         recordStatus: null,
         recordStatus: null,
       };
       };
     },
     },
+    onSelectopenDetail(order) {
+      this.orderInfo = order
+      console.log('单据信息:', order)
+      this.openDetail = true
+    },
     handleAudit(row, recordStatus) {
     handleAudit(row, recordStatus) {
       this.reset();
       this.reset();
       this.form.id = row.id;
       this.form.id = row.id;

+ 329 - 103
ruoyi-ui/src/views/order/detail/index.vue

@@ -1,6 +1,13 @@
 <template>
 <template>
   <div class="app-container">
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="170px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="170px"
+    >
       <!-- <el-form-item label="单据编号" prop="orderNumber">
       <!-- <el-form-item label="单据编号" prop="orderNumber">
         <el-input
         <el-input
           v-model="queryParams.orderNumber"
           v-model="queryParams.orderNumber"
@@ -10,14 +17,27 @@
         />
         />
       </el-form-item> -->
       </el-form-item> -->
       <el-form-item label="资产编号" prop="assetNumber">
       <el-form-item label="资产编号" prop="assetNumber">
-        <el-input
-          v-model="queryParams.assetNumber"
-          placeholder="请输入资产编号"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
+        <template>
+            <el-select
+              v-model="queryParams.assetNumber"
+              filterable
+              placeholder="请输入资产编号"
+            >
+              <el-option
+                v-for="item in informationList"
+                :key="item.number"
+                :label="item.name"
+                :value="item.number"
+              >
+              </el-option>
+            </el-select>
+          </template>
       </el-form-item>
       </el-form-item>
-      <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】旧管理人" prop="allocationOldResponsiblePerson">
+      <el-form-item
+        v-if="orderInfo.orderType === 2"
+        label="【调拨】旧管理人"
+        prop="allocationOldResponsiblePerson"
+      >
         <el-input
         <el-input
           v-model="queryParams.allocationOldResponsiblePerson"
           v-model="queryParams.allocationOldResponsiblePerson"
           placeholder="请输入【调拨】旧管理人"
           placeholder="请输入【调拨】旧管理人"
@@ -25,7 +45,11 @@
           @keyup.enter.native="handleQuery"
           @keyup.enter.native="handleQuery"
         />
         />
       </el-form-item>
       </el-form-item>
-      <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】旧功能位置编号" prop="allocationOldLocationNumber">
+      <el-form-item
+        v-if="orderInfo.orderType === 2"
+        label="【调拨】旧功能位置编号"
+        prop="allocationOldLocationNumber"
+      >
         <el-input
         <el-input
           v-model="queryParams.allocationOldLocationNumber"
           v-model="queryParams.allocationOldLocationNumber"
           placeholder="请输入【调拨】旧功能位置编号"
           placeholder="请输入【调拨】旧功能位置编号"
@@ -33,7 +57,11 @@
           @keyup.enter.native="handleQuery"
           @keyup.enter.native="handleQuery"
         />
         />
       </el-form-item>
       </el-form-item>
-      <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】新管理人" prop="allocationNewResponsiblePerson">
+      <el-form-item
+        v-if="orderInfo.orderType === 2"
+        label="【调拨】新管理人"
+        prop="allocationNewResponsiblePerson"
+      >
         <el-input
         <el-input
           v-model="queryParams.allocationNewResponsiblePerson"
           v-model="queryParams.allocationNewResponsiblePerson"
           placeholder="请输入【调拨】新管理人"
           placeholder="请输入【调拨】新管理人"
@@ -41,8 +69,15 @@
           @keyup.enter.native="handleQuery"
           @keyup.enter.native="handleQuery"
         />
         />
       </el-form-item>
       </el-form-item>
-      <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】新功能位置编号" prop="allocationNewLocationNumber">
-        <el-select v-model="queryParams.allocationNewLocationNumber" placeholder="请选择【调拨】新功能位置">
+      <el-form-item
+        v-if="orderInfo.orderType === 2"
+        label="【调拨】新功能位置编号"
+        prop="allocationNewLocationNumber"
+      >
+        <el-select
+          v-model="queryParams.allocationNewLocationNumber"
+          placeholder="请选择【调拨】新功能位置"
+        >
           <el-option
           <el-option
             v-for="item in locationList"
             v-for="item in locationList"
             :key="item.number"
             :key="item.number"
@@ -51,23 +86,39 @@
           ></el-option>
           ></el-option>
         </el-select>
         </el-select>
       </el-form-item>
       </el-form-item>
-      <el-form-item v-if="orderInfo.orderType === 3" label="【借出】预计归还时间" prop="lendReturnDate">
-        <el-date-picker clearable
+      <el-form-item
+        v-if="orderInfo.orderType === 3"
+        label="【借出】预计归还时间"
+        prop="lendReturnDate"
+      >
+        <el-date-picker
+          clearable
           v-model="queryParams.lendReturnDate"
           v-model="queryParams.lendReturnDate"
           type="date"
           type="date"
           value-format="yyyy-MM-dd"
           value-format="yyyy-MM-dd"
-          placeholder="请选择【借出】预计归还时间">
+          placeholder="请选择【借出】预计归还时间"
+        >
         </el-date-picker>
         </el-date-picker>
       </el-form-item>
       </el-form-item>
-      <el-form-item v-if="orderInfo.orderType === 3" label="【借出】实际归还时间" prop="lendActualReturnDate">
-        <el-date-picker clearable
+      <el-form-item
+        v-if="orderInfo.orderType === 3"
+        label="【借出】实际归还时间"
+        prop="lendActualReturnDate"
+      >
+        <el-date-picker
+          clearable
           v-model="queryParams.lendActualReturnDate"
           v-model="queryParams.lendActualReturnDate"
           type="date"
           type="date"
           value-format="yyyy-MM-dd"
           value-format="yyyy-MM-dd"
-          placeholder="请选择【借出】实际归还时间">
+          placeholder="请选择【借出】实际归还时间"
+        >
         </el-date-picker>
         </el-date-picker>
       </el-form-item>
       </el-form-item>
-      <el-form-item v-if="orderInfo.orderType === 3" label="【借出】归还经手人" prop="lendBySponsor">
+      <el-form-item
+        v-if="orderInfo.orderType === 3"
+        label="【借出】归还经手人"
+        prop="lendBySponsor"
+      >
         <el-input
         <el-input
           v-model="queryParams.lendBySponsor"
           v-model="queryParams.lendBySponsor"
           placeholder="请输入【借出】归还经手人"
           placeholder="请输入【借出】归还经手人"
@@ -76,13 +127,24 @@
         />
         />
       </el-form-item>
       </el-form-item>
       <el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
       </el-form-item>
       </el-form-item>
     </el-form>
     </el-form>
 
 
     <el-row :gutter="10" class="mb8">
     <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5"  v-if="orderInfo.id === null || orderInfo.recordStatus < 1">
+      <el-col
+        :span="1.5"
+        v-if="orderInfo.id === null || orderInfo.recordStatus < 1"
+      >
         <el-button
         <el-button
           type="primary"
           type="primary"
           plain
           plain
@@ -90,9 +152,13 @@
           size="mini"
           size="mini"
           @click="handleAdd"
           @click="handleAdd"
           v-hasPermi="['order:detail:add']"
           v-hasPermi="['order:detail:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       </el-col>
-      <el-col :span="1.5"  v-if="orderInfo.id === null || orderInfo.recordStatus < 1">
+      <el-col
+        :span="1.5"
+        v-if="orderInfo.id === null || orderInfo.recordStatus < 1"
+      >
         <el-button
         <el-button
           type="success"
           type="success"
           plain
           plain
@@ -101,9 +167,13 @@
           :disabled="single"
           :disabled="single"
           @click="handleUpdate"
           @click="handleUpdate"
           v-hasPermi="['order:detail:edit']"
           v-hasPermi="['order:detail:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       </el-col>
-      <el-col :span="1.5"  v-if="orderInfo.id === null || orderInfo.recordStatus < 1">
+      <el-col
+        :span="1.5"
+        v-if="orderInfo.id === null || orderInfo.recordStatus < 1"
+      >
         <el-button
         <el-button
           type="danger"
           type="danger"
           plain
           plain
@@ -112,7 +182,8 @@
           :disabled="multiple"
           :disabled="multiple"
           @click="handleDelete"
           @click="handleDelete"
           v-hasPermi="['order:detail:remove']"
           v-hasPermi="['order:detail:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       </el-col>
       <el-col :span="1.5">
       <el-col :span="1.5">
         <el-button
         <el-button
@@ -122,33 +193,88 @@
           size="mini"
           size="mini"
           @click="handleExport"
           @click="handleExport"
           v-hasPermi="['order:detail:export']"
           v-hasPermi="['order:detail:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
     </el-row>
 
 
-    <el-table v-loading="loading" :data="detailList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="detailList"
+      @selection-change="handleSelectionChange"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="编号" align="center" prop="id" />
       <el-table-column label="编号" align="center" prop="id" />
       <!-- <el-table-column label="单据编号" align="center" prop="orderNumber" /> -->
       <!-- <el-table-column label="单据编号" align="center" prop="orderNumber" /> -->
-      <el-table-column label="资产编号" align="center" prop="assetNumber" />
-      <el-table-column v-if="orderInfo.orderType === 2" label="【调拨】旧管理人" align="center" prop="allocationOldResponsiblePerson" />
-      <el-table-column v-if="orderInfo.orderType === 2" label="【调拨】旧功能位置编号" align="center" prop="allocationOldLocationNumber" />
-      <el-table-column v-if="orderInfo.orderType === 2" label="【调拨】新管理人" align="center" prop="allocationNewResponsiblePerson" />
-      <el-table-column v-if="orderInfo.orderType === 2" label="【调拨】新功能位置编号" align="center" prop="allocationNewLocationNumber" />
-      <el-table-column v-if="orderInfo.orderType === 3" label="【借出】预计归还时间" align="center" prop="lendReturnDate" width="180">
+      <el-table-column label="资产编号" align="center" prop="assetNumber" >
+        <template slot-scope="scope">
+          <span>{{ scope.row.assetNumber != null ? getAssetName(scope.row.assetNumber) : ""}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        v-if="orderInfo.orderType === 2"
+        label="【调拨】旧管理人"
+        align="center"
+        prop="allocationOldResponsiblePerson"
+      />
+      <el-table-column
+        v-if="orderInfo.orderType === 2"
+        label="【调拨】旧功能位置编号"
+        align="center"
+        prop="allocationOldLocationNumber"
+      />
+      <el-table-column
+        v-if="orderInfo.orderType === 2"
+        label="【调拨】新管理人"
+        align="center"
+        prop="allocationNewResponsiblePerson"
+      />
+      <el-table-column
+        v-if="orderInfo.orderType === 2"
+        label="【调拨】新功能位置编号"
+        align="center"
+        prop="allocationNewLocationNumber"
+      />
+      <el-table-column
+        v-if="orderInfo.orderType === 3"
+        label="【借出】预计归还时间"
+        align="center"
+        prop="lendReturnDate"
+        width="180"
+      >
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.lendReturnDate, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.lendReturnDate, "{y}-{m}-{d}") }}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column v-if="orderInfo.orderType === 3" label="【借出】实际归还时间" align="center" prop="lendActualReturnDate" width="180">
+      <el-table-column
+        v-if="orderInfo.orderType === 3"
+        label="【借出】实际归还时间"
+        align="center"
+        prop="lendActualReturnDate"
+        width="180"
+      >
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.lendActualReturnDate, '{y}-{m}-{d}') }}</span>
+          <span>{{
+            parseTime(scope.row.lendActualReturnDate, "{y}-{m}-{d}")
+          }}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column v-if="orderInfo.orderType === 3" label="【借出】归还经手人" align="center" prop="lendBySponsor" />
+      <el-table-column
+        v-if="orderInfo.orderType === 3"
+        label="【借出】归还经手人"
+        align="center"
+        prop="lendBySponsor"
+      />
       <el-table-column label="备注" align="center" prop="remark" />
       <el-table-column label="备注" align="center" prop="remark" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-button
           <el-button
             v-if="orderInfo.orderType === 3 && orderInfo.recordStatus > 1"
             v-if="orderInfo.orderType === 3 && orderInfo.recordStatus > 1"
@@ -157,7 +283,8 @@
             icon="el-icon-position"
             icon="el-icon-position"
             @click="onReturn(scope.row)"
             @click="onReturn(scope.row)"
             v-hasPermi="['order:order:edit']"
             v-hasPermi="['order:order:edit']"
-          >归还</el-button>
+            >归还</el-button
+          >
           <el-button
           <el-button
             :disabled="orderInfo.recordStatus > 0"
             :disabled="orderInfo.recordStatus > 0"
             size="mini"
             size="mini"
@@ -165,7 +292,8 @@
             icon="el-icon-edit"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['order:detail:edit']"
             v-hasPermi="['order:detail:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
           <el-button
             :disabled="orderInfo.recordStatus > 0"
             :disabled="orderInfo.recordStatus > 0"
             size="mini"
             size="mini"
@@ -173,13 +301,14 @@
             icon="el-icon-delete"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             @click="handleDelete(scope.row)"
             v-hasPermi="['order:detail:remove']"
             v-hasPermi="['order:detail:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
-    
+
     <pagination
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :total="total"
       :page.sync="queryParams.pageNum"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       :limit.sync="queryParams.pageSize"
@@ -190,16 +319,51 @@
     <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
     <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="170px">
       <el-form ref="form" :model="form" :rules="rules" label-width="170px">
         <el-form-item label="单据编号" prop="orderNumber">
         <el-form-item label="单据编号" prop="orderNumber">
-          <el-input v-model="form.orderNumber" placeholder="请输入单据编号" disabled/>
+          <el-input
+            v-model="form.orderNumber"
+            placeholder="请输入单据编号"
+            disabled
+          />
         </el-form-item>
         </el-form-item>
         <el-form-item label="资产编号" prop="assetNumber">
         <el-form-item label="资产编号" prop="assetNumber">
-          <el-input v-model="form.assetNumber" placeholder="请输入资产编号" :disabled="orderInfo.recordStatus > 0"/>
+          <template>
+            <el-select
+              v-model="form.assetNumber"
+              filterable
+              placeholder="请输入资产编号"
+              :disabled="orderInfo.recordStatus > 0"
+            >
+              <el-option
+                v-for="item in informationList"
+                :key="item.number"
+                :label="item.name"
+                :value="item.number"
+              >
+              </el-option>
+            </el-select>
+          </template>
         </el-form-item>
         </el-form-item>
-        <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】旧管理人" prop="allocationOldResponsiblePerson">
-          <el-input v-model="form.allocationOldResponsiblePerson" placeholder="系统自动补充" disabled/>
+        <el-form-item
+          v-if="orderInfo.orderType === 2"
+          label="【调拨】旧管理人"
+          prop="allocationOldResponsiblePerson"
+        >
+          <el-input
+            v-model="form.allocationOldResponsiblePerson"
+            placeholder="系统自动补充"
+            disabled
+          />
         </el-form-item>
         </el-form-item>
-        <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】旧功能位置" prop="allocationOldLocationNumber">
-          <el-select v-model="form.allocationOldLocationNumber" placeholder="系统自动补充" disabled>
+        <el-form-item
+          v-if="orderInfo.orderType === 2"
+          label="【调拨】旧功能位置"
+          prop="allocationOldLocationNumber"
+        >
+          <el-select
+            v-model="form.allocationOldLocationNumber"
+            placeholder="系统自动补充"
+            disabled
+          >
             <el-option
             <el-option
               v-for="item in locationList"
               v-for="item in locationList"
               :key="item.number"
               :key="item.number"
@@ -208,11 +372,25 @@
             ></el-option>
             ></el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
-        <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】新管理人" prop="allocationNewResponsiblePerson">
-          <el-input v-model="form.allocationNewResponsiblePerson" placeholder="请输入【调拨】新管理人" />
+        <el-form-item
+          v-if="orderInfo.orderType === 2"
+          label="【调拨】新管理人"
+          prop="allocationNewResponsiblePerson"
+        >
+          <el-input
+            v-model="form.allocationNewResponsiblePerson"
+            placeholder="请输入【调拨】新管理人"
+          />
         </el-form-item>
         </el-form-item>
-        <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】新功能位置" prop="allocationNewLocationNumber">
-          <el-select v-model="form.allocationNewLocationNumber" placeholder="请选择【调拨】新功能位置">
+        <el-form-item
+          v-if="orderInfo.orderType === 2"
+          label="【调拨】新功能位置"
+          prop="allocationNewLocationNumber"
+        >
+          <el-select
+            v-model="form.allocationNewLocationNumber"
+            placeholder="请选择【调拨】新功能位置"
+          >
             <el-option
             <el-option
               v-for="item in locationList"
               v-for="item in locationList"
               :key="item.number"
               :key="item.number"
@@ -221,29 +399,53 @@
             ></el-option>
             ></el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
-        <el-form-item v-if="orderInfo.orderType === 3" label="【借出】预计归还时间" prop="lendReturnDate">
-          <el-date-picker clearable
+        <el-form-item
+          v-if="orderInfo.orderType === 3"
+          label="【借出】预计归还时间"
+          prop="lendReturnDate"
+        >
+          <el-date-picker
+            clearable
             :disabled="orderInfo.recordStatus > 0"
             :disabled="orderInfo.recordStatus > 0"
             v-model="form.lendReturnDate"
             v-model="form.lendReturnDate"
             type="date"
             type="date"
             value-format="yyyy-MM-dd"
             value-format="yyyy-MM-dd"
-            placeholder="请选择【借出】预计归还时间">
+            placeholder="请选择【借出】预计归还时间"
+          >
           </el-date-picker>
           </el-date-picker>
         </el-form-item>
         </el-form-item>
-        <el-form-item v-if="orderInfo.orderType === 3" label="【借出】实际归还时间" prop="lendActualReturnDate">
-          <el-date-picker clearable
+        <el-form-item
+          v-if="orderInfo.orderType === 3"
+          label="【借出】实际归还时间"
+          prop="lendActualReturnDate"
+        >
+          <el-date-picker
+            clearable
             :disabled="orderInfo.recordStatus < 2"
             :disabled="orderInfo.recordStatus < 2"
             v-model="form.lendActualReturnDate"
             v-model="form.lendActualReturnDate"
             type="date"
             type="date"
             value-format="yyyy-MM-dd"
             value-format="yyyy-MM-dd"
-            placeholder="请选择【借出】实际归还时间">
+            placeholder="请选择【借出】实际归还时间"
+          >
           </el-date-picker>
           </el-date-picker>
         </el-form-item>
         </el-form-item>
-        <el-form-item v-if="orderInfo.orderType === 3" label="【借出】归还经手人" prop="lendBySponsor">
-          <el-input v-model="form.lendBySponsor" placeholder="请输入【借出】归还经手人" :disabled="orderInfo.recordStatus < 2"/>
+        <el-form-item
+          v-if="orderInfo.orderType === 3"
+          label="【借出】归还经手人"
+          prop="lendBySponsor"
+        >
+          <el-input
+            v-model="form.lendBySponsor"
+            placeholder="请输入【借出】归还经手人"
+            :disabled="orderInfo.recordStatus < 2"
+          />
         </el-form-item>
         </el-form-item>
         <el-form-item label="备注" prop="remark">
         <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" placeholder="请输入备注" :disabled="orderInfo.recordStatus > 0"/>
+          <el-input
+            v-model="form.remark"
+            placeholder="请输入备注"
+            :disabled="orderInfo.recordStatus > 0"
+          />
         </el-form-item>
         </el-form-item>
       </el-form>
       </el-form>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
@@ -255,14 +457,21 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { listDetail, getDetail, delDetail, addDetail, updateDetail } from "@/api/order/detail";
+import {
+  listDetail,
+  getDetail,
+  delDetail,
+  addDetail,
+  updateDetail,
+} from "@/api/order/detail";
 import { listLocation } from "@/api/asset/location";
 import { listLocation } from "@/api/asset/location";
+import { listInformation } from "@/api/asset/information";
 export default {
 export default {
   name: "Detail",
   name: "Detail",
   props: {
   props: {
     orderInfo: {
     orderInfo: {
       type: Object,
       type: Object,
-      default: () => { 
+      default: () => {
         return {
         return {
           id: null,
           id: null,
           orderNumber: null,
           orderNumber: null,
@@ -283,10 +492,10 @@ export default {
           preparedBy: null,
           preparedBy: null,
           preparedDepartment: null,
           preparedDepartment: null,
           corporation: null,
           corporation: null,
-          recordStatus: null
-        }
-      }
-    }
+          recordStatus: null,
+        };
+      },
+    },
   },
   },
   data() {
   data() {
     return {
     return {
@@ -306,6 +515,8 @@ export default {
       detailList: [],
       detailList: [],
       // 所属位置表格数据
       // 所属位置表格数据
       locationList: [],
       locationList: [],
+      // 资产信息表格数据
+      informationList: [],
       // 弹出层标题
       // 弹出层标题
       title: "",
       title: "",
       // 是否显示弹出层
       // 是否显示弹出层
@@ -332,21 +543,24 @@ export default {
         //   { required: true, message: "单据编号不能为空", trigger: "blur" }
         //   { required: true, message: "单据编号不能为空", trigger: "blur" }
         // ],
         // ],
         assetNumber: [
         assetNumber: [
-          { required: true, message: "资产编号不能为空", trigger: "blur" }
+          { required: true, message: "资产编号不能为空", trigger: "blur" },
         ],
         ],
-      }
+      },
     };
     };
   },
   },
   created() {
   created() {
-    console.log('单据明细-单据信息:', this.orderInfo)
-    this.getLocation()
+    console.log("单据明细-单据信息:", this.orderInfo);
+    this.getLocation();
     this.getList();
     this.getList();
   },
   },
   methods: {
   methods: {
     /** 查询单据明细列表 */
     /** 查询单据明细列表 */
     getList() {
     getList() {
       this.loading = true;
       this.loading = true;
-      listDetail(this.queryParams).then(response => {
+      listInformation().then((response) => {
+        this.informationList = response.rows;
+      });
+      listDetail(this.queryParams).then((response) => {
         this.detailList = response.rows;
         this.detailList = response.rows;
         this.total = response.total;
         this.total = response.total;
         this.loading = false;
         this.loading = false;
@@ -358,6 +572,10 @@ export default {
         this.locationList = response.rows;
         this.locationList = response.rows;
       });
       });
     },
     },
+    getAssetName(val){
+      let arr = this.informationList.filter(item => item.number===val);
+       return arr[0].name
+    },
     // 取消按钮
     // 取消按钮
     cancel() {
     cancel() {
       this.open = false;
       this.open = false;
@@ -376,7 +594,7 @@ export default {
         lendReturnDate: null,
         lendReturnDate: null,
         lendActualReturnDate: null,
         lendActualReturnDate: null,
         lendBySponsor: null,
         lendBySponsor: null,
-        remark: null
+        remark: null,
       };
       };
       this.resetForm("form");
       this.resetForm("form");
     },
     },
@@ -392,22 +610,22 @@ export default {
     },
     },
     // 多选框选中数据
     // 多选框选中数据
     handleSelectionChange(selection) {
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     },
     /** 新增按钮操作 */
     /** 新增按钮操作 */
     handleAdd() {
     handleAdd() {
       this.reset();
       this.reset();
-      this.form.orderNumber = this.orderInfo.orderNumber
+      this.form.orderNumber = this.orderInfo.orderNumber;
       this.open = true;
       this.open = true;
       this.title = "添加单据明细";
       this.title = "添加单据明细";
     },
     },
     /** 修改按钮操作 */
     /** 修改按钮操作 */
     handleUpdate(row) {
     handleUpdate(row) {
       this.reset();
       this.reset();
-      const id = row.id || this.ids
-      getDetail(id).then(response => {
+      const id = row.id || this.ids;
+      getDetail(id).then((response) => {
         this.form = response.data;
         this.form = response.data;
         this.open = true;
         this.open = true;
         this.title = "修改单据明细";
         this.title = "修改单据明细";
@@ -415,8 +633,8 @@ export default {
     },
     },
     onReturn(row) {
     onReturn(row) {
       this.reset();
       this.reset();
-      const id = row.id || this.ids
-      getDetail(id).then(response => {
+      const id = row.id || this.ids;
+      getDetail(id).then((response) => {
         this.form = response.data;
         this.form = response.data;
         this.open = true;
         this.open = true;
         this.title = "归还单据信息";
         this.title = "归还单据信息";
@@ -424,16 +642,16 @@ export default {
     },
     },
     /** 提交按钮 */
     /** 提交按钮 */
     submitForm() {
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
         if (valid) {
           if (this.form.id != null) {
           if (this.form.id != null) {
-            updateDetail(this.form).then(response => {
+            updateDetail(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.open = false;
               this.getList();
               this.getList();
             });
             });
           } else {
           } else {
-            addDetail(this.form).then(response => {
+            addDetail(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.open = false;
               this.getList();
               this.getList();
@@ -445,29 +663,37 @@ export default {
     /** 删除按钮操作 */
     /** 删除按钮操作 */
     handleDelete(row) {
     handleDelete(row) {
       const ids = row.id || this.ids;
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除单据明细编号为"' + ids + '"的数据项?').then(function() {
-        return delDetail(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除单据明细编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delDetail(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     },
     /** 导出按钮操作 */
     /** 导出按钮操作 */
     handleExport() {
     handleExport() {
-      this.download('order/detail/export', {
-        ...this.queryParams
-      }, `detail_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "order/detail/export",
+        {
+          ...this.queryParams,
+        },
+        `detail_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
 };
 </script>
 </script>
 
 
 <style lang="less" scoped>
 <style lang="less" scoped>
-/deep/ .vue-treeselect{
-  display:inline-block;
+/deep/ .vue-treeselect {
+  display: inline-block;
 }
 }
-.queryForm{
-  /deep/ .vue-treeselect{
+.queryForm {
+  /deep/ .vue-treeselect {
     width: 205px;
     width: 205px;
     height: 32px;
     height: 32px;
   }
   }

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 510 - 179
ruoyi-ui/src/views/order/order/index.vue


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio