jinhui.wang

组件增加,回执状态增加,字典表增加

...@@ -55,7 +55,6 @@ export default { ...@@ -55,7 +55,6 @@ export default {
55 }; 55 };
56 }, 56 },
57 created() { 57 created() {
58 - this.$store.dispatch("GetLink");
59 localStorage.getItem("EcomLang") 58 localStorage.getItem("EcomLang")
60 ? (this.$i18n.locale = localStorage.getItem("EcomLang")) 59 ? (this.$i18n.locale = localStorage.getItem("EcomLang"))
61 : localStorage.setItem("EcomLang", this.$i18n.locale); 60 : localStorage.setItem("EcomLang", this.$i18n.locale);
......
1 +<template>
2 + <div>
3 + <el-popover
4 + placement="bottom"
5 + width="320"
6 + trigger="manual"
7 + :popper-class="`popover${dataKey}`"
8 + v-model="textareaVisible"
9 + >
10 + <el-input
11 + :name="`${dataKey}-textarea`"
12 + type="textarea"
13 + :rows="5"
14 + :id="`popoverInput${dataKey}`"
15 + class="inputShadow textareaPopover"
16 + v-model="formData[dataKey]"
17 + resize="none"
18 + maxlength="13000"
19 + placeholder=""
20 + @blur="textareaBlur"
21 + @input="input"
22 + ></el-input>
23 + <el-input
24 + slot="reference"
25 + :name="dataKey"
26 + type="textarea"
27 + :rows="1"
28 + class="inputShadow"
29 + :id="`inputInner--${dataKey}`"
30 + v-model="formData[dataKey]"
31 + resize="none"
32 + placeholder=""
33 + @focus="textareaFocus"
34 + @input="input"
35 + ></el-input>
36 + </el-popover>
37 + <el-badge
38 + v-if="
39 + !textareaVisible &&
40 + textareaLength({
41 + key: dataKey,
42 + value: formData[dataKey],
43 + }) > 1
44 + "
45 + type="info"
46 + :value="`+${textareaLength({
47 + key: dataKey,
48 + value: formData[dataKey],
49 + })}`"
50 + class="item texttareaTip"
51 + />
52 + </div>
53 +</template>
54 +
55 +<script>
56 +export default {
57 + props: {
58 + formData: {
59 + type: Object,
60 + default: null,
61 + },
62 + dataKey: {
63 + type: String,
64 + default: "",
65 + },
66 + },
67 + data() {
68 + return {
69 + textareaVisible: false,
70 + };
71 + },
72 + methods: {
73 + //文本域展示状态切换
74 + textareaFocus(val) {
75 + this.textareaVisible = true;
76 + this.$nextTick(() => {
77 + document
78 + .querySelector("#popoverInput" + val.target.name.split("-")[0])
79 + .focus();
80 + document.querySelector(
81 + "#inputInner--" + val.target.name.split("-")[0]
82 + ).style.display = "none";
83 + });
84 + },
85 + textareaBlur(val) {
86 + let inputInner = document.querySelector(
87 + "#inputInner--" + val.target.name.split("-")[0]
88 + );
89 + this.textareaVisible = false;
90 + inputInner.style.display = "block";
91 + this.$nextTick(() => {
92 + inputInner.blur();
93 + if (
94 + inputInner.value != undefined &&
95 + inputInner.value != "" &&
96 + inputInner.value != null
97 + ) {
98 + inputInner.classList.add("inputFocus");
99 + } else {
100 + inputInner.classList.remove("inputFocus");
101 + }
102 + });
103 + let arr = [];
104 + this.formData[val.target.name.split("-")[0]]
105 + .replace(/[\n\,\;\;]/g, ",")
106 + .replace(/[\t]/g, "")
107 + .split(",")
108 + .forEach((str, index) => {
109 + if (str != null && str != "" && index <= 1000) {
110 + arr.push(str.trim());
111 + }
112 + });
113 + this.formData[val.target.name.split("-")[0]] = arr.join("\n");
114 + this.$emit("formChange", this.formData);
115 + this.$forceUpdate();
116 + },
117 + //文本域输入内容数量处理
118 + textareaLength(val) {
119 + if (val.value != "" && val.value != null) {
120 + let arr = [];
121 + val.value
122 + .trim()
123 + .replace(/[\n\,\;\;]/g, ",")
124 + .split(",")
125 + .forEach((item) => {
126 + if (item != "" && item != null) {
127 + arr.push(item);
128 + }
129 + });
130 + return arr.length;
131 + } else {
132 + return 0;
133 + }
134 + },
135 + input() {
136 + this.$forceUpdate();
137 + },
138 + },
139 +};
140 +</script>
141 +
142 +<style scoped lang="scss">
143 +@import "@/assets/styles/variables.scss";
144 +.texttareaTip {
145 + position: absolute;
146 + top: 52%;
147 + right: 20px;
148 + transform: translate(0, -50%);
149 + z-index: 10;
150 +}
151 +</style>
1 +<template>
2 + <el-popover
3 + :popper-class="`popper${dataKey}${rowData.declareId} portLogPopper`"
4 + placement="left"
5 + :visible-arrow="false"
6 + title=""
7 + width="750"
8 + trigger="manual"
9 + v-model="rowData[`${dataKey}PopoverType`]"
10 + >
11 + <div style="text-align: right">
12 + <i
13 + class="el-icon-close"
14 + style="cursor: pointer; font-size: 20px; font-weight: 700"
15 + @click.stop="popoverClose"
16 + ></i>
17 + </div>
18 + <div v-loading="rowData.popoverLoading">
19 + <slot name="title"></slot>
20 + <Table
21 + class="fedexDetialTable mt20"
22 + :data="rowData[`${dataKey}PopoverData`]"
23 + :headerData="receiptDataHead"
24 + :selection="false"
25 + :selectFixed="false"
26 + :order="false"
27 + :border="true"
28 + :rowSelectDataType="false"
29 + :pagination="false"
30 + :page="1"
31 + :pageSizes="[20, 30, 50, 100]"
32 + :totalCount="0"
33 + :emptyText="$t('portEntry.emptyText')"
34 + height="350px"
35 + maxHeight="500px"
36 + rowKey="id"
37 + >
38 + </Table>
39 + </div>
40 + <el-button
41 + slot="reference"
42 + type="text"
43 + @click.stop="popoverChange(rowData, dataKey)"
44 + >
45 + <slot name="buttonLabel"></slot>
46 + </el-button>
47 + </el-popover>
48 +</template>
49 +
50 +<script>
51 +export default {
52 + props: {
53 + dataKey: {
54 + type: String,
55 + default: "",
56 + },
57 + rowData: {
58 + tpye: Object,
59 + default: null,
60 + },
61 + tableData: {
62 + type: Array,
63 + default() {
64 + return [];
65 + },
66 + },
67 + receiptDataHead: {
68 + type: Array,
69 + default() {
70 + return [];
71 + },
72 + },
73 + parentDom: {
74 + type: Object,
75 + default: null,
76 + },
77 + },
78 + data() {
79 + return {};
80 + },
81 + methods: {
82 + //弹框关闭
83 + popoverClose() {
84 + this.$emit("popoverClose");
85 + this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY = "auto";
86 + },
87 + //弹框状态改版
88 + popoverChange(data, type) {
89 + this.popoverClose();
90 + let arr = JSON.parse(JSON.stringify(this.tableData));
91 + arr.forEach((item) => {
92 + item[`${type}PopoverData`] = [];
93 + if (data.declareId != item.declareId) {
94 + // item[`${type}PopoverLoading`] = false;
95 + item[`${type}PopoverType`] = false;
96 + } else {
97 + // item[`${type}PopoverLoading`] = true;
98 + item[`${type}PopoverType`] = !JSON.parse(
99 + JSON.stringify(item[`${type}PopoverType`])
100 + );
101 + }
102 + });
103 + if (!data[`${type}PopoverType`]) {
104 + this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY =
105 + "hidden";
106 + } else {
107 + this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY = "auto";
108 + }
109 + this.$emit("popoverChange", {
110 + tableData: arr,
111 + data: data,
112 + type: !data[`${type}PopoverType`],
113 + status: type,
114 + });
115 +
116 + this.$nextTick(() => {
117 + document.getElementsByClassName("el-table__row").forEach((dom1, i) => {
118 + if (i == data.index) {
119 + dom1.classList.add("activeRow");
120 + } else {
121 + dom1.classList.remove("hover-row");
122 + dom1.classList.remove("activeRow");
123 + }
124 + });
125 + let interval = setInterval(() => {
126 + if (
127 + document.getElementsByClassName(`popper${type}${data.declareId}`)
128 + .length == 1
129 + ) {
130 + clearInterval(interval);
131 + }
132 + document
133 + .getElementsByClassName(`popper${type}${data.declareId}`)
134 + .forEach((dom, index) => {
135 + if (index > 0) {
136 + dom.style.display = "none";
137 + dom.remove();
138 + }
139 + });
140 + }, 100);
141 + });
142 + },
143 + },
144 +};
145 +</script>
146 +
147 +<style></style>
...@@ -19,6 +19,7 @@ import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, ...@@ -19,6 +19,7 @@ import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels,
19 import { formatDate, debounce, alertWarningMsg, alertSuccessMsg, alertErrorMsg, alertInfoMsg, toHead, compare, createRandom, ctho, base64ConvertFile } from "@/utils/index"; 19 import { formatDate, debounce, alertWarningMsg, alertSuccessMsg, alertErrorMsg, alertInfoMsg, toHead, compare, createRandom, ctho, base64ConvertFile } from "@/utils/index";
20 import * as fileDownload from '@/utils/zipdownload.js' 20 import * as fileDownload from '@/utils/zipdownload.js'
21 import * as filters from '@/utils/filters.js' 21 import * as filters from '@/utils/filters.js'
22 +import dictData from '@/utils/dict.js'
22 import regExp from '@/utils/regExp.js' 23 import regExp from '@/utils/regExp.js'
23 import Pagination from "@/components/Pagination"; 24 import Pagination from "@/components/Pagination";
24 // 自定义表格工具扩展 25 // 自定义表格工具扩展
...@@ -35,6 +36,8 @@ import CustomTransfer from '@/components/CustomTransfer' ...@@ -35,6 +36,8 @@ import CustomTransfer from '@/components/CustomTransfer'
35 import CustomForm from '@/components/CustomForm' 36 import CustomForm from '@/components/CustomForm'
36 import CustomTable from '@/components/CustomTable' 37 import CustomTable from '@/components/CustomTable'
37 import EditTag from '@/components/EditTag' 38 import EditTag from '@/components/EditTag'
39 +import TablePopover from '@/components/TablePopover'
40 +import FormTextareaInput from '@/components/FormTextareaInput'
38 (function () { 41 (function () {
39 if (typeof EventTarget !== "undefined") { 42 if (typeof EventTarget !== "undefined") {
40 let func = EventTarget.prototype.addEventListener; 43 let func = EventTarget.prototype.addEventListener;
...@@ -85,6 +88,7 @@ Vue.prototype.approvalPortType = approvalPortType ...@@ -85,6 +88,7 @@ Vue.prototype.approvalPortType = approvalPortType
85 Vue.prototype.getSystemOption = getSystemOption 88 Vue.prototype.getSystemOption = getSystemOption
86 Vue.prototype.currencySystemDisableType = currencySystemDisableType 89 Vue.prototype.currencySystemDisableType = currencySystemDisableType
87 Vue.prototype.imageTaskStatusShowType = imageTaskStatusShowType 90 Vue.prototype.imageTaskStatusShowType = imageTaskStatusShowType
91 +Vue.prototype.dictData = dictData
88 92
89 Vue.prototype.msgSuccess = function (msg) { 93 Vue.prototype.msgSuccess = function (msg) {
90 this.$message({ showClose: true, message: msg, type: "success" }); 94 this.$message({ showClose: true, message: msg, type: "success" });
...@@ -117,6 +121,8 @@ Vue.component('CustomTransfer', CustomTransfer) ...@@ -117,6 +121,8 @@ Vue.component('CustomTransfer', CustomTransfer)
117 Vue.component('CustomForm', CustomForm) 121 Vue.component('CustomForm', CustomForm)
118 Vue.component('CustomTable', CustomTable) 122 Vue.component('CustomTable', CustomTable)
119 Vue.component('EditTag', EditTag) 123 Vue.component('EditTag', EditTag)
124 +Vue.component('TablePopover', TablePopover)
125 +Vue.component('FormTextareaInput', FormTextareaInput)
120 126
121 Vue.use(permission) 127 Vue.use(permission)
122 128
......
This diff is collapsed. Click to expand it.
...@@ -18,7 +18,15 @@ ...@@ -18,7 +18,15 @@
18 }" 18 }"
19 :expandRowKeys="expandRowKeys" 19 :expandRowKeys="expandRowKeys"
20 > 20 >
21 - <template slot="optionColumn"> 21 + <template v-slot:unit="scope">
22 + <span>{{ selectDictLabel(scope.row.unit, "unit", "code") }}</span>
23 + </template>
24 + <template v-slot:currency="scope">
25 + <span>{{
26 + selectDictLabel(scope.row.currency, "currency", "value")
27 + }}</span>
28 + </template>
29 + <!-- <template slot="optionColumn">
22 <el-table-column 30 <el-table-column
23 header-align="center" 31 header-align="center"
24 align="center" 32 align="center"
...@@ -26,7 +34,6 @@ ...@@ -26,7 +34,6 @@
26 width="120" 34 width="120"
27 > 35 >
28 <template slot-scope="scope"> 36 <template slot-scope="scope">
29 - <!-- 展开/收起 -->
30 <el-button 37 <el-button
31 type="text" 38 type="text"
32 @click=" 39 @click="
...@@ -35,12 +42,10 @@ ...@@ -35,12 +42,10 @@
35 : editDetail(scope.row) 42 : editDetail(scope.row)
36 " 43 "
37 > 44 >
38 - <!-- 收起 -->
39 <span v-show="expandRowKeys.includes(scope.row.index)"> 45 <span v-show="expandRowKeys.includes(scope.row.index)">
40 <svg-icon icon-class="upIcon" /> 46 <svg-icon icon-class="upIcon" />
41 {{ $t("entry.detial.form.up") }} 47 {{ $t("entry.detial.form.up") }}
42 </span> 48 </span>
43 - <!-- 展开 -->
44 <span v-show="!expandRowKeys.includes(scope.row.index)" 49 <span v-show="!expandRowKeys.includes(scope.row.index)"
45 ><svg-icon icon-class="downIcon" /> 50 ><svg-icon icon-class="downIcon" />
46 {{ $t("entry.detial.form.down") }} 51 {{ $t("entry.detial.form.down") }}
...@@ -48,7 +53,7 @@ ...@@ -48,7 +53,7 @@
48 </el-button> 53 </el-button>
49 </template> 54 </template>
50 </el-table-column> 55 </el-table-column>
51 - </template> 56 + </template> -->
52 </Table> 57 </Table>
53 </template> 58 </template>
54 59
...@@ -73,7 +78,23 @@ export default { ...@@ -73,7 +78,23 @@ export default {
73 expandRowKeys: [], 78 expandRowKeys: [],
74 }; 79 };
75 }, 80 },
76 - methods: {}, 81 + methods: {
82 + editDetail(val) {
83 + this.expandRowKeys = [val.index];
84 + },
85 + closeEdit() {
86 + this.expandRowKeys = [];
87 + },
88 + selectDictLabel(value, dictkey, key) {
89 + let str = value;
90 + this.dictData[dictkey].forEach((item) => {
91 + if (value == item[key]) {
92 + str = item.name;
93 + }
94 + });
95 + return str;
96 + },
97 + },
77 }; 98 };
78 </script> 99 </script>
79 100
......
...@@ -123,15 +123,20 @@ ...@@ -123,15 +123,20 @@
123 </el-col> 123 </el-col>
124 <el-col :span="3"> 124 <el-col :span="3">
125 <Formitem label="币制" prop="currency"> 125 <Formitem label="币制" prop="currency">
126 - <el-input 126 + <el-select
127 type="text" 127 type="text"
128 - class="inputShadow"
129 id="inputInner--currency" 128 id="inputInner--currency"
130 - resize="none"
131 v-model="formData.currency" 129 v-model="formData.currency"
132 clearable 130 clearable
133 placeholder="" 131 placeholder=""
134 - ></el-input> 132 + >
133 + <el-option
134 + v-for="(item, index) in dictData.currency"
135 + :key="index"
136 + :label="item.name"
137 + :value="item.value"
138 + ></el-option>
139 + </el-select>
135 </Formitem> 140 </Formitem>
136 </el-col> 141 </el-col>
137 <!-- <el-col :span="3"> 142 <!-- <el-col :span="3">
...@@ -149,15 +154,20 @@ ...@@ -149,15 +154,20 @@
149 </el-col> --> 154 </el-col> -->
150 <el-col :span="3"> 155 <el-col :span="3">
151 <Formitem label="申报类型" prop="appType"> 156 <Formitem label="申报类型" prop="appType">
152 - <el-input 157 + <el-select
153 type="text" 158 type="text"
154 - class="inputShadow"
155 id="inputInner--appType" 159 id="inputInner--appType"
156 - resize="none"
157 v-model="formData.appType" 160 v-model="formData.appType"
158 clearable 161 clearable
159 placeholder="" 162 placeholder=""
160 - ></el-input> 163 + >
164 + <el-option
165 + v-for="(item, index) in dictData.appType"
166 + :key="index"
167 + :label="item.name"
168 + :value="item.value"
169 + ></el-option>
170 + </el-select>
161 </Formitem> 171 </Formitem>
162 </el-col> 172 </el-col>
163 <el-col :span="3"> 173 <el-col :span="3">
...@@ -250,61 +260,63 @@ export default { ...@@ -250,61 +260,63 @@ export default {
250 detialHeaderData: [ 260 detialHeaderData: [
251 { 261 {
252 name: "企业商品货号", 262 name: "企业商品货号",
253 - value: "", 263 + value: "itemNo",
254 width: "", 264 width: "",
255 align: "left", 265 align: "left",
256 }, 266 },
257 { 267 {
258 name: "商品企业商品名称", 268 name: "商品企业商品名称",
259 - value: "", 269 + value: "itemName",
260 width: "", 270 width: "",
261 align: "left", 271 align: "left",
262 }, 272 },
263 { 273 {
264 name: "企业商品描述", 274 name: "企业商品描述",
265 - value: "", 275 + value: "itemDescribe",
266 width: "", 276 width: "",
267 align: "left", 277 align: "left",
268 }, 278 },
269 { 279 {
270 name: "条码", 280 name: "条码",
271 - value: "", 281 + value: "barCode",
272 width: "", 282 width: "",
273 align: "left", 283 align: "left",
274 }, 284 },
275 { 285 {
276 name: "计量单位", 286 name: "计量单位",
277 - value: "", 287 + value: "unit",
278 width: "", 288 width: "",
279 align: "left", 289 align: "left",
290 + slot: true,
280 }, 291 },
281 { 292 {
282 name: "币制", 293 name: "币制",
283 - value: "", 294 + value: "currency",
284 width: "", 295 width: "",
285 align: "left", 296 align: "left",
297 + slot: true,
286 }, 298 },
287 { 299 {
288 name: "数量", 300 name: "数量",
289 - value: "", 301 + value: "qty",
290 width: "", 302 width: "",
291 align: "left", 303 align: "left",
292 }, 304 },
293 { 305 {
294 name: "单价", 306 name: "单价",
295 - value: "", 307 + value: "price",
296 width: "", 308 width: "",
297 align: "left", 309 align: "left",
298 }, 310 },
299 { 311 {
300 name: "总价", 312 name: "总价",
301 - value: "", 313 + value: "totalPrice",
302 width: "", 314 width: "",
303 align: "left", 315 align: "left",
304 }, 316 },
305 { 317 {
306 name: "备注", 318 name: "备注",
307 - value: "", 319 + value: "note",
308 width: "", 320 width: "",
309 align: "left", 321 align: "left",
310 }, 322 },
......
...@@ -11,74 +11,25 @@ ...@@ -11,74 +11,25 @@
11 <!-- 订单编号 --> 11 <!-- 订单编号 -->
12 <el-col :span="5"> 12 <el-col :span="5">
13 <Formitem label="订单编号" prop="orderNo"> 13 <Formitem label="订单编号" prop="orderNo">
14 - <el-popover 14 + <FormTextareaInput
15 - placement="bottom" 15 + :formData="sreachFormData"
16 - width="320" 16 + dataKey="orderNo"
17 - trigger="manual" 17 + @formChange="formChange"
18 - popper-class="popoverorderNo"
19 - v-model="textareaVisible.formItemorderNo"
20 - >
21 - <el-input
22 - name="orderNo-textarea"
23 - type="textarea"
24 - :rows="5"
25 - id="popoverInputorderNo"
26 - class="inputShadow textareaPopover"
27 - v-model="sreachFormData.orderNo"
28 - resize="none"
29 - maxlength="13000"
30 - placeholder=""
31 - @blur="textareaBlur"
32 - @input="input"
33 - ></el-input>
34 - <el-input
35 - slot="reference"
36 - name="orderNo"
37 - type="textarea"
38 - :rows="1"
39 - class="inputShadow"
40 - id="inputInner--orderNo"
41 - v-model="sreachFormData.orderNo"
42 - resize="none"
43 - placeholder=""
44 - @focus="textareaFocus"
45 - @input="input"
46 - ></el-input>
47 - </el-popover>
48 - <el-badge
49 - v-if="
50 - !textareaVisible.formItemorderNo &&
51 - textareaLength({
52 - key: 'orderNo',
53 - value: sreachFormData.orderNo,
54 - }) > 1
55 - "
56 - type="info"
57 - :value="`+${textareaLength({
58 - key: 'orderNo',
59 - value: sreachFormData.orderNo,
60 - })}`"
61 - class="item texttareaTip"
62 /> 18 />
63 </Formitem> 19 </Formitem>
64 </el-col> 20 </el-col>
65 <!-- 电商企业代码 --> 21 <!-- 电商企业代码 -->
66 <el-col :span="5"> 22 <el-col :span="5">
67 <Formitem label="电商企业代码" prop="ebccode"> 23 <Formitem label="电商企业代码" prop="ebccode">
68 - <el-select 24 + <el-input
69 type="text" 25 type="text"
26 + class="inputShadow"
70 id="inputInner--ebccode" 27 id="inputInner--ebccode"
28 + resize="none"
71 v-model="sreachFormData.ebccode" 29 v-model="sreachFormData.ebccode"
72 clearable 30 clearable
73 placeholder="" 31 placeholder=""
74 - > 32 + ></el-input>
75 - <el-option
76 - v-for="(item, index) in dictData.ebccode"
77 - :key="index"
78 - :label="item.name"
79 - :value="item.code"
80 - ></el-option>
81 - </el-select>
82 </Formitem> 33 </Formitem>
83 </el-col> 34 </el-col>
84 <!-- 回执状态 --> 35 <!-- 回执状态 -->
...@@ -171,7 +122,23 @@ ...@@ -171,7 +122,23 @@
171 :rowSelectDataType="false" 122 :rowSelectDataType="false"
172 > 123 >
173 <template v-slot:returnStatus="scope"> 124 <template v-slot:returnStatus="scope">
174 - <span>{{ scope.row.returnStatus }}</span> 125 + <TablePopover
126 + dataKey="returnStatus"
127 + :parentDom="$refs.entryTable"
128 + :receiptDataHead="receiptDataHead"
129 + :rowData="scope.row"
130 + :tableData="tableData"
131 + @popoverChange="popoverChange"
132 + @popoverClose="popoverClose"
133 + >
134 + <div slot="title">
135 + <span style="font-weight: 700; color: #515a6e">订单编号:</span
136 + >{{ scope.row.orderno }}
137 + </div>
138 + <div slot="buttonLabel">
139 + {{ scope.row.returnStatus }}
140 + </div>
141 + </TablePopover>
175 </template> 142 </template>
176 <template v-slot:orderNo="scope"> 143 <template v-slot:orderNo="scope">
177 <el-button type="text" @click="view(scope.row)">{{ 144 <el-button type="text" @click="view(scope.row)">{{
...@@ -259,6 +226,26 @@ export default { ...@@ -259,6 +226,26 @@ export default {
259 align: "left", 226 align: "left",
260 }, 227 },
261 ], 228 ],
229 + receiptDataHead: [
230 + {
231 + name: "回执状态",
232 + value: "",
233 + width: "",
234 + align: "left",
235 + },
236 + {
237 + name: "状态时间",
238 + value: "",
239 + width: "",
240 + align: "left",
241 + },
242 + {
243 + name: "回执描述",
244 + value: "",
245 + width: "",
246 + align: "left",
247 + },
248 + ],
262 dictData: { 249 dictData: {
263 ebccode: [], 250 ebccode: [],
264 returnStatus: [], 251 returnStatus: [],
...@@ -304,7 +291,7 @@ export default { ...@@ -304,7 +291,7 @@ export default {
304 item.index = idx; 291 item.index = idx;
305 item.popoverLoading = false; 292 item.popoverLoading = false;
306 item.returnStatusPopoverType = false; 293 item.returnStatusPopoverType = false;
307 - item.returnStatusPopoverData = false; 294 + item.returnStatusPopoverData = [];
308 }); 295 });
309 } else { 296 } else {
310 this.alertWarningMsg(res.message); 297 this.alertWarningMsg(res.message);
...@@ -334,66 +321,21 @@ export default { ...@@ -334,66 +321,21 @@ export default {
334 params: { data: val }, 321 params: { data: val },
335 }); 322 });
336 }, 323 },
337 - //文本域展示状态切换 324 + popoverChange(val) {
338 - textareaFocus(val) { 325 + this.tableData = val.tableData;
339 - this.textareaVisible["formItem" + val.target.name.split("-")[0]] = true; 326 + console.log(this.tableData);
340 - this.$nextTick(() => {
341 - document
342 - .querySelector("#popoverInput" + val.target.name.split("-")[0])
343 - .focus();
344 - document.querySelector(
345 - "#inputInner--" + val.target.name.split("-")[0]
346 - ).style.display = "none";
347 - });
348 }, 327 },
349 - textareaBlur(val) { 328 + popoverClose(val) {
350 - let inputInner = document.querySelector( 329 + this.tableData.forEach((item) => {
351 - "#inputInner--" + val.target.name.split("-")[0] 330 + item.popoverLoading = false;
352 - ); 331 + item.returnStatusPopoverType = false;
353 - this.textareaVisible["formItem" + val.target.name.split("-")[0]] = false; 332 + item.returnStatusPopoverData = [];
354 - inputInner.style.display = "block";
355 - this.$nextTick(() => {
356 - inputInner.blur();
357 - if (
358 - inputInner.value != undefined &&
359 - inputInner.value != "" &&
360 - inputInner.value != null
361 - ) {
362 - inputInner.classList.add("inputFocus");
363 - } else {
364 - inputInner.classList.remove("inputFocus");
365 - }
366 - });
367 - let arr = [];
368 - this.sreachFormData[val.target.name.split("-")[0]]
369 - .replace(/[\n\,\;\;]/g, ",")
370 - .replace(/[\t]/g, "")
371 - .split(",")
372 - .forEach((str, index) => {
373 - if (str != null && str != "" && index <= 1000) {
374 - arr.push(str.trim());
375 - }
376 }); 333 });
377 - this.sreachFormData[val.target.name.split("-")[0]] = arr.join("\n"); 334 + this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY =
378 - this.$forceUpdate(); 335 + "auto";
379 }, 336 },
380 - //文本域输入内容数量处理 337 + formChange(val) {
381 - textareaLength(val) { 338 + this.sreachFormData = val;
382 - if (val.value != "" && val.value != null) {
383 - let arr = [];
384 - val.value
385 - .trim()
386 - .replace(/[\n\,\;\;]/g, ",")
387 - .split(",")
388 - .forEach((item) => {
389 - if (item != "" && item != null) {
390 - arr.push(item);
391 - }
392 - });
393 - return arr.length;
394 - } else {
395 - return 0;
396 - }
397 }, 339 },
398 //分页 340 //分页
399 currentChange(val) { 341 currentChange(val) {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 > 12 >
13 <div class="modelItem"> 13 <div class="modelItem">
14 <div class="modelItem-title"> 14 <div class="modelItem-title">
15 - <div>数据导入</div> 15 + <div>申报数据导入</div>
16 <div> 16 <div>
17 <el-button 17 <el-button
18 type="text" 18 type="text"
...@@ -76,6 +76,30 @@ ...@@ -76,6 +76,30 @@
76 </div> 76 </div>
77 </div> 77 </div>
78 </div> 78 </div>
79 + <div class="modelItem-title" v-if="errorData.length > 0">
80 + <div>导入结果</div>
81 + </div>
82 + <Table
83 + v-if="errorData.length > 0"
84 + class="fedexDetialTable"
85 + ref="entryTable"
86 + :data="errorData"
87 + :headerData="headerData"
88 + :maxHeight="200"
89 + :border="false"
90 + :pagination="false"
91 + :order="false"
92 + :page="1"
93 + :pageSizes="[20, 30, 50, 100]"
94 + :totalCount="0"
95 + :selection="false"
96 + :selectFixed="false"
97 + :rowSelectDataType="false"
98 + >
99 + <template v-slot:message="scope">
100 + <div class="errorMessage">{{ scope.row.message }}</div>
101 + </template>
102 + </Table>
79 </div> 103 </div>
80 <div class="dialogOption entrySave"> 104 <div class="dialogOption entrySave">
81 <el-button 105 <el-button
...@@ -103,6 +127,34 @@ export default { ...@@ -103,6 +127,34 @@ export default {
103 file: null, 127 file: null,
104 }, 128 },
105 searchForm: {}, 129 searchForm: {},
130 + errorData: [],
131 + headerData: [
132 + {
133 + name: "sheet",
134 + value: "sheetName",
135 + width: "100",
136 + align: "left",
137 + },
138 + {
139 + name: "行号",
140 + value: "rowIndex",
141 + width: "50",
142 + align: "left",
143 + },
144 + {
145 + name: "清单编号",
146 + value: "orderNo",
147 + width: "150",
148 + align: "left",
149 + },
150 + {
151 + name: "校验结果",
152 + value: "message",
153 + width: "",
154 + align: "left",
155 + slot: true,
156 + },
157 + ],
106 loadings: { 158 loadings: {
107 dialogLoading: false, 159 dialogLoading: false,
108 uploadLoading: false, 160 uploadLoading: false,
...@@ -116,6 +168,7 @@ export default { ...@@ -116,6 +168,7 @@ export default {
116 watch: { 168 watch: {
117 outerVisible(val) { 169 outerVisible(val) {
118 if (val) { 170 if (val) {
171 + this.loadings.dialogLoading = false;
119 this.uploadType = false; 172 this.uploadType = false;
120 } 173 }
121 }, 174 },
...@@ -152,11 +205,22 @@ export default { ...@@ -152,11 +205,22 @@ export default {
152 uploadDeclareData(obj) 205 uploadDeclareData(obj)
153 .then((res) => { 206 .then((res) => {
154 if (res.code === "200") { 207 if (res.code === "200") {
208 + let arr = [];
209 + res.data.forEach((item) => {
210 + if (item.message != null && item.message != "") {
211 + arr.push(item);
212 + }
213 + });
214 + if (arr.length == 0) {
155 this.msgSuccess("上传成功!"); 215 this.msgSuccess("上传成功!");
156 this.handleRemove(); 216 this.handleRemove();
157 this.close(); 217 this.close();
158 this.uploadType = true; 218 this.uploadType = true;
159 } else { 219 } else {
220 + this.errorData = arr;
221 + this.loadings.dialogLoading = false;
222 + }
223 + } else {
160 this.alertWarningMsg(res.message); 224 this.alertWarningMsg(res.message);
161 this.loadings.dialogLoading = false; 225 this.loadings.dialogLoading = false;
162 } 226 }
...@@ -268,4 +332,8 @@ export default { ...@@ -268,4 +332,8 @@ export default {
268 font-size: 20px; 332 font-size: 20px;
269 } 333 }
270 } 334 }
335 +
336 +.errorMessage {
337 + color: $fedexError;
338 +}
271 </style> 339 </style>
......
This diff is collapsed. Click to expand it.
...@@ -178,6 +178,7 @@ export default { ...@@ -178,6 +178,7 @@ export default {
178 dialogClose() { 178 dialogClose() {
179 this.outerVisible = false; 179 this.outerVisible = false;
180 this.activeData = null; 180 this.activeData = null;
181 + this.search(1);
181 }, 182 },
182 //分页 183 //分页
183 currentChange(val) { 184 currentChange(val) {
......