feiyue.teng

申报数据编辑页面开发

...@@ -143,5 +143,46 @@ export function exportDeclareData(data) { ...@@ -143,5 +143,46 @@ export function exportDeclareData(data) {
143 }); 143 });
144 } 144 }
145 145
146 +//获取客户列表
147 +export function getCustomerList(data) {
148 + return request({
149 + url: '/bus-customer/customers/getCustomerList',
150 + method: 'post',
151 + data:{
152 + "pageIndex": 1,
153 + "pageSize": 1000,
154 + },
155 + })
156 +}
157 +
158 +//获取口岸表数据
159 +export function getPortList(data) {
160 + return request({
161 + url: '/bus-customer/portInfo/getPortList',
162 + method: 'post',
163 + data:{
164 + "pageIndex": 1,
165 + "pageSize": 1000,
166 + },
167 + })
168 +}
169 +
170 +//获取申报信息
171 +export function getDeclareData(data) {
172 + return request({
173 + url: '/bus-customer/declareData/get/'+data.declareId,
174 + method: 'get',
175 + params: data,
176 + })
177 +}
178 +//更新申报信息
179 +export function updateDeclareData(data) {
180 + return request({
181 + url: '/bus-customer/declareData/update',
182 + method: 'post',
183 + data
184 + })
185 +}
186 +
146 187
147 188
......
...@@ -303,7 +303,9 @@ export default { ...@@ -303,7 +303,9 @@ export default {
303 }, 303 },
304 pageSizes: { 304 pageSizes: {
305 type: Array, 305 type: Array,
306 - default: [10, 20, 30, 40, 50, 100], 306 + default(){
307 + return [10, 20, 30, 40, 50, 100]
308 + },
307 }, 309 },
308 expandRowKeys: { 310 expandRowKeys: {
309 type: Array, 311 type: Array,
...@@ -436,8 +438,10 @@ export default { ...@@ -436,8 +438,10 @@ export default {
436 } 438 }
437 this.$nextTick(() => { 439 this.$nextTick(() => {
438 if (table) { 440 if (table) {
441 + console.log('debug==',tableBody.clientHeight,this.maxHeight);
442 +
439 table.style.maxHeight = this.maxHeight; 443 table.style.maxHeight = this.maxHeight;
440 - tableBody.clientHeight >= this.maxHeight 444 + tableBody.clientHeight >= parseInt(this.maxHeight)
441 ? (table.style.height = this.maxHeight - 40 + "px") 445 ? (table.style.height = this.maxHeight - 40 + "px")
442 : (table.style.height = tableBody.clientHeight + "px"); 446 : (table.style.height = tableBody.clientHeight + "px");
443 this.$refs.tables.doLayout(); 447 this.$refs.tables.doLayout();
......
...@@ -24,7 +24,7 @@ router.beforeEach((to, from, next) => { ...@@ -24,7 +24,7 @@ router.beforeEach((to, from, next) => {
24 store.dispatch('GetInfo').then((res) => { 24 store.dispatch('GetInfo').then((res) => {
25 // if (res.success) { 25 // if (res.success) {
26 store.dispatch('GenerateRoutes').then(accessRoutes => { 26 store.dispatch('GenerateRoutes').then(accessRoutes => {
27 - store.dispatch("GetDict", ['DECLARE_F_FLAG', 'MEASUREMENT_UNIT', 'RECEIPT_STATUS', 'DECLARE_APPTYPE', 'CURRENCY', 'DECLARE_STATISTICS_FLAG', 'ORDER_DECLARATION_PARTY','APP_STATUS']); 27 + store.dispatch("GetDict", ['DECLARE_F_FLAG', 'MEASUREMENT_UNIT','PACKAGE_TYPE_CODE', 'RECEIPT_STATUS', 'DECLARE_APPTYPE', 'CURRENCY','COUNTRY_REGION_CODE', 'DECLARE_STATISTICS_FLAG', 'ORDER_DECLARATION_PARTY','APP_STATUS']);
28 // 根据roles权限生成可访问的路由表 28 // 根据roles权限生成可访问的路由表
29 router.addRoutes(accessRoutes) // 动态添加可访问路由表 29 router.addRoutes(accessRoutes) // 动态添加可访问路由表
30 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 30 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
......
...@@ -94,7 +94,13 @@ export const constantRoutes = [ ...@@ -94,7 +94,13 @@ export const constantRoutes = [
94 name: 'ReportingData', 94 name: 'ReportingData',
95 meta: { title: '申报数据管理', icon: 'upload' } 95 meta: { title: '申报数据管理', icon: 'upload' }
96 }, 96 },
97 - 97 + {
98 + path: '/editReportingData',
99 + component: (resolve) => require(['@/views/editReportingData/index'], resolve),
100 + hidden: true,
101 + name: 'EditReportingData',
102 + meta: { title: '申报数据编辑', icon: 'edit' }
103 + },
98 ] 104 ]
99 }, 105 },
100 { 106 {
......
1 +<template>
2 + <div>
3 + <el-form
4 + class="fedexFormStyle"
5 + ref="editForm"
6 + :model="tableRowformData"
7 + :rules="tableRowFormRules"
8 + label-position="top"
9 + size="small"
10 + >
11 + <el-row :gutter="5">
12 + <el-col :span="4">
13 + <Formitem label="企业商品货号" prop="enterpriseProductCode">
14 + <el-input
15 + type="text"
16 + class="inputShadow"
17 + id="inputInner--enterpriseProductCode"
18 + resize="none"
19 + v-model="tableRowformData.enterpriseProductCode"
20 + clearable
21 + placeholder=""
22 + ></el-input>
23 + </Formitem>
24 + </el-col>
25 + <el-col :span="4">
26 + <Formitem label="企业商品名称" prop="enterpriseProductName">
27 + <el-input
28 + type="text"
29 + class="inputShadow"
30 + id="inputInner--enterpriseProductName"
31 + resize="none"
32 + v-model="tableRowformData.enterpriseProductName"
33 + clearable
34 + placeholder=""
35 + ></el-input>
36 + </Formitem>
37 + </el-col>
38 + <el-col :span="4">
39 + <Formitem label="企业商品描述" prop="enterpriseProductDescribe">
40 + <el-input
41 + type="text"
42 + class="inputShadow"
43 + id="inputInner--enterpriseProductDescribe"
44 + resize="none"
45 + v-model="tableRowformData.enterpriseProductDescribe"
46 + clearable
47 + placeholder=""
48 + ></el-input>
49 + </Formitem>
50 + </el-col>
51 + <el-col :span="4">
52 + <Formitem label="商品名称" prop="productName">
53 + <el-input
54 + type="text"
55 + class="inputShadow"
56 + id="inputInner--productName"
57 + resize="none"
58 + v-model="tableRowformData.productName"
59 + clearable
60 + placeholder=""
61 + ></el-input>
62 + </Formitem>
63 + </el-col>
64 + <el-col :span="4">
65 + <Formitem label="商品编码" prop="productCode">
66 + <el-input
67 + type="text"
68 + class="inputShadow"
69 + id="inputInner--productCode"
70 + resize="none"
71 + v-model="tableRowformData.productCode"
72 + clearable
73 + placeholder=""
74 + ></el-input>
75 + </Formitem>
76 + </el-col>
77 + <el-col :span="4">
78 + <Formitem label="规格型号" prop="model">
79 + <el-input
80 + type="text"
81 + class="inputShadow"
82 + id="inputInner--model"
83 + resize="none"
84 + v-model="tableRowformData.model"
85 + clearable
86 + placeholder=""
87 + ></el-input>
88 + </Formitem>
89 + </el-col>
90 + </el-row>
91 + <el-row :gutter="5">
92 + <el-col :span="4">
93 + <Formitem label="账册备案料号" prop="accountBookMaterialNumber">
94 + <el-input
95 + type="text"
96 + class="inputShadow"
97 + id="inputInner--accountBookMaterialNumber"
98 + resize="none"
99 + v-model="tableRowformData.accountBookMaterialNumber"
100 + clearable
101 + placeholder=""
102 + ></el-input>
103 + </Formitem>
104 + </el-col>
105 + <el-col :span="4">
106 + <Formitem label="条形码" prop="barCode">
107 + <el-input
108 + type="text"
109 + class="inputShadow"
110 + id="inputInner--barCode"
111 + resize="none"
112 + v-model="tableRowformData.barCode"
113 + clearable
114 + placeholder=""
115 + ></el-input>
116 + </Formitem>
117 + </el-col>
118 + <el-col :span="4">
119 + <Formitem label="目的国(地区)代码" prop="destinationCountryRegionCode">
120 + <el-select
121 + type="text"
122 + id="inputInner--destinationCountryRegionCode"
123 + v-model="tableRowformData.destinationCountryRegionCode"
124 + clearable
125 + placeholder=""
126 + >
127 + <el-option
128 + v-for="(item, index) in $store.getters.dict.COUNTRY_REGION_CODE"
129 + :key="index"
130 + :label="item.itemChineseName"
131 + :value="item.itemValue"
132 + ></el-option>
133 + </el-select>
134 + </Formitem>
135 + </el-col>
136 + <el-col :span="4">
137 + <Formitem label="计量单位" prop="unit">
138 + <el-select
139 + type="text"
140 + id="inputInner--unit"
141 + v-model="tableRowformData.unit"
142 + clearable
143 + placeholder=""
144 + >
145 + <el-option
146 + v-for="(item, index) in $store.getters.dict.MEASUREMENT_UNIT"
147 + :key="index"
148 + :label="item.itemChineseName"
149 + :value="item.itemValue"
150 + ></el-option>
151 + </el-select>
152 + </Formitem>
153 + </el-col>
154 + <el-col :span="4">
155 + <Formitem label="数量" prop="qty">
156 + <el-input
157 + type="text"
158 + class="inputShadow"
159 + id="inputInner--qty"
160 + resize="none"
161 + v-model="tableRowformData.qty"
162 + clearable
163 + placeholder=""
164 + ></el-input>
165 + </Formitem>
166 + </el-col>
167 + <el-col :span="4">
168 + <Formitem label="法定数量" prop="legalQty">
169 + <el-input
170 + type="text"
171 + class="inputShadow"
172 + id="inputInner--legalQty"
173 + resize="none"
174 + v-model="tableRowformData.legalQty"
175 + clearable
176 + placeholder=""
177 + ></el-input>
178 + </Formitem>
179 + </el-col>
180 + </el-row>
181 + <el-row :gutter="5">
182 + <el-col :span="4">
183 + <Formitem label="币制" prop="currency">
184 + <el-select
185 + type="text"
186 + id="inputInner--currency"
187 + v-model="tableRowformData.currency"
188 + clearable
189 + placeholder=""
190 + >
191 + <el-option
192 + v-for="(item, index) in $store.getters.dict.CURRENCY"
193 + :key="index"
194 + :label="item.itemChineseName"
195 + :value="item.itemValue"
196 + ></el-option>
197 + </el-select>
198 + </Formitem>
199 + </el-col>
200 + <el-col :span="4">
201 + <Formitem label="单价" prop="price">
202 + <el-input
203 + type="text"
204 + class="inputShadow"
205 + id="inputInner--price"
206 + resize="none"
207 + v-model="tableRowformData.price"
208 + clearable
209 + placeholder=""
210 + ></el-input>
211 + </Formitem>
212 + </el-col>
213 + <el-col :span="4">
214 + <Formitem label="总价" prop="totalPrice">
215 + <el-input
216 + type="text"
217 + class="inputShadow"
218 + id="inputInner--totalPrice"
219 + resize="none"
220 + v-model="tableRowformData.totalPrice"
221 + clearable
222 + placeholder=""
223 + ></el-input>
224 + </Formitem>
225 + </el-col>
226 + <el-col :span="4">
227 + <Formitem label="净重" prop="netWeight">
228 + <el-input
229 + type="text"
230 + class="inputShadow"
231 + id="inputInner--netWeight"
232 + resize="none"
233 + v-model="tableRowformData.netWeight"
234 + clearable
235 + placeholder=""
236 + ></el-input>
237 + </Formitem>
238 + </el-col>
239 + <el-col :span="4">
240 + <Formitem label="备注" prop="remark">
241 + <el-input
242 + type="text"
243 + class="inputShadow"
244 + id="inputInner--remark"
245 + resize="none"
246 + v-model="tableRowformData.remark"
247 + clearable
248 + placeholder=""
249 + ></el-input>
250 + </Formitem>
251 + </el-col>
252 + </el-row>
253 + </el-form>
254 + <p class="formRowDataOperate"><a @click="cancelEditRowData">取消</a> <a @click="rowFormDataSave">保存</a></p>
255 + </div>
256 + </template>
257 +
258 + <script>
259 +
260 + export default {
261 + props: {
262 + rowDatas: {
263 + type: Object,
264 + default: ()=>({}),
265 + },
266 + },
267 + data() {
268 + return {
269 + tableRowformData:{},
270 + tableRowFormRules:{}
271 + };
272 + },
273 + watch: {
274 +
275 + },
276 + methods: {
277 + rowFormDataSave(){
278 + this.$emit('rowFormDataSave', {gnum: this.rowDatas.row.gnum, tableRowformData: this.tableRowformData})
279 + this.tableRowformData = {}
280 + },
281 + cancelEditRowData(){
282 + this.tableRowformData = {}
283 + this.$emit('cancelEditRowData')
284 + },
285 + },
286 + };
287 + </script>
288 +
289 + <style lang="scss" scoped>
290 + .addNewItem{
291 + display: flex;
292 + justify-content: flex-start;
293 + align-items: center;
294 + color:#007AB7;
295 + line-height: 38px;
296 + cursor: pointer;
297 + i{
298 + margin-right: 3px;
299 + }
300 + span{
301 + font-size: 13px;
302 + font-weight: 500;
303 + }
304 + }
305 + .formRowDataOperate{
306 + text-align: right;
307 + padding: 0 20px;
308 + a{
309 + color: #007AB7;
310 + font-weight: 600;
311 + &:first-child{
312 + margin-right: 5px;
313 + }
314 + }
315 + }
316 + </style>
317 +
...\ No newline at end of file ...\ No newline at end of file
1 +<template>
2 + <div class="entry" v-loading="loadings.entryLoading">
3 + <div class="entryTitle">
4 + <div>申报数据编辑</div>
5 + <div>
6 + <el-button class="entrySaveButton" @click="back">返 回</el-button>
7 + </div>
8 + </div>
9 + <el-form
10 + class="fedexFormStyle"
11 + ref="editForm"
12 + :model="formData"
13 + :rules="formRules"
14 + label-position="top"
15 + size="small"
16 + >
17 + <el-row :gutter="5">
18 + <el-col :span="3">
19 + <Formitem label="电商企业" prop="ebccode">
20 + <el-select
21 + type="text"
22 + id="inputInner--ebccode"
23 + v-model="formData.ebccode"
24 + clearable
25 + filterable
26 + placeholder=""
27 + >
28 + <el-option
29 + v-for="(item, index) in ebcDataList"
30 + :key="index"
31 + :label="item.ecomEntName"
32 + :value="item.ecomEntCode"
33 + ></el-option>
34 + </el-select>
35 + </Formitem>
36 + </el-col>
37 + <el-col :span="3">
38 + <Formitem label="物流企业" prop="logisticsCode">
39 + <el-input
40 + type="text"
41 + class="inputShadow"
42 + id="inputInner--logisticsCode"
43 + resize="none"
44 + v-model="formData.logisticsCode"
45 + disabled
46 + clearable
47 + placeholder=""
48 + ></el-input>
49 + </Formitem>
50 + </el-col>
51 + <!-- 订单编号 -->
52 + <el-col :span="3">
53 + <Formitem label="订单编号" prop="orderNo">
54 + <el-input
55 + type="text"
56 + class="inputShadow"
57 + id="inputInner--orderNo"
58 + resize="none"
59 + v-model="formData.orderNo"
60 + clearable
61 + placeholder=""
62 + ></el-input>
63 + </Formitem>
64 + </el-col>
65 + <!-- 电商平台名称 -->
66 + <el-col :span="3">
67 + <Formitem label="物流运单编号" prop="logisticsNo">
68 + <el-input
69 + type="text"
70 + class="inputShadow"
71 + id="inputInner--logisticsNo"
72 + resize="none"
73 + v-model="formData.logisticsNo"
74 + clearable
75 + placeholder=""
76 + ></el-input>
77 + </Formitem>
78 + </el-col>
79 + <!-- 电商企业代码 -->
80 + <el-col :span="3">
81 + <Formitem label="申报地海关" prop="declareCustomsCode">
82 + <el-select
83 + type="text"
84 + id="inputInner--declareCustomsCode"
85 + v-model="formData.declareCustomsCode"
86 + clearable
87 + placeholder=""
88 + >
89 + <el-option
90 + v-for="(item, index) in declareCustomsDataList"
91 + :key="index"
92 + :label="item.declarationUnitCompanyName"
93 + :value="item.declarationUnit10"
94 + ></el-option>
95 + </el-select>
96 + </Formitem>
97 + </el-col>
98 + <!-- 电商企业 -->
99 + <el-col :span="3">
100 + <Formitem label="出生日期" prop="exportDate">
101 + <el-date-picker
102 + class="inputInner--createTime"
103 + id="inputInner--exportDate"
104 + v-model="formData.exportDate"
105 + type="date"
106 + format="yyyy-MM-dd"
107 + prefix-icon="none"
108 + value-format="yyyy-MM-dd"
109 + />
110 + </Formitem>
111 + </el-col>
112 +
113 + <!-- 商品金额 -->
114 + <el-col :span="3">
115 + <Formitem label="商品金额" prop="goodsValue">
116 + <el-input
117 + type="text"
118 + class="inputShadow"
119 + id="inputInner--goodsValue"
120 + resize="none"
121 + v-model="formData.goodsValue"
122 + clearable
123 + placeholder=""
124 + ></el-input>
125 + </Formitem>
126 + </el-col>
127 + <!-- 运杂费 -->
128 + <el-col :span="3">
129 + <Formitem label="运杂费" prop="miscellaneousFreight">
130 + <el-input
131 + type="text"
132 + class="inputShadow"
133 + id="inputInner--miscellaneousFreight"
134 + resize="none"
135 + v-model="formData.miscellaneousFreight"
136 + clearable
137 + placeholder=""
138 + ></el-input>
139 + </Formitem>
140 + </el-col>
141 +
142 + </el-row>
143 + <el-row :gutter="5">
144 + <!-- 币制 -->
145 + <el-col :span="3">
146 + <Formitem label="币制" prop="currency">
147 + <el-select
148 + type="text"
149 + id="inputInner--currency"
150 + v-model="formData.currency"
151 + clearable
152 + placeholder=""
153 + >
154 + <el-option
155 + v-for="(item, index) in $store.getters.dict.CURRENCY"
156 + :key="index"
157 + :label="item.itemChineseName"
158 + :value="item.itemValue"
159 + ></el-option>
160 + </el-select>
161 + </Formitem>
162 + </el-col>
163 + <!-- 申报状态 -->
164 + <el-col :span="3">
165 + <Formitem label="主要货物信息" prop="mainGoodsInfo">
166 + <el-input
167 + type="text"
168 + class="inputShadow"
169 + id="inputInner--mainGoodsInfo"
170 + resize="none"
171 + v-model="formData.mainGoodsInfo"
172 + clearable
173 + placeholder=""
174 + ></el-input>
175 + </Formitem>
176 + </el-col>
177 + <!-- 申报类型 -->
178 + <el-col :span="3">
179 + <Formitem label="贸易方式" prop="appType">
180 + <el-input
181 + type="text"
182 + class="inputShadow"
183 + id="inputInner--appType"
184 + resize="none"
185 + v-model="formData.appType"
186 + clearable
187 + placeholder=""
188 + ></el-input>
189 + </Formitem>
190 + </el-col>
191 + <!-- 申报日期 -->
192 + <el-col :span="3">
193 + <Formitem label="航班号" prop="flightNumber">
194 + <el-input
195 + type="text"
196 + class="inputShadow"
197 + id="inputInner--flightNumber"
198 + resize="none"
199 + v-model="formData.flightNumber"
200 + clearable
201 + placeholder=""
202 + ></el-input>
203 + </Formitem>
204 + </el-col>
205 + <!-- 备注 -->
206 + <el-col :span="3">
207 + <Formitem label="提运单号" prop="billno">
208 + <el-input
209 + type="text"
210 + class="inputShadow"
211 + id="inputInner--billno"
212 + resize="none"
213 + v-model="formData.billno"
214 + clearable
215 + placeholder=""
216 + ></el-input>
217 + </Formitem>
218 + </el-col>
219 + <el-col :span="3">
220 + <Formitem label="总包号" prop="totalPackageNo">
221 + <el-input
222 + type="text"
223 + class="inputShadow"
224 + id="inputInner--totalPackageNo"
225 + resize="none"
226 + v-model="formData.totalPackageNo"
227 + clearable
228 + placeholder=""
229 + ></el-input>
230 + </Formitem>
231 + </el-col>
232 + <el-col :span="3">
233 + <Formitem label="监管场所代码" prop="regulatoryVenueCode">
234 + <el-input
235 + type="text"
236 + class="inputShadow"
237 + id="inputInner--regulatoryVenueCode"
238 + resize="none"
239 + v-model="formData.regulatoryVenueCode"
240 + clearable
241 + placeholder=""
242 + ></el-input>
243 + </Formitem>
244 + </el-col>
245 + <el-col :span="3">
246 + <Formitem label="许可证号" prop="licenseKey">
247 + <el-input
248 + type="text"
249 + class="inputShadow"
250 + id="inputInner--licenseKey"
251 + resize="none"
252 + v-model="formData.licenseKey"
253 + clearable
254 + placeholder=""
255 + ></el-input>
256 + </Formitem>
257 + </el-col>
258 + </el-row>
259 + <el-row :gutter="5">
260 + <el-col :span="3">
261 + <Formitem label="运抵国(地区)" prop="destinationCountryRegion">
262 + <el-select
263 + type="text"
264 + id="inputInner--destinationCountryRegion"
265 + v-model="formData.destinationCountryRegion"
266 + clearable
267 + placeholder=""
268 + >
269 + <el-option
270 + v-for="(item, index) in $store.getters.dict.COUNTRY_REGION_CODE"
271 + :key="index"
272 + :label="item.itemChineseName"
273 + :value="item.itemValue"
274 + ></el-option>
275 + </el-select>
276 + </Formitem>
277 + </el-col>
278 + <el-col :span="3">
279 + <Formitem label="运港代码" prop="portCode">
280 + <el-input
281 + type="text"
282 + class="inputShadow"
283 + id="inputInner--portCode"
284 + resize="none"
285 + v-model="formData.portCode"
286 + clearable
287 + placeholder=""
288 + ></el-input>
289 + </Formitem>
290 + </el-col>
291 + <el-col :span="3">
292 + <Formitem label="运费" prop="freight">
293 + <el-input
294 + type="text"
295 + class="inputShadow"
296 + id="inputInner--freight"
297 + resize="none"
298 + v-model="formData.freight"
299 + clearable
300 + placeholder=""
301 + ></el-input>
302 + </Formitem>
303 + </el-col>
304 + <el-col :span="3">
305 + <Formitem label="运费币制" prop="freightCurrency">
306 + <el-select
307 + type="text"
308 + id="inputInner--freightCurrency"
309 + v-model="formData.freightCurrency"
310 + clearable
311 + placeholder=""
312 + >
313 + <el-option
314 + v-for="(item, index) in $store.getters.dict.CURRENCY"
315 + :key="index"
316 + :label="item.itemChineseName"
317 + :value="item.itemValue"
318 + ></el-option>
319 + </el-select>
320 + </Formitem>
321 + </el-col>
322 + <el-col :span="3">
323 + <Formitem label="运费标志" prop="freightTag">
324 + <el-select
325 + type="text"
326 + id="inputInner--freightTag"
327 + v-model="formData.freightTag"
328 + clearable
329 + placeholder=""
330 + >
331 + <el-option
332 + v-for="(item, index) in $store.getters.dict.DECLARE_F_FLAG"
333 + :key="index"
334 + :label="item.itemChineseName"
335 + :value="item.itemValue"
336 + ></el-option>
337 + </el-select>
338 + </Formitem>
339 + </el-col>
340 + <el-col :span="3">
341 + <Formitem label="保费" prop="insuredfee">
342 + <el-input
343 + type="text"
344 + class="inputShadow"
345 + id="inputInner--insuredfee"
346 + resize="none"
347 + v-model="formData.insuredfee"
348 + clearable
349 + placeholder=""
350 + ></el-input>
351 + </Formitem>
352 + </el-col>
353 + <el-col :span="3">
354 + <Formitem label="保费币制" prop="insuredfeeCurrency">
355 + <el-select
356 + type="text"
357 + id="inputInner--insuredfeeCurrency"
358 + v-model="formData.insuredfeeCurrency"
359 + clearable
360 + placeholder=""
361 + >
362 + <el-option
363 + v-for="(item, index) in $store.getters.dict.CURRENCY"
364 + :key="index"
365 + :label="item.itemChineseName"
366 + :value="item.itemValue"
367 + ></el-option>
368 + </el-select>
369 + </Formitem>
370 + </el-col>
371 + <el-col :span="3">
372 + <Formitem label="保费标志" prop="insuredfeeTag">
373 + <el-select
374 + type="text"
375 + id="inputInner--insuredfeeTag"
376 + v-model="formData.insuredfeeTag"
377 + clearable
378 + placeholder=""
379 + >
380 + <el-option
381 + v-for="(item, index) in $store.getters.dict.DECLARE_F_FLAG"
382 + :key="index"
383 + :label="item.itemChineseName"
384 + :value="item.itemValue"
385 + ></el-option>
386 + </el-select>
387 + </Formitem>
388 + </el-col>
389 + </el-row>
390 + <el-row :gutter="5">
391 + <el-col :span="3">
392 + <Formitem label="包装种类代码" prop="packageTypeCode">
393 + <el-select
394 + type="text"
395 + id="inputInner--packageTypeCode"
396 + v-model="formData.packageTypeCode"
397 + clearable
398 + placeholder=""
399 + >
400 + <el-option
401 + v-for="(item, index) in $store.getters.dict.PACKAGE_TYPE_CODE"
402 + :key="index"
403 + :label="item.itemChineseName"
404 + :value="item.itemValue"
405 + ></el-option>
406 + </el-select>
407 + </Formitem>
408 + </el-col>
409 + <el-col :span="3">
410 + <Formitem label="件数" prop="packNo">
411 + <el-input
412 + type="text"
413 + class="inputShadow"
414 + id="inputInner--packNo"
415 + resize="none"
416 + v-model="formData.packNo"
417 + clearable
418 + placeholder=""
419 + ></el-input>
420 + </Formitem>
421 + </el-col>
422 + <el-col :span="3">
423 + <Formitem label="毛重(公斤)" prop="weight">
424 + <el-input
425 + type="text"
426 + class="inputShadow"
427 + id="inputInner--weight"
428 + resize="none"
429 + v-model="formData.weight"
430 + clearable
431 + placeholder=""
432 + ></el-input>
433 + </Formitem>
434 + </el-col>
435 + <el-col :span="3">
436 + <Formitem label="净重(公斤)" prop="netWeight">
437 + <el-input
438 + type="text"
439 + class="inputShadow"
440 + id="inputInner--netWeight"
441 + resize="none"
442 + v-model="formData.netWeight"
443 + clearable
444 + placeholder=""
445 + ></el-input>
446 + </Formitem>
447 + </el-col>
448 + <el-col :span="3">
449 + <Formitem label="备注" prop="remark">
450 + <el-input
451 + type="text"
452 + class="inputShadow"
453 + id="inputInner--remark"
454 + resize="none"
455 + v-model="formData.remark"
456 + clearable
457 + placeholder=""
458 + ></el-input>
459 + </Formitem>
460 + </el-col>
461 + </el-row>
462 + </el-form>
463 + <div class="entryTitle" style="margin-top: 10px">商品明细</div>
464 + <section style="position:relative">
465 + <Table
466 + class="fedexDetialTable fedexSreachTable editableTable"
467 + ref="entryTable"
468 + :pagination="false"
469 + :maxHeight="350"
470 + :data="detailData"
471 + :headerData="detialHeaderData"
472 + :border="true"
473 + :order="true"
474 + :noWidth="0"
475 + :rowKey="'gnum'"
476 + :expandRowKeys="expandRowKeys"
477 + >
478 + <template slot="rowDataEdit" slot-scope="props">
479 + <RowDataEditForm
480 + ref="rowEditForm"
481 + :rowDatas="props"
482 + @cancelEditRowData="cancelEditRowData"
483 + @rowFormDataSave="rowFormDataSave"
484 + />
485 + </template>
486 + <template slot="optionColumn">
487 + <el-table-column align="left" label="操作" width="100">
488 + <template slot-scope="scope">
489 + <el-button type="text" @click="updateRow(scope.row)"> 修改 </el-button>
490 + <el-button type="text" @click="deleteRow(scope.row)"> 删除 </el-button>
491 + </template>
492 + </el-table-column>
493 + </template>
494 + </Table>
495 + </section>
496 + <div class="addNewItem" @click="addNewItem">
497 + <i class="el-icon-circle-plus-outline"></i>
498 + <span>添加新物品</span>
499 + </div>
500 + <div style="margin-top: 20px; text-align: center">
501 + <el-button
502 + class="entrySaveButton entrySaveButton-background revokeSubmitBtn"
503 + type="primary"
504 + @click="submitEditedReportDatas"
505 + >保存</el-button>
506 + <el-button
507 + class="entrySaveButton"
508 + @click="back"
509 + >返回</el-button>
510 + </div>
511 + </div>
512 + </template>
513 +
514 + <script>
515 + import RowDataEditForm from "./RowDataEditForm.vue";
516 + import { getCustomerList, getPortList, getDeclareData, updateDeclareData } from "@/api/declareData-api.js";
517 + import { getDictData } from '@/api/system/dict-api.js'
518 + export default {
519 + name: "",
520 + components: { RowDataEditForm },
521 + data() {
522 + return {
523 + ebcDataList:[],
524 + declareCustomsDataList:[],
525 + declareId: null,
526 + formData: {},
527 + formRules:{
528 + ebccode: [
529 + { required: true, message: '请选择电商企业', trigger: 'change' },
530 + ],
531 + logisticsCode: [
532 + { required: true, message: '请选择物流企业', trigger: 'change' },
533 + ],
534 + orderNo: [
535 + { required: true, message: '请输入订单编号', trigger: 'blur' },
536 + ],
537 + logisticsNo: [
538 + { required: true, message: '请输入物流运单编号', trigger: 'blur' },
539 + ],
540 + declareCustomsCode: [
541 + { required: true, message: '请选择申报地海关', trigger: 'change' }
542 + ],
543 + exportDate: [
544 + { required: true, message: '请选择出生日期', trigger: 'change' }
545 + ],
546 + goodsValue: [
547 + { required: true, message: '请输入商品金额', trigger: 'blur' }
548 + ],
549 + miscellaneousFreight: [
550 + { required: true, message: '请输入运杂费', trigger: 'blur' }
551 + ],
552 + currency: [
553 + { required: true, message: '请选择币制', trigger: 'change' }
554 + ],
555 + mainGoodsInfo: [
556 + { required: true, message: '请输入主要物品信息', trigger: 'blur' }
557 + ],
558 + appType: [
559 + { required: true, message: '请选择贸易方式', trigger: 'change' }
560 + ],
561 + flightNumber: [
562 + { required: true, message: '请输入航班号', trigger: 'blur' }
563 + ],
564 + billno: [
565 + { required: true, message: '请输入提运单号', trigger: 'blur' }
566 + ],
567 + totalPackageNo: [
568 + { required: true, message: '请输入总包号', trigger: 'blur' }
569 + ],
570 + destinationCountryRegion: [
571 + { required: true, message: '请选择运抵国', trigger: 'change' }
572 + ],
573 + portCode: [
574 + { required: true, message: '请输入运港代码', trigger: 'blur' }
575 + ],
576 + freight: [
577 + { required: true, message: '请输入运费', trigger: 'blur' }
578 + ],
579 + freightCurrency: [
580 + { required: true, message: '请选择运费币制', trigger: 'change' }
581 + ],
582 + freightTag: [
583 + { required: true, message: '请选择运费标志', trigger: 'change' }
584 + ],
585 + insuredfee: [
586 + { required: true, message: '请输入保费', trigger: 'blur' }
587 + ],
588 + insuredfeeCurrency: [
589 + { required: true, message: '请输入保费币制', trigger: 'blur' }
590 + ],
591 + insuredfeeTag: [
592 + { required: true, message: '请输选择保费标志', trigger: 'change' }
593 + ],
594 + packageTypeCode: [
595 + { required: true, message: '请选择包装种类代码', trigger: 'change' }
596 + ],
597 + packNo: [
598 + { required: true, message: '请输入件数', trigger: 'blur' }
599 + ],
600 + weight: [
601 + { required: true, message: '请输入毛重', trigger: 'blur' }
602 + ],
603 + netWeight: [
604 + { required: true, message: '请输入净重', trigger: 'blur' }
605 + ],
606 + remark: [
607 + { required: true, message: '请输入备注', trigger: 'blur' }
608 + ]
609 + },
610 + detailData: [],
611 + detialHeaderData: [
612 + {
613 + value: "rowDataEdit",
614 + expand:true,
615 + width:0,
616 + },
617 + {
618 + name: "企业商品货号",
619 + value: "enterpriseProductCode",
620 + width: "",
621 + align: "left",
622 + },
623 + {
624 + name: "企业商品名称",
625 + value: "enterpriseProductName",
626 + width: "",
627 + align: "left",
628 + },
629 + {
630 + name: "企业商品描述",
631 + value: "enterpriseProductDescribe",
632 + width: "",
633 + align: "left",
634 + },
635 + {
636 + name: "商品名称",
637 + value: "productName",
638 + width: "",
639 + align: "left",
640 + },
641 + {
642 + name: "商品编码",
643 + value: "productCode",
644 + width: "",
645 + align: "left",
646 + slot: true,
647 + },
648 + {
649 + name: "规格型号",
650 + value: "model",
651 + width: "",
652 + align: "left",
653 + slot: true,
654 + },
655 + {
656 + name: "账册备案料号",
657 + value: "accountBookMaterialNumber",
658 + width: "",
659 + align: "left",
660 + },
661 + {
662 + name: "条形码",
663 + value: "barCode",
664 + width: "",
665 + align: "left",
666 + },
667 + {
668 + name: "目的国(地区)代码",
669 + value: "destinationCountryRegionCode",
670 + width: "",
671 + align: "left",
672 + },
673 + {
674 + name: "计量单位",
675 + value: "unit",
676 + width: "",
677 + align: "left",
678 + },
679 + {
680 + name: "数量",
681 + value: "qty",
682 + width: "",
683 + align: "left",
684 + },
685 + {
686 + name: "法定数量",
687 + value: "legalQty",
688 + width: "",
689 + align: "left",
690 + },
691 + {
692 + name: "币制",
693 + value: "currency",
694 + width: "",
695 + align: "left",
696 + },
697 + {
698 + name: "单价",
699 + value: "price",
700 + width: "",
701 + align: "left",
702 + },
703 + {
704 + name: "总价",
705 + value: "totalPrice",
706 + width: "",
707 + align: "left",
708 + },
709 + {
710 + name: "净重",
711 + value: "netWeight",
712 + width: "",
713 + align: "left",
714 + },
715 + {
716 + name: "备注",
717 + value: "remark",
718 + width: "",
719 + align: "left",
720 + },
721 + ],
722 + loadings: {
723 + entryLoading: false,
724 + },
725 + logtableType: true,
726 + expandRowKeys:[],
727 +
728 +
729 + };
730 + },
731 + created() {
732 + if (this.$route.params.data) {
733 + this.declareId = this.$route.params.data.declareId;
734 + this.queryDeclareData(this.declareId)
735 + this.queryCustomerList()
736 + this.queryPortList()
737 + } else {
738 + this.back();
739 + }
740 + },
741 + methods: {
742 + //获取客户下拉列表数据
743 + queryCustomerList(){
744 + getCustomerList().then(res =>{
745 + if (res.code == 200) {
746 + this.ebcDataList = res.data.value
747 + } else {
748 + this.ebcDataList = []
749 + }
750 +
751 + }).catch(err =>{
752 + console.log(err)
753 + })
754 + },
755 + //获取口岸表数据
756 + queryPortList(){
757 + getPortList().then(res =>{
758 + if (res.code == 200) {
759 + this.declareCustomsDataList = res.data.value
760 + } else {
761 + this.declareCustomsDataList = []
762 + }
763 +
764 + }).catch(err =>{
765 + console.log(err)
766 + })
767 + },
768 + //获取申报数据
769 + queryDeclareData(declareId) {
770 + getDeclareData({declareId}).then(res =>{
771 + console.log(1111, res)
772 + if (res.code == 200) {
773 + this.formData = res.data.declare
774 + this.formData.orderNo = this.formData.orderno
775 + this.detailData = res.data.product.length ? res.data.product.map((item, index) =>{
776 + item.gnum = index+1
777 + return item
778 + }) : []
779 + } else {
780 + this.detailData = []
781 + this.formData = {}
782 + }
783 +
784 + }).catch(err =>{
785 + console.log(err)
786 + })
787 + },
788 +
789 + hiddenLogTable() {
790 + this.logtableType = !this.logtableType;
791 + },
792 + back() {
793 + this.$router.go(-1);
794 + },
795 + addNewItem() {
796 + let orderNum = this.detailData.at(-1).gnum + 1
797 + this.detailData.push({
798 + "gnum":orderNum,
799 + "accountBookMaterialNumber": "",
800 + "barCode": "",
801 + "currency": "",
802 + "destinationCountryRegionCode": "",
803 + "enterpriseProductCode": "",
804 + "enterpriseProductDescribe": "",
805 + "enterpriseProductName": "",
806 + "legalQty": 0,
807 + "model": "",
808 + "netWeight": 0,
809 + "price": 0,
810 + "productCode": "",
811 + "productName": "",
812 + "qty": 0,
813 + "remark": "",
814 + "totalPrice": 0,
815 + "unit": ""
816 + })
817 +
818 + console.log(this.detailData)
819 + },
820 + updateRow(row){
821 + this.expandRowKeys = [row.gnum]
822 + let obj = {}
823 + for (let key in row) {
824 + obj[key] = row[key]
825 + }
826 +
827 + this.$nextTick(()=>{
828 + this.$refs.rowEditForm.tableRowformData = obj
829 + })
830 + },
831 + deleteRow(row){
832 + this.detailData = this.detailData.filter(item => item.gnum !=row.gnum).map((item, index) =>{
833 + item.gnum = index+1
834 + return item
835 + })
836 + },
837 + rowFormDataSave(props){
838 + this.detailData.map(item =>{
839 + if (item.gnum == props.gnum) {
840 + item = Object.assign(item, props.tableRowformData)
841 + return item
842 + }
843 + })
844 + this.expandRowKeys = []
845 + },
846 + cancelEditRowData(){
847 + this.expandRowKeys = []
848 + },
849 +
850 + //提交更新数据
851 + submitEditedReportDatas(){
852 + let data = {
853 + declare: this.formData,
854 + product: this.detailData
855 + }
856 +
857 + updateDeclareData(data).then(res =>{
858 + if (res.code == 200) {
859 + this.msgSuccess("数据更新成功");
860 + this.queryDeclareData(this.declareId)
861 + } else {
862 + this.alertWarningMsg(res.message);
863 + }
864 +
865 + }).catch(err =>{
866 + console.log(err)
867 + })
868 + },
869 + //取消编辑
870 + cancelEditedReportDatas(){
871 +
872 + }
873 + },
874 + };
875 + </script>
876 +
877 + <style scoped lang="scss">
878 + .entry {
879 + width: 100%;
880 + height: 100%;
881 + padding: 10px;
882 + background-color: #fff;
883 + overflow: auto;
884 +
885 + .entryInformation {
886 + width: 100%;
887 + height: 100%;
888 + }
889 +
890 + .entryTitle {
891 + display: flex;
892 + justify-content: space-between;
893 + font-weight: 600;
894 + font-weight: 16px;
895 + color: #000;
896 + margin-bottom: 10px;
897 + }
898 +
899 + .titleBorder {
900 + border-bottom: 1px solid #333;
901 + }
902 + }
903 + .addNewItem{
904 + display: flex;
905 + justify-content: flex-start;
906 + align-items: center;
907 + color:#007AB7;
908 + line-height: 38px;
909 + cursor: pointer;
910 + i{
911 + margin-right: 3px;
912 + }
913 + span{
914 + font-size: 13px;
915 + font-weight: 500;
916 + }
917 + }
918 + .formRowDataOperate{
919 + text-align: right;
920 + padding: 0 20px;
921 + a{
922 + color: #007AB7;
923 + font-weight: 600;
924 + &:first-child{
925 + margin-right: 5px;
926 + }
927 + }
928 + }
929 + </style>
930 +
...\ No newline at end of file ...\ No newline at end of file
...@@ -310,6 +310,13 @@ ...@@ -310,6 +310,13 @@
310 </div> 310 </div>
311 </TablePopover> 311 </TablePopover>
312 </template> 312 </template>
313 + <template slot="optionColumn">
314 + <el-table-column align="left" label="操作" width="100">
315 + <template slot-scope="scope">
316 + <el-button type="text" @click="update(scope.row)"> 修改 </el-button>
317 + </template>
318 + </el-table-column>
319 + </template>
313 </Table> 320 </Table>
314 <DialogVue 321 <DialogVue
315 :outerVisible="outerVisible" 322 :outerVisible="outerVisible"
...@@ -463,7 +470,7 @@ export default { ...@@ -463,7 +470,7 @@ export default {
463 exportDeclareLoading:false, 470 exportDeclareLoading:false,
464 }, 471 },
465 textareaVisible: {}, 472 textareaVisible: {},
466 - tableMaxheight: 653, 473 + tableMaxheight: null,
467 outerVisible: false, 474 outerVisible: false,
468 dropdownName: "一键申报", 475 dropdownName: "一键申报",
469 dropdownCode: "full", 476 dropdownCode: "full",
...@@ -477,7 +484,10 @@ export default { ...@@ -477,7 +484,10 @@ export default {
477 // this.getCancellationReasons() 484 // this.getCancellationReasons()
478 }, 485 },
479 mounted() { 486 mounted() {
480 - this.tableMaxheight = window.innerHeight - 300; 487 + this.tableMaxheight = window.innerHeight - 355;
488 + window.addEventListener('resize',()=>{
489 + this.tableMaxheight = window.innerHeight - 355;
490 + },false)
481 }, 491 },
482 watch: { 492 watch: {
483 $route(val, oldval) { 493 $route(val, oldval) {
...@@ -639,10 +649,8 @@ export default { ...@@ -639,10 +649,8 @@ export default {
639 // } 649 // }
640 this.search(1); 650 this.search(1);
641 this.outerVisible = false; 651 this.outerVisible = false;
642 - this.$nextTick(()=>{ 652 + this.tableMaxheight = window.innerHeight - 355;
643 - window.location.reload() 653 + this.$forceUpdate()
644 - })
645 -
646 }, 654 },
647 popoverChange(val) { 655 popoverChange(val) {
648 console.log(val); 656 console.log(val);
...@@ -785,8 +793,13 @@ export default { ...@@ -785,8 +793,13 @@ export default {
785 cancelRevoke(){ 793 cancelRevoke(){
786 this.loadings.dropDownLoading = false; 794 this.loadings.dropDownLoading = false;
787 this.revokeVisible = false 795 this.revokeVisible = false
788 - } 796 + },
789 - 797 + update(val) {
798 + this.$router.push({
799 + name: "EditReportingData",
800 + params: { data: val },
801 + });
802 + },
790 803
791 }, 804 },
792 }; 805 };
......