zhuqingsong 1 gadu atpakaļ
vecāks
revīzija
72d66db8e7

+ 0 - 10
.env - 副本 (2).development

@@ -1,10 +0,0 @@
1
-# 若依管理系统/开发环境
2
-# VUE_APP_BASE_URL = 'http://172.16.6.217:9999/admin'
3
-# VUE_APP_BASE_URL = 'http://121.36.17.6:9098'
4
- VUE_APP_BASE_URL = 'http://g34i4b.natappfree.cc/admin'
5
-
6
-# 页面标题
7
-VUE_APP_TITLE = "应急物资系统"
8
-
9
-# 开发环境配置
10
-VUE_APP_ENV = 'development'

+ 0 - 10
.env - 副本.development

@@ -1,10 +0,0 @@
1
-# 若依管理系统/开发环境
2
-# VUE_APP_BASE_URL = 'http://192.168.50.205:9999'
3
-# VUE_APP_BASE_URL = 'http://172.16.6.217:9999'
4
-VUE_APP_BASE_URL = 'http://121.36.17.6:9099'
5
-
6
-# 页面标题
7
-VUE_APP_TITLE = "应急物资系统"
8
-
9
-# 开发环境配置
10
-VUE_APP_ENV = 'development'

+ 22 - 0
src/api/inAndOut/formationFilling/out.ts

@@ -92,3 +92,25 @@ export function addInOrderData(data: any) {
92 92
     data
93 93
   });
94 94
 }
95
+
96
+export function getOutPageNew(data: any) {
97
+  return request({
98
+    url: `/admin/order/page`,
99
+    method: "get",
100
+    params: data
101
+  });
102
+}
103
+
104
+export function deleteOutDataNew(id: string) {
105
+  return request({
106
+    url: `/admin/order/${id}`,
107
+    method: "delete"
108
+  });
109
+}
110
+
111
+export function lookOutDataNew(id: string) {
112
+  return request({
113
+    url: `/admin/order/${id}`,
114
+    method: "get"
115
+  });
116
+}

+ 41 - 35
src/views/InformationFilling/outIssue/detail.vue

@@ -1,16 +1,24 @@
1 1
 <!-- 应急物资分类表 -->
2 2
 <template>
3 3
   <basic-container class="container">
4
-    <el-form class="whole_form" :rules="rules" :inline="true" ref="ruleForms" label-width="80px" :model="formData">
4
+    <el-form
5
+      class="whole_form"
6
+      :rules="rules"
7
+      :inline="true"
8
+      ref="ruleForms"
9
+      label-width="80px"
10
+      label-suffix=":"
11
+      :model="formData"
12
+    >
5 13
       <el-row>
6 14
         <el-col :span="6">
7 15
           <el-form-item label="调令编号">
8
-            <el-input v-model="formData.orderNo" style="width: 200px" clearable />
16
+            <el-input v-model="formData.orderNo" :disabled="props.type == 'look'" style="width: 200px" clearable />
9 17
           </el-form-item>
10 18
         </el-col>
11 19
         <el-col :span="6">
12 20
           <el-form-item label="调令名称">
13
-            <el-input v-model="formData.orderName" style="width: 200px" clearable />
21
+            <el-input v-model="formData.orderName" :disabled="props.type == 'look'" style="width: 200px" clearable />
14 22
           </el-form-item>
15 23
         </el-col>
16 24
         <el-col :span="6">
@@ -20,6 +28,7 @@
20 28
               v-model:file-list="formData.filePartList"
21 29
               class="upload-demo"
22 30
               style="width: 100%"
31
+              v-if="props.type != 'look'"
23 32
               :action="fileUrl"
24 33
               :data="paramsData"
25 34
               :headers="myHeader"
@@ -33,13 +42,14 @@
33 42
               :limit="1"
34 43
               :on-exceed="handleExceed"
35 44
             >
36
-              <el-button v-if="props.type != 'look'" size="small" type="primary">选择文件</el-button>
45
+              <el-button size="small" type="primary">选择文件</el-button>
37 46
             </el-upload>
47
+            <span v-else>{{ formData.fileName }}</span>
38 48
           </el-form-item>
39 49
         </el-col>
40 50
         <el-col :span="6">
