瀏覽代碼

附件下载

buzhi 2 年之前
父節點
當前提交
362a782fb0

+ 41 - 66
src/views/InformationAudit/enterWarehouseAudit/detail.vue

@@ -5,7 +5,7 @@
5 5
       <el-table :data="tableData" style="width: 100%" stripe border>
6 6
         <el-table-column prop="inboundType" label="入库类型" header-align="center" align="center">
7 7
           <template #default="scope">
8
-            {{ cklxObject[scope.row.inboundType] }}
8
+            {{ scope.row.inboundType ? showCh(scope.row.inboundType, indound_type) : scope.row.inboundType }}
9 9
           </template>
10 10
         </el-table-column>
11 11
         <el-table-column prop="materialGroup" label="物资大类" header-align="center" align="center" />
@@ -18,12 +18,14 @@
18 18
         <el-table-column prop="totalPrice" label="价值(万元)" header-align="center" align="center" />
19 19
         <el-table-column prop="isAvailable" label="是否可用" header-align="center" align="center">
20 20
           <template #default="scope">
21
-            {{ sfkyObject[scope.row.isAvailable] }}
21
+            {{ scope.row.isAvailable ? showCh(scope.row.isAvailable, is_available) : scope.row.isAvailable }}
22 22
           </template>
23 23
         </el-table-column>
24 24
         <el-table-column label="附件上传" header-align="center" align="center" width="160">
25 25
           <template #default="scope">
26
-            <span class="fileName" @click="fileDown(scope.row.filePart)">{{ scope.row.fileName }}</span>
26
+            <span class="fileName" @click="fileDownload(scope.row.filePart, scope.row.fileName)">{{
27
+              scope.row.fileName
28
+            }}</span>
27 29
           </template>
28 30
         </el-table-column>
29 31
         <el-table-column prop="remarks" label="备注" header-align="center" align="center" />
@@ -36,7 +38,9 @@
36 38
           <el-table-column prop="opinion" label="审核意见" header-align="center" align="center" />
37 39
           <el-table-column label="附件" header-align="center" align="center">
38 40
             <template #default="scope">
39
-              <span class="fileName" @click="fileDown(scope.row.filePart)">{{ scope.row.fileName }}</span>
41
+              <span class="fileName" @click="fileDownload(scope.row.filePart, scope.row.fileName)">{{
42
+                scope.row.fileName
43
+              }}</span>
40 44
             </template>
41 45
           </el-table-column>
42 46
           <el-table-column prop="auditingTime" label="审核时间" header-align="center" align="center" />
@@ -97,16 +101,13 @@ import { ElMessage, ElMessageBox } from "element-plus";
97 101
 import { useRouter, useRoute } from "vue-router";
98 102
 import { useDict } from "@/hooks/dict";
99 103
 
100
-const { indound_type, is_available, auditing_status } = useDict("indound_type", "is_available", "auditing_status");
104
+const { indound_type, is_available } = useDict("indound_type", "is_available");
101 105
 const router = useRouter();
102 106
 const route = useRoute();
103 107
 const data = reactive({
104 108
   tableData: [],
105 109
   auditData: [],
106 110
   isShow: false,
107
-  cklxObject: {}, //入库类型
108
-  sfkyObject: {}, //是否可用
109
-  dysfObject: {}, //调用省份
110 111
   fileUrl: "/admin/sysFile/uploadVoucher",
111 112
   myHeader: { Authorization: "Bearer " + sessionStorage.getItem("access_token") }
112 113
 });
@@ -125,7 +126,7 @@ let paramsData = reactive({
125 126
   bucket: "bound"
126 127
 });
127 128
 
128
-let { tableData, auditData, isShow, cklxObject, sfkyObject, dysfObject, fileUrl, myHeader } = toRefs(data);
129
+let { tableData, auditData, isShow, fileUrl, myHeader } = toRefs(data);
129 130
 
130 131
 // 获取列表
131 132
 const getList = () => {
@@ -141,53 +142,10 @@ const getList = () => {
141 142
     }
142 143
   });