41 51
           <el-form-item label="备注">
42
-            <el-input v-model="formData.remarks" style="width: 100%" clearable />
52
+            <el-input v-model="formData.remarks" :disabled="props.type == 'look'" style="width: 100%" clearable />
43 53
           </el-form-item>
44 54
         </el-col>
45 55
       </el-row>
@@ -273,7 +283,7 @@ import router from "@/router";
273 283
 import {
274 284
   addInOrderData,
275 285
   updateOutData,
276
-  lookOutData,
286
+  lookOutDataNew,
277 287
   dictTree,
278 288
   getDeptTypeList
279 289
 } from "@/api/inAndOut/formationFilling/out";
@@ -372,12 +382,6 @@ const rules = reactive({
372 382
   ]
373 383
 });
374 384
 
375
-// 根据码回显中文
376
-const showCh = (value, option) => {
377
-  const filterItem = option.filter((item) => item.deptId == value);
378
-  return filterItem.length ? filterItem[0].abbreviationName : "";
379
-};
380
-
381 385
 // 下拉数据
382 386
 const getSelect = () => {
383 387
   dictTree().then((res: any) => {
@@ -427,14 +431,21 @@ const deleteTableData = (rowIndex) => {
427 431
 };
428 432
 // 详情获取数据
429 433
 const lookData = () => {
430
-  lookOutData(props.id).then((res: any) => {
434
+  lookOutDataNew(props.id).then((res: any) => {
431 435
     if (res.code === 0) {
432
-      let getData = res.data.outboundMaterial;
436
+      let getData = res.data.orderOutboundMaterialInfos;
433 437
       formData.tableData = getData.map((item: any) => ({
434 438
         ...item,
435 439
         filePartList: [{ name: item.fileName, filePart: item.filePart }]
436 440
       }));
437
-      formData.deptId = res.data.deptId;
441
+      formData.orderNo = res.data.orderNo;
442
+      formData.filePartList = res.data.filePartList;
443
+      formData.orderName = res.data.orderName;
444
+      formData.filePart = res.data.filePart;
445
+      formData.fileName = res.data.fileName;
446
+      formData.filePart = res.data.filePart;
447
+      formData.remarks = res.data.remarks;
448
+      formData.filePartList = [{ name: res.data.fileName, url: res.data.filePart }];
438 449
       console.log(formData.tableData);
439 450
     }
440 451
   });
@@ -443,37 +454,32 @@ const lookData = () => {
443 454
 const saveSubmit = (status: any) => {
444 455
   ruleForms.value.validate((valid: any) => {
445 456
     if (valid) {
446
-      let postData = { ...formData, status, orderOutboundMaterialInfos: [] };
457
+      let postData = { ...formData, status, orderOutboundMaterialInfos: [], orderId: null };
447 458
       formData.tableData.map((item: any) => {
448 459
         let totalPrice = decimalMul(item.quantity, item.unitPrice) || 0;
449 460
         if (wanJson.indexOf(item.materialTree[3]) == -1) {
450 461
           totalPrice = decimalDev(decimalMul(item.quantity, item.unitPrice), 10000) || 0;
451 462
         }
452 463
         item.totalPrice = totalPrice;
464
+        item.materialGroup = item.materialTree[0];
465
+        item.materialType = item.materialTree[1];
466
+        item.materialName = item.materialTree[2];
467
+        item.unit = item.materialTree[3];
453 468
       });
454 469
       postData.orderOutboundMaterialInfos = formData.tableData;
455 470
       delete postData.tableData;
456 471
       if (props.id) {
457
-        updateOutData(postData).then((res: any) => {
458
-          if (res.code === 0) {
459
-            returnPage();
460
-            ElMessage({
461
-              message: "修改成功!",
462
-              type: "success"
463
-            });
464
-          }
465
-        });
466
-      } else {
467
-        addInOrderData(postData).then((res: any) => {
468
-          if (res.code === 0) {
469
-            returnPage();
470
-            ElMessage({
471
-              message: "新增成功!",
472
-              type: "success"
473
-            });
474
-          }
475
-        });
472
+        postData.orderId = props.id;
476 473
       }
474
+      addInOrderData(postData).then((res: any) => {
475
+        if (res.code === 0) {
476
+          returnPage();
477
+          ElMessage({
478
+            message: status === "8" ? "保存成功!" : "提交成功!",
479
+            type: "success"
480
+          });
481
+        }
482
+      });
477 483
     } else {
478 484
       console.log("error submit!");
479 485
     }

+ 41 - 35
src/views/InformationFilling/outIssue/index.vue

@@ -18,13 +18,13 @@
18 18
         </el-select>
19 19
       </el-form-item>
20 20
       <el-form-item label="物资名称">
21
-        <el-input v-model="searchList.materialNameVo" style="width: 200px" clearable />
21
+        <el-input v-model="searchList.materialName" style="width: 200px" clearable />
22 22
       </el-form-item>
23 23
       <el-form-item label="调令名称">
24
-        <el-input v-model="searchList.materialNameVo" style="width: 200px" clearable />
24
+        <el-input v-model="searchList.orderName" style="width: 200px" clearable />
25 25
       </el-form-item>
26 26
       <el-form-item label="调用省份">
27
-        <el-select v-model="searchList.provinceSiteIdList" multiple filterable style="width: 250px" clearable>
27
+        <el-select v-model="searchList.province" multiple filterable style="width: 250px" clearable>
28 28
           <el-option v-for="item in province_ch" :key="item.id" :label="item.label" :value="item.value" />
29 29
         </el-select>
30 30
       </el-form-item>
@@ -44,9 +44,9 @@
44 44
         >
45 45
           <el-button :icon="Upload" type="primary">导入</el-button>
46 46
         </el-upload> -->
47
-        <el-button type="primary" :icon="Download" @click="exportTemplate" v-if="hasBtn('ck:xf:export')"
47
+        <!-- <el-button type="primary" :icon="Download" @click="exportTemplate" v-if="hasBtn('ck:xf:export')"
48 48
           >导出</el-button
49
-        >
49
+        > -->
50 50
       </el-form-item>
51 51
     </el-form>
52 52
     <el-table :data="tableData" style="width: 100%" stripe border>
@@ -55,24 +55,16 @@
55 55
           {{ (page.currentPage - 1) * page.pageSize + scope.$index + 1 }}
56 56
         </template>
57 57
       </el-table-column>
58
-      <el-table-column prop="warehouse" label="调令名称" align="center" />
58
+      <el-table-column prop="orderName" label="调令名称" align="center" />
59 59
       <el-table-column prop="warehouse" label="调出仓库" align="center" />
60 60
       <el-table-column prop="outboundType" label="出库类型" align="center">
61 61
         <template #default="scope">
62 62
           {{ scope.row.outboundType ? showCh(scope.row.outboundType, outdound_type) : scope.row.outboundType }}
63 63
         </template>
64 64
       </el-table-column>
65
-      <!-- <el-table-column prop="materialGroup" label="物资大类" align="center" /> -->
66
-      <!-- <el-table-column prop="materialType" label="物资类别" align="center" /> -->
67 65
       <el-table-column prop="materialName" label="物资名称" align="center" />
68 66
       <el-table-column prop="quantity" label="数量" align="center" width="80" />
69
-      <el-table-column prop="totalPrice" label="价值(万元)" align="center" width="110" />
70
-      <el-table-column prop="calledProvince" label="调用省份" align="center">
71
-        <template #default="scope">
72
-          {{ scope.row.calledProvince ? showCh(scope.row.calledProvince, province_ch) : scope.row.calledProvince }}
73
-        </template>
74
-      </el-table-column>
75
-      <el-table-column prop="outboundTime" label="出库日期" align="center" width="115" />
67
+      <el-table-column prop="province" label="调用省份" align="center"></el-table-column>
76 68
       <el-table-column prop="submitTime" label="填写时间" align="center" width="115" />
77 69
       <el-table-column fixed="right" label="操作" width="150" align="center">
78 70
         <template #default="{ row }">
@@ -97,9 +89,9 @@
97 89
 <script setup lang="ts">
98 90
 import { Plus, Search, RefreshRight, Upload, Download } from "@element-plus/icons-vue";
99 91
 import { ref, reactive, onMounted } from "vue";
100
-import { getOutPage, deleteOutData, getDeptTypeList, exportcjxxxf } from "@/api/inAndOut/formationFilling/out";
92
+import { deleteOutDataNew, getDeptTypeList, exportcjxxxf, getOutPageNew } from "@/api/inAndOut/formationFilling/out";
101 93
 import router from "@/router";
102
-import { ElMessage, UploadProps } from "element-plus";
94
+import { ElMessage, UploadProps, ElMessageBox } from "element-plus";
103 95
 import { useDict } from "@/hooks/dict";
104 96
 import store from "@/store";
105 97
 import { errorUpload, beforeUploadFun, fileNameDispose } from "@/global/importFile";
@@ -113,9 +105,11 @@ const { outdound_type, province_ch } = useDict("outdound_type", "province_ch");
113 105
 const dcckOptions = ref([]);
114 106
 const searchList = ref({
115 107
   outboundType: "",
116
-  materialNameVo: "",
108
+  materialName: "",
117 109
   deptId: "", //调出仓库id
118
-  provinceSiteIdList: []
110
+  provinceSiteIdList: [],
111
+  orderName: "",
112
+  province: ""
119 113
 });
120 114
 const tableData: any = ref([]);
121 115
 const page = reactive({
@@ -136,15 +130,17 @@ const showCh = (value, option) => {
136 130
 const clearSearch = () => {
137 131
   searchList.value = {
138 132
     outboundType: "",
139
-    materialNameVo: "",
133
+    materialName: "",
140 134
     deptId: "", //调出仓库id
141
-    provinceSiteIdList: []
135
+    provinceSiteIdList: [],
136
+    orderName: "",
137
+    province: ""
142 138
   };
143 139
   getList();
144 140
 };
145 141
 /** 添加/修改/查看进入详情操作 */
146
-const openDetail = (row: any, type) => {
147
-  setQuery("/InformationFilling/outIssueDetail", { id: row.outboundId, type: type });
142
+const openDetail = (row: any, type: string) => {
143
+  setQuery("/InformationFilling/outIssueDetail", { id: row.orderId, type: type });
148 144
   // router.push({
149 145
   //   path: "/InformationFilling/outIssueDetail",
150 146
   //   query: {id: row.outboundId, type: type}
@@ -156,18 +152,17 @@ const getList = () => {
156 152
   store.commit("SET_SEARCH_QUERY", {
157 153
     outIssue: {
158 154
       outboundType: searchList.value.outboundType,
159
-      materialNameVo: searchList.value.materialNameVo,
155
+      materialName: searchList.value.materialName,
160 156
       deptId: searchList.value.deptId
161 157
     }
162 158
   });
163 159
   const data = reactive({
164 160
     // status: 7,
165
-    lower: 1,
166 161
     size: page.pageSize,
167 162
     current: page.currentPage,
168 163
     ...searchList.value
169 164
   });
170
-  getOutPage(data).then((res: any) => {
165
+  getOutPageNew(data).then((res: any) => {
171 166
     if (res.code === 0) {
172 167
       tableData.value = res.data.records;
173 168
       page.total = res.data.total;
@@ -175,15 +170,26 @@ const getList = () => {
175 170
   });
176 171
 };
177 172
 /** 删除操作 */
178
-const deleteClick = (row) => {
179
-  deleteOutData(row.outboundId).then((res: any) => {
180
-    if (res.code === 0) {
181
-      getList();
182
-      ElMessage({
183
-        message: "删除成功!",
184
-        type: "success"
185
-      });
186
-    }
173
+const deleteClick = (row: any) => {
174
+  ElMessageBox.confirm(`是否删除此条数据?`, "提示", {
175
+    confirmButtonText: "确定",
176
+    cancelButtonText: "取消",
177
+    type: "warning"
178
+  }).then(() => {
179
+    deleteOutDataNew(row.orderId).then((res: any) => {
180
+      if (res.code === 0) {
181
+        getList();
182
+        ElMessage({
183
+          message: "删除成功!",
184
+          type: "success"
185
+        });
186
+      } else {
187
+        ElMessage({
188
+          message: "删除失败!",
189
+          type: "error"
190
+        });
191
+      }
192
+    });
187 193
   });
188 194
 };
189 195
 //导入模板