143 144
 };
144
-// 字典-入库类型
145
-const getOutboundTypeList = () => {
146
-  const data = reactive({
147
-    size: 100,
148
-    current: 1,
149
-    dictId: "1764183440564498433"
150
-  });
151
-  getDictItemList(data).then((res: any) => {
152
-    if (res.code === 0) {
153
-      cklxObject.value = res.data.records.reduce((acc: any, item: any) => {
154
-        acc[item.value] = item.label;
155
-        return acc;
156
-      }, {});
157
-    }
158
-  });
159
-};
160
-// 字典-是否可用
161
-const getIsAvailableList = () => {
162
-  const data = reactive({
163
-    size: 10,
164
-    current: 1,
165
-    dictId: "1764184353161162753"
166
-  });
167
-  getDictItemList(data).then((res: any) => {
168
-    if (res.code === 0) {
169
-      sfkyObject.value = res.data.records.reduce((acc: any, item: any) => {
170
-        acc[item.value] = item.label;
171
-        return acc;
172
-      }, {});
173
-    }
174
-  });
175
-};
176
-// 字典-调用省份
177
-const getProvinceList = () => {
178
-  const data = reactive({
179
-    size: 100,
180
-    current: 1,
181
-    dictId: "1763408141744652289"
182
-  });
183
-  getDictItemList(data).then((res: any) => {
184
-    if (res.code === 0) {
185
-      dysfObject.value = res.data.records.reduce((acc: any, item: any) => {
186
-        acc[item.value] = item.label;
187
-        return acc;
188
-      }, {});
189
-    }
190
-  });
145
+// 根据码回显中文
146
+const showCh = (value: any, option: any) => {
147
+  const filterItem = option.filter((item: any) => item.value == value);
148
+  return filterItem.length ? filterItem[0].label : "-";
191 149
 };
192 150
 // 通过
193 151
 const handleAgree = () => {
@@ -271,18 +229,35 @@ const beforeRemove = (uploadFile: any, uploadFiles: any) => {
271 229
   );
272 230
 };
273 231
 
274
-// 根据码回显中文
275
-const showCh = (value: any, option: any) => {
276
-  const filterItem = option.filter((item: any) => item.value == value);
277
-  return filterItem.length ? filterItem[0].label : "-";
278
-};
279
-const fileDown = (filePart: any) => {
280
-  console.log(filePart, "filePart---");
281
-  window.location.href = `/admin/sysFile/${filePart ? filePart : ""}`;
232
+const fileDownload = (filePart: any, fileName: string) => {
233
+  function createObjectURL(object: any) {
234
+    return window.URL ? window.URL.createObjectURL(object) : window.webkitURL.createObjectURL(object);
235
+  }
236
+  var xhr = new XMLHttpRequest();
237
+  var formData = new FormData();
238
+  xhr.open("get", "/admin/sysFile/" + filePart);
239
+  xhr.setRequestHeader("Authorization", "Bearer " + sessionStorage.getItem("access_token"));
240
+  xhr.responseType = "blob";
241
+  xhr.onload = function (e) {
242
+    if (this.status == 200) {
243
+      var blob = this.response;
244
+      console.log(this.response);
245
+      if (window.navigator.msSaveOrOpenBlob) {
246
+        navigator.msSaveBlob(blob, fileName);
247
+      } else {
248
+        var a = document.createElement("a");
249
+        var url = createObjectURL(blob);
250
+        a.href = url;
251
+        a.download = fileName;
252
+        document.body.appendChild(a);
253
+        a.click();
254
+        window.URL.revokeObjectURL(url);
255
+      }
256
+    }
257
+  };
258
+  xhr.send(formData);
282 259
 };
283 260
 
284
-getOutboundTypeList();
285
-getIsAvailableList();
286 261
 onMounted(() => {
287 262
   getList();
288 263
 });

+ 28 - 53
src/views/InformationAudit/enterWarehouseAudit/index.vue

@@ -11,7 +11,7 @@
11 11
         <el-col :span="6">
12 12
           <el-form-item label="入库类型">
13 13
             <el-select v-model="formData.inboundType" class="m-2" placeholder="请选择" clearable style="width: 280px">
14
-              <el-option v-for="item in cklxOptions" :key="item.value" :label="item.label" :value="item.value" />
14
+              <el-option v-for="item in indound_type" :key="item.value" :label="item.label" :value="item.value" />
15 15
             </el-select>
16 16
           </el-form-item>
17 17
         </el-col>
@@ -22,13 +22,19 @@
22 22
         </el-col>
23 23
         <el-col :span="6">
24 24
           <el-button type="primary" :icon="Search" @click="handleSearch">查询</el-button>
25
+          <el-button type="primary" :icon="RefreshRight" @click="handleReSearch">查询</el-button>
25 26
         </el-col>
26 27
       </el-row>
27 28
       <el-row :gutter="20">
28 29
         <el-col :span="6">
29 30
           <el-form-item label="审批节点">
30 31
             <el-select v-model="formData.status" class="m-2" placeholder="请选择" clearable style="width: 280px">
31
-              <el-option v-for="(item, index) in dqspjdOptions" :key="index" :label="item.label" :value="item.value" />
32
+              <el-option
33
+                v-for="(item, index) in auditing_status"
34
+                :key="index"
35
+                :label="item.label"
36
+                :value="item.value"
37
+              />
32 38
             </el-select>
33 39
           </el-form-item>
34 40
         </el-col>
@@ -39,7 +45,7 @@
39 45
       <el-table-column prop="warehouse" label="库点简称" header-align="center" align="center" />
40 46
       <el-table-column prop="inboundType" label="出库类型" header-align="center" align="center">
41 47
         <template #default="scope">
42
-          {{ cklxObject[scope.row.inboundType] }}
48
+          {{ scope.row.inboundType ? showCh(scope.row.inboundType, indound_type) : scope.row.inboundType }}
43 49
         </template>
44 50
       </el-table-column>
45 51
       <el-table-column prop="materialGroup" label="物资大类" header-align="center" align="center" />
@@ -49,7 +55,12 @@
49 55
       <el-table-column prop="inboundTime" label="入库日期" header-align="center" align="center" />
50 56
       <el-table-column prop="status" label="当前审批节点" header-align="center" align="center">
51 57
         <template #default="scope">
52
-          {{ spjdObject[scope.row.status] }}
58
+          {{ scope.row.status ? showCh(scope.row.status, auditing_status) : scope.row.status }}
59
+        </template>
60
+      </el-table-column>
61
+      <el-table-column prop="submitTime" label="提交时间" header-align="center" align="center">
62
+        <template #default="scope">
63
+          {{ scope.row.submitTime }}
53 64
         </template>
54 65
       </el-table-column>
55 66
       <el-table-column label="操作" header-align="center" align="center" width="160">
@@ -86,18 +97,15 @@
86 97
 import { reactive, toRefs, onMounted } from "vue";
87 98
 import { getInAuditList } from "@/api/inAndOut/inAudit/index";
88 99
 import { getDictItemList } from "@/api/admin/index";
89
-import { Search } from "@element-plus/icons-vue";
100
+import { Search, RefreshRight } from "@element-plus/icons-vue";
90 101
 import { useRouter } from "vue-router";
102
+import { useDict } from "@/hooks/dict";
103
+
104
+const { indound_type, auditing_status } = useDict("indound_type", "auditing_status");
91 105
 
92 106
 const router = useRouter();
93 107
 const data = reactive({
94 108
   tableData: [],
95
-  cklxOptions: [],
96
-  cklxObject: {}, //入库类型
97
-  // dysfObject: {}, //调用省份
98
-  spjdObject: {}, //审批节点
99
-  dqspjdOptions: [],
100
-  spjdOptions: [],
101 109
   deptId: ""
102 110
 });
103 111
 let page = reactive({
@@ -112,7 +120,7 @@ let formData = reactive({
112 120
   status: ""
113 121
 });
114 122
 
115
-let { tableData, cklxOptions, cklxObject, spjdObject, dqspjdOptions, spjdOptions, deptId } = toRefs(data);
123
+let { tableData, deptId } = toRefs(data);
116 124
 
117 125
 // 获取列表
118 126
 const getList = () => {
@@ -128,39 +136,10 @@ const getList = () => {
128 136
     }
129 137
   });
130 138
 };
131
-// 字典-入库类型
132
-const getOutboundTypeList = () => {
133
-  const data = reactive({
134
-    size: 100,
135
-    current: 1,
136
-    dictId: "1764183440564498433"
137
-  });
138
-  getDictItemList(data).then((res: any) => {
139
-    if (res.code === 0) {
140
-      cklxOptions.value = res.data.records;
141
-      cklxObject.value = res.data.records.reduce((acc: any, item: any) => {
142
-        acc[item.value] = item.label;
143
-        return acc;
144
-      }, {});
145
-    }
146
-  });
147
-};
148
-// 字典-审批节点
149
-const getStatusList = () => {
150
-  const data = reactive({
151
-    size: 100,
152
-    current: 1,
153
-    dictId: "423059273"
154
-  });
155
-  getDictItemList(data).then((res: any) => {
156
-    if (res.code === 0) {
157
-      dqspjdOptions.value = res.data.records;
158
-      spjdObject.value = res.data.records.reduce((acc: any, item: any) => {
159
-        acc[item.value] = item.label;
160
-        return acc;
161
-      }, {});
162
-    }
163
-  });
139
+// 根据码回显中文
140
+const showCh = (value: any, option: any) => {
141
+  const filterItem = option.filter((item: any) => item.value == value);
142
+  return filterItem.length ? filterItem[0].label : "-";
164 143
 };
165 144
 // 查询
166 145
 const handleSearch = () => {
@@ -173,12 +152,10 @@ const handleReSearch = () => {
173 152
     pageSize: 10,
174 153
     total: 0
175 154
   };
176
-  formData = {
177
-    warehouse: "",
178
-    inboundType: "",
179
-    materialNameVo: "",
180
-    status: ""
181
-  };
155
+  formData.warehouse = "";
156
+  formData.inboundType = "";
157
+  formData.materialNameVo = "";
158
+  formData.status = "";
182 159
   getList();
183 160
 };
184 161
 // 审核
@@ -202,8 +179,6 @@ const handleShow = (row: any) => {
202 179
   });
203 180
 };
204 181
 
205
-getOutboundTypeList();
206
-getStatusList();
207 182
 onMounted(() => {
208 183
   getList();
209 184
   let deptObj: any = sessionStorage.getItem("userInfo");

+ 45 - 63
src/views/InformationAudit/outWarehouseAudit/detail.vue

@@ -5,7 +5,7 @@
5 5
       <el-table :data="tableData" style="width: 100%" stripe border>
6 6
         <el-table-column prop="outboundType" label="出库类型" header-align="center" align="center">
7 7
           <template #default="scope">
8
-            {{ cklxObject[scope.row.outboundType] }}
8
+            {{ scope.row.outboundType ? showCh(scope.row.outboundType, outdound_type) : scope.row.outboundType }}
9 9
           </template>
10 10
         </el-table-column>
11 11
         <el-table-column prop="materialGroup" label="物资大类" header-align="center" align="center" />
@@ -15,7 +15,7 @@
15 15
         <el-table-column prop="quantity" label="数量" header-align="center" align="center" />
16 16
         <el-table-column prop="province" label="调用省份" header-align="center" align="center">
17 17
           <template #default="scope">
18
-            {{ dysfObject[scope.row.province] }}
18
+            {{ scope.row.province ? showCh(scope.row.province, province_ch) : scope.row.province }}
19 19
           </template>
20 20
         </el-table-column>
21 21
         <el-table-column prop="outboundTime" label="出库日期" header-align="center" align="center" />
@@ -23,12 +23,14 @@
23 23
         <el-table-column prop="totalPrice" label="价值(万元)" header-align="center" align="center" />
24 24
         <el-table-column prop="isAvailable" label="是否可用" header-align="center" align="center">
25 25
           <template #default="scope">
26
-            {{ sfkyObject[scope.row.isAvailable] }}
26
+            {{ scope.row.isAvailable ? showCh(scope.row.isAvailable, is_available) : scope.row.isAvailable }}
27 27
           </template>
28 28
         </el-table-column>
29 29
         <el-table-column label="附件上传" header-align="center" align="center" width="160">
30 30
           <template #default="scope">
31
-            <span class="fileName" @click="fileDown(scope.row.filePart)">{{ scope.row.fileName }}</span>
31
+            <span class="fileName" @click="fileDownload(scope.row.filePart, scope.row.fileName)">{{
32
+              scope.row.fileName
33
+            }}</span>
32 34
           </template>
33 35
         </el-table-column>
34 36
         <el-table-column prop="remarks" label="备注" header-align="center" align="center" />
@@ -41,7 +43,9 @@
41 43
           <el-table-column prop="opinion" label="审核意见" header-align="center" align="center" />
42 44
           <el-table-column label="附件" header-align="center" align="center">
43 45
             <template #default="scope">
44
-              <span class="fileName" @click="fileDown(scope.row.filePart)">{{ scope.row.fileName }}</span>
46
+              <span class="fileName" @click="fileDownload(scope.row.filePart, scope.row.fileName)">{{
47
+                scope.row.fileName
48
+              }}</span>
45 49
             </template>
46 50
           </el-table-column>
47 51
           <el-table-column prop="auditingTime" label="审核时间" header-align="center" align="center" />
@@ -100,6 +104,9 @@ import { getDictItemList } from "@/api/admin/index";
100 104
 import { Search } from "@element-plus/icons-vue";
101 105
 import { ElMessage, ElMessageBox } from "element-plus";
102 106
 import { useRouter, useRoute } from "vue-router";
107
+import { useDict } from "@/hooks/dict";
108
+
109
+const { outdound_type, is_available, province_ch } = useDict("outdound_type", "is_available", "province_ch");
103 110
 
104 111
 const router = useRouter();
105 112
 const route = useRoute();
@@ -107,9 +114,6 @@ const data = reactive({
107 114
   tableData: [],
108 115
   auditData: [],
109 116
   isShow: false,
110
-  cklxObject: {}, //出库类型
111
-  sfkyObject: {}, //是否可用
112
-  dysfObject: {}, //调用省份
113 117
   fileUrl: "/admin/sysFile/uploadVoucher",
114 118
   myHeader: { Authorization: "Bearer " + sessionStorage.getItem("access_token") }
115 119
 });
@@ -128,7 +132,7 @@ let paramsData = reactive({
128 132
   bucket: "bound"
129 133
 });
130 134
 
131
-let { tableData, auditData, isShow, cklxObject, sfkyObject, dysfObject, fileUrl, myHeader } = toRefs(data);
135
+let { tableData, auditData, isShow, fileUrl, myHeader } = toRefs(data);
132 136
 
133 137
 // 获取列表
134 138
 const getList = () => {
@@ -144,53 +148,10 @@ const getList = () => {
144 148
     }
145 149
   });
146 150
 };
147
-// 字典-出库类型
148
-const getOutboundTypeList = () => {
149
-  const data = reactive({
150
-    size: 100,
151
-    current: 1,
152
-    dictId: "214124"
153
-  });
154
-  getDictItemList(data).then((res: any) => {
155
-    if (res.code === 0) {
156
-      cklxObject.value = res.data.records.reduce((acc: any, item: any) => {
157
-        acc[item.value] = item.label;
158
-        return acc;
159
-      }, {});
160
-    }
161
-  });
162
-};
163
-// 字典-是否可用
164
-const getIsAvailableList = () => {
165
-  const data = reactive({
166
-    size: 10,
167
-    current: 1,
168
-    dictId: "1764184353161162753"
169
-  });
170
-  getDictItemList(data).then((res: any) => {
171
-    if (res.code === 0) {
172
-      sfkyObject.value = res.data.records.reduce((acc: any, item: any) => {
173
-        acc[item.value] = item.label;
174
-        return acc;
175
-      }, {});
176
-    }
177
-  });
178
-};
179
-// 字典-调用省份
180
-const getProvinceList = () => {
181
-  const data = reactive({
182
-    size: 100,
183
-    current: 1,
184
-    dictId: "1763408141744652289"
185
-  });
186
-  getDictItemList(data).then((res: any) => {
187
-    if (res.code === 0) {
188
-      dysfObject.value = res.data.records.reduce((acc: any, item: any) => {
189
-        acc[item.value] = item.label;
190
-        return acc;
191
-      }, {});
192
-    }
193
-  });
151
+// 根据码回显中文
152
+const showCh = (value: any, option: any) => {
153
+  const filterItem = option.filter((item: any) => item.value == value);
154
+  return filterItem.length ? filterItem[0].label : "-";
194 155
 };
195 156
 // 通过
196 157
 const handleAgree = () => {
@@ -271,14 +232,35 @@ const beforeRemove = (uploadFile: any, uploadFiles: any) => {
271 232
     () => false
272 233
   );
273 234
 };
274
-const fileDown = (filePart: any) => {
275
-  console.log(filePart, "filePart---");
276
-  window.location.href = `/admin/sysFile/${filePart ? filePart : ""}`;
235
+const fileDownload = (filePart: any, fileName: string) => {
236
+  function createObjectURL(object: any) {
237
+    return window.URL ? window.URL.createObjectURL(object) : window.webkitURL.createObjectURL(object);
238
+  }
239
+  var xhr = new XMLHttpRequest();
240
+  var formData = new FormData();
241
+  xhr.open("get", "/admin/sysFile/" + filePart);
242
+  xhr.setRequestHeader("Authorization", "Bearer " + sessionStorage.getItem("access_token"));
243
+  xhr.responseType = "blob";
244
+  xhr.onload = function (e) {
245
+    if (this.status == 200) {
246
+      var blob = this.response;
247
+      console.log(this.response);
248
+      if (window.navigator.msSaveOrOpenBlob) {
249
+        navigator.msSaveBlob(blob, fileName);
250
+      } else {
251
+        var a = document.createElement("a");
252
+        var url = createObjectURL(blob);
253
+        a.href = url;
254
+        a.download = fileName;
255
+        document.body.appendChild(a);
256
+        a.click();
257
+        window.URL.revokeObjectURL(url);
258
+      }
259
+    }
260
+  };
261
+  xhr.send(formData);
277 262
 };
278 263
 
279
-getOutboundTypeList();
280
-getIsAvailableList();
281
-getProvinceList();
282 264
 onMounted(() => {
283 265
   getList();
284 266
 });
@@ -299,7 +281,7 @@ onMounted(() => {
299 281
 .el-form-item {
300 282
   align-items: center;
301 283
 }
302
-.fileName{
284
+.fileName {
303 285
   color: #4281e6;
304 286
   text-decoration: underline;
305 287
   cursor: pointer;

+ 34 - 81
src/views/InformationAudit/outWarehouseAudit/index.vue

@@ -6,7 +6,7 @@
6 6
         <el-col :span="6">
7 7
           <el-form-item label="出库类型">
8 8
             <el-select v-model="formData.outboundType" class="m-2" placeholder="请选择" clearable style="width: 280px">
9
-              <el-option v-for="item in cklxOptions" :key="item.value" :label="item.label" :value="item.value" />
9
+              <el-option v-for="item in outdound_type" :key="item.value" :label="item.label" :value="item.value" />
10 10
             </el-select>
11 11
           </el-form-item>
12 12
         </el-col>
@@ -18,30 +18,27 @@
18 18
         <el-col :span="6">
19 19
           <el-form-item label="当前审批节点">
20 20
             <el-select v-model="formData.status" class="m-2" placeholder="请选择" clearable style="width: 280px">
21
-              <el-option v-for="(item, index) in dqspjdOptions" :key="index" :label="item.label" :value="item.value" />
21
+              <el-option
22
+                v-for="(item, index) in auditing_status"
23
+                :key="index"
24
+                :label="item.label"
25
+                :value="item.value"
26
+              />
22 27
             </el-select>
23 28
           </el-form-item>
24 29
         </el-col>
25 30
         <el-col :span="6">
26 31
           <el-button type="primary" :icon="Search" @click="handleSearch">查询</el-button>
32
+          <el-button type="primary" :icon="RefreshRight" @click="handleReSearch">重置</el-button>
27 33
         </el-col>
28 34
       </el-row>
29
-      <!-- <el-row :gutter="20">
30
-        <el-col :span="6">
31
-          <el-form-item label="审批节点">
32
-            <el-select v-model="formData.spjd" class="m-2" placeholder="请选择" clearable style="width: 280px">
33
-              <el-option v-for="item in spjdOptions" :key="item.value" :label="item.label" :value="item.value" />
34
-            </el-select>
35
-          </el-form-item>
36
-        </el-col>
37
-      </el-row> -->
38 35
     </el-form>
39 36
     <el-table :data="tableData" style="width: 100%" stripe border>
40 37
       <el-table-column type="index" label="序号" header-align="center" align="center" width="60" />
41 38
       <el-table-column prop="warehouse" label="库点简称" header-align="center" align="center" />
42 39
       <el-table-column prop="outboundType" label="出库类型" header-align="center" align="center">
43 40
         <template #default="scope">
44
-          {{ cklxObject[scope.row.outboundType] }}
41
+          {{ scope.row.outboundType ? showCh(scope.row.outboundType, outdound_type) : scope.row.outboundType }}
45 42
         </template>
46 43
       </el-table-column>
47 44
       <el-table-column prop="materialGroup" label="物资大类" header-align="center" align="center" />
@@ -50,13 +47,18 @@
50 47
       <el-table-column prop="quantity" label="数量" header-align="center" align="center" />
51 48
       <el-table-column prop="calledProvince" label="调用省份" header-align="center" align="center">
52 49
         <template #default="scope">
53
-          {{ dysfObject[scope.row.calledProvince] }}
50
+          {{ scope.row.calledProvince ? showCh(scope.row.calledProvince, province_ch) : scope.row.calledProvince }}
54 51
         </template>
55 52
       </el-table-column>
56 53
       <el-table-column prop="outboundTime" label="出库日期" header-align="center" align="center" />
57 54
       <el-table-column prop="status" label="当前审批节点" header-align="center" align="center">
58 55
         <template #default="scope">
59
-          {{ spjdObject[scope.row.status] }}
56
+          {{ scope.row.status ? showCh(scope.row.status, auditing_status) : scope.row.status }}
57
+        </template>
58
+      </el-table-column>
59
+      <el-table-column prop="submitTime" label="提交时间" header-align="center" align="center">
60
+        <template #default="scope">
61
+          {{ scope.row.submitTime }}
60 62
         </template>
61 63
       </el-table-column>
62 64
       <el-table-column label="操作" header-align="center" width="160">
@@ -93,18 +95,20 @@
93 95
 import { reactive, toRefs, onMounted } from "vue";
94 96
 import { getInAuditList } from "@/api/inAndOut/outAudit/index";
95 97
 import { getDictItemList } from "@/api/admin/index";
96
-import { Search } from "@element-plus/icons-vue";
98
+import { Search, RefreshRight } from "@element-plus/icons-vue";
97 99
 import { useRouter } from "vue-router";
100
+import { useDict } from "@/hooks/dict";
101
+
102
+const { outdound_type, is_available, province_ch, auditing_status } = useDict(
103
+  "outdound_type",
104
+  "is_available",
105
+  "province_ch",
106
+  "auditing_status"
107
+);
98 108
 
99 109
 const router = useRouter();
100 110
 const data = reactive({
101 111
   tableData: [],
102
-  cklxOptions: [],
103
-  cklxObject: {}, //出库类型
104
-  dysfObject: {}, //调用省份
105
-  spjdObject: {}, //审批节点
106
-  dqspjdOptions: [],
107
-  spjdOptions: [],
108 112
   deptId: ""
109 113
 });
110 114
 let page = reactive({
@@ -118,7 +122,7 @@ let formData = reactive({
118 122
   status: ""
119 123
 });
120 124
 
121
-let { tableData, cklxOptions, cklxObject, dqspjdOptions, spjdOptions, dysfObject, spjdObject, deptId } = toRefs(data);
125
+let { tableData, deptId } = toRefs(data);
122 126
 
123 127
 // 获取列表
124 128
 const getList = () => {
@@ -134,55 +138,11 @@ const getList = () => {
134 138
     }
135 139
   });
136 140
 };
137
-// 字典-出库类型
138
-const getOutboundTypeList = () => {
139
-  const data = reactive({
140
-    size: 100,
141
-    current: 1,
142
-    dictId: "214124"
143
-  });
144
-  getDictItemList(data).then((res: any) => {
145
-    if (res.code === 0) {
146
-      cklxOptions.value = res.data.records;
147
-      cklxObject.value = res.data.records.reduce((acc: any, item: any) => {
148
-        acc[item.value] = item.label;
149
-        return acc;
150
-      }, {});
151
-    }
152
-  });
153
-};
154
-// 字典-审批节点
155
-const getStatusList = () => {
156
-  const data = reactive({
157
-    size: 100,
158
-    current: 1,
159
-    dictId: "423059273"
160
-  });
161
-  getDictItemList(data).then((res: any) => {
162
-    if (res.code === 0) {
163
-      dqspjdOptions.value = res.data.records;
164
-      spjdObject.value = res.data.records.reduce((acc: any, item: any) => {
165
-        acc[item.value] = item.label;
166
-        return acc;
167
-      }, {});
168
-    }
169
-  });
170
-};
171
-// 字典-调用省份
172
-const getProvinceList = () => {
173
-  const data = reactive({
174
-    size: 100,
175
-    current: 1,
176
-    dictId: "1763408141744652289"
177
-  });
178
-  getDictItemList(data).then((res: any) => {
179
-    if (res.code === 0) {
180
-      dysfObject.value = res.data.records.reduce((acc: any, item: any) => {
181
-        acc[item.value] = item.label;
182
-        return acc;
183
-      }, {});
184
-    }
185
-  });
141
+
142
+// 根据码回显中文
143
+const showCh = (value: any, option: any) => {
144
+  const filterItem = option.filter((item: any) => item.value == value);
145
+  return filterItem.length ? filterItem[0].label : "-";
186 146
 };
187 147
 // 查询
188 148
 const handleSearch = () => {
@@ -195,12 +155,9 @@ const handleReSearch = () => {
195 155
     pageSize: 10,
196 156
     total: 0
197 157
   };
198
-  formData = {
199
-    outboundType: "",
200
-    materialNameVo: "",
201
-    status: ""
202
-    // spjd: "",
203
-  };
158
+  formData.outboundType = "";
159
+  formData.materialNameVo = "";
160
+  formData.status = "";
204 161
   getList();
205 162
 };
206 163
 // 审核
@@ -222,12 +179,8 @@ const handleShow = (row: any) => {
222 179
       type: "show"
223 180
     }
224 181
   });
225
-
226 182
 };
227 183
 
228
-getOutboundTypeList();
229
-getStatusList();
230
-getProvinceList();
231 184
 onMounted(() => {
232 185
   getList();
233 186
   let deptObj: any = sessionStorage.getItem("userInfo");