作者 zhuzhaoping

合并分支 'ExportOrder' 到 'master'

Export order



查看合并请求 !39
@@ -2,42 +2,32 @@ import axios from 'axios' @@ -2,42 +2,32 @@ import axios from 'axios'
2 import http from "../http"; 2 import http from "../http";
3 3
4 //let baseServiceURL = 'cross-border-service' 4 //let baseServiceURL = 'cross-border-service'
5 -let baseServiceURL2 = 'wlpt-cbed-system' 5 +// let baseServiceURL2 = 'wlpt-cbed-system'
  6 +let baseServiceURL2 = 'wlpt-cbed-system-dev'
6 7
7 8
8 9
9 //订单列表 10 //订单列表
10 -// export const selectLists = params => { return axios.get(`${baseServiceURL2}/ExportOrderDeclaration/selectLists`, { params: params }); };  
11 export const selectLists = params => { return axios.get(`${baseServiceURL2}/ExportOrder/selectList`, { params: params }); }; 11 export const selectLists = params => { return axios.get(`${baseServiceURL2}/ExportOrder/selectList`, { params: params }); };
12 //订单申报 12 //订单申报
13 export const sendOrder = params => { return http.post(`${baseServiceURL2}/ExportOrderDeclaration/sendOrder`, params); }; 13 export const sendOrder = params => { return http.post(`${baseServiceURL2}/ExportOrderDeclaration/sendOrder`, params); };
14 -//上传EXCEL  
15 -// export const importExcel = params => { return http.postExcelData(`${baseServiceURL2}/import/importExcel`, params); };  
16 -//订单批量申报  
17 -export const batchOrder = params => { return http.post(`${baseServiceURL2}/ExportOrderDeclaration/batchOrder`, params); };  
18 -//订单批量导入申报  
19 -export const batchOrderImport = params => { return http.postExcelData(`${baseServiceURL2}/ExportOrderDeclaration/batchOrderImport`, params); };  
20 -//清单批量申报  
21 -export const eldhBatchDeclare = params => { return http.post(`${baseServiceURL2}/ExportListDeclaration/eldhBatchDeclare`, params); };  
22 -//清单批量导入申报  
23 -export const eldhImportDeclare = params => { return http.postExcelData(`${baseServiceURL2}/ExportListDeclaration/eldhImportDeclare`, params); };  
24 -//运单批量申报  
25 -export const eldBatchDeclare = params => { return http.post(`${baseServiceURL2}/ExportLogistics/eldBatchDeclare`, params); };  
26 -//运单批量导入申报  
27 -export const eldImportDeclare = params => { return http.postExcelData(`${baseServiceURL2}/ExportLogistics/eldImportDeclare`, params); };  
28 -//总分单批量申报  
29 -export const zfeldBatchDeclare = params => { return http.post(`${baseServiceURL2}/ExportWaybillDeclaration/eldBatchDeclare`, params); };  
30 -//总分单批量导入申报  
31 -export const zfeldImportDeclare = params => { return http.postExcelData(`${baseServiceURL2}/ExportWaybillDeclaration/eldImportDeclare`, params); };  
32 //根据提运单统计信息 14 //根据提运单统计信息
33 export const billNoStatistics = params => { return axios.get(`${baseServiceURL2}/ExportListDeclaration/billNoStatistics`, { params: params }); }; 15 export const billNoStatistics = params => { return axios.get(`${baseServiceURL2}/ExportListDeclaration/billNoStatistics`, { params: params }); };
34 // 根据guid删除订单信息 16 // 根据guid删除订单信息
35 -export const deleteOrderByGuid = params => {return axios.get(`${baseServiceURL2}/ExportOrder/deleteByGuid`, {params: params}); }; 17 +export const deleteOrder = params => {return axios.get(`${baseServiceURL2}/ExportOrder/delByClientCodeAndOrderNo`, {params: params}); };
36 //根据主单号批量删除订单信息 18 //根据主单号批量删除订单信息
37 -export const batchDelExt2 = params => {return axios.get(`${baseServiceURL2}/ExportOrder/batchDelExt2`, {params: params});}  
38 -// 根据guid列表批量删除订单信息 19 +export const batchDelBillNo = params => {return axios.get(`${baseServiceURL2}/ExportOrder/batchDelBillNo`, {params: params});}
  20 +// 根据客户编号和订单号批量删除订单信息
39 export const batchDelOrderByBeans = params =>{return http.post(`${baseServiceURL2}/ExportOrder/deleteByBeans`,params); }; 21 export const batchDelOrderByBeans = params =>{return http.post(`${baseServiceURL2}/ExportOrder/deleteByBeans`,params); };
40 // 导入订单文件到minio 22 // 导入订单文件到minio
41 export const importExcelToMinio = params => { return http.postExcelData(`${baseServiceURL2}/import/importExcelToMinio`, params); }; 23 export const importExcelToMinio = params => { return http.postExcelData(`${baseServiceURL2}/import/importExcelToMinio`, params); };
42 // 查询导入文件列表 24 // 查询导入文件列表
43 -export const selectFilePage = params =>{return axios.get(`${baseServiceURL2}/import/selectFilePage`, { params: params }); }  
  25 +export const selectFilePage = params =>{return axios.get(`${baseServiceURL2}/import/selectFilePage`, { params: params }); }
  26 +// 批量导入申报
  27 +export const batchDecImport = params => { return http.postExcelData(`${baseServiceURL2}/ExportOrder/batchDecImport`, params); };
  28 +// 批量申报
  29 +export const batchDecList = params => { return http.post(`${baseServiceURL2}/ExportOrder/batchDecList`, params); };
  30 +// 主单申报
  31 +export const batchDecBillNo = params => {return http.get(`${baseServiceURL2}/ExportOrder/batchDecBillNo`, params); };
  32 +// 申请回执查询
  33 +export const selectDecRec = params => {return http.get(`${baseServiceURL2}/ExportOrder/selectDecRec`, params);}
@@ -3,16 +3,16 @@ @@ -3,16 +3,16 @@
3 <div> 3 <div>
4 <el-form :inline="true" :model="queryInfo" class="demo-form-inline"> 4 <el-form :inline="true" :model="queryInfo" class="demo-form-inline">
5 <el-form-item label=""> 5 <el-form-item label="">
6 - <el-input size="medium" v-model="queryInfo.ext1" class="" placeholder="客户编码"></el-input> 6 + <el-input size="medium" v-model="queryInfo.clientCode" class="" placeholder="客户编码"></el-input>
7 </el-form-item> 7 </el-form-item>
8 <el-form-item label=""> 8 <el-form-item label="">
9 - <el-input size="medium" v-model="queryInfo.ext2" class="" placeholder="主单号"></el-input> 9 + <el-input size="medium" v-model="queryInfo.billNo" class="" placeholder="主单号"></el-input>
10 </el-form-item> 10 </el-form-item>
11 <el-form-item label=""> 11 <el-form-item label="">
12 - <el-input size="medium" v-model="queryInfo.orderno" placeholder="订单号"></el-input> 12 + <el-input size="medium" v-model="queryInfo.orderNo" placeholder="订单号"></el-input>
13 </el-form-item> 13 </el-form-item>
14 <el-form-item label=""> 14 <el-form-item label="">
15 - <el-select size="medium" v-model="queryInfo.ordertype" placeholder="订单类型"> 15 + <el-select size="medium" :clearable='true' v-model="queryInfo.orderType" placeholder="订单类型">
16 <el-option 16 <el-option
17 v-for="item in ordertypes" 17 v-for="item in ordertypes"
18 :key="item.value" 18 :key="item.value"
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 </el-option> 21 </el-option>
22 </el-select> 22 </el-select>
23 </el-form-item> 23 </el-form-item>
24 - <el-form-item label=""> 24 + <!-- <el-form-item label="">
25 <el-select size="medium" v-model="queryInfo.apptype" placeholder="报送类型"> 25 <el-select size="medium" v-model="queryInfo.apptype" placeholder="报送类型">
26 <el-option 26 <el-option
27 v-for="item in apptypes" 27 v-for="item in apptypes"
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 :value="item.value"> 40 :value="item.value">
41 </el-option> 41 </el-option>
42 </el-select> 42 </el-select>
43 - </el-form-item> 43 + </el-form-item> -->
44 <el-form-item> 44 <el-form-item>
45 <div class="block"> 45 <div class="block">
46 <el-date-picker 46 <el-date-picker
@@ -79,67 +79,34 @@ @@ -79,67 +79,34 @@
79 </el-form-item> 79 </el-form-item>
80 </el-form> 80 </el-form>
81 </div> 81 </div>
  82 + <div>
  83 + <el-radio-group v-model="cebType">
  84 + <el-radio :label="303">订单申报</el-radio>
  85 + <el-radio :label="505">运单申报</el-radio>
  86 + <el-radio :label="603">清单申报</el-radio>
  87 + <el-radio :label="607">总分单申报</el-radio>
  88 + </el-radio-group>
  89 + </div>
82 <div style="margin-bottom: 20px"> 90 <div style="margin-bottom: 20px">
83 <el-row :gutter="24"> 91 <el-row :gutter="24">
84 <el-col :span="3"> 92 <el-col :span="3">
85 - <el-button size="medium" @click="batchOrder" style="background: none">订单批量申报</el-button>  
86 - </el-col>  
87 - <el-col :span="4">  
88 - <el-upload  
89 - class="upload-demo"  
90 - action=""  
91 - :before-upload="beforeUpload"  
92 - :http-request="batchOrderImport"  
93 - :show-file-list="false">  
94 - <el-button size="medium" style="background: none">订单批量导入申报</el-button>  
95 - </el-upload> 93 + <el-button size="medium" @click="batchDecList" style="background: none">列表申报</el-button>
96 </el-col> 94 </el-col>
97 <el-col :span="3"> 95 <el-col :span="3">
98 - <el-button size="medium" @click="batchDeclare" style="background: none">清单批量申报</el-button>  
99 - </el-col>  
100 - <el-col :span="4">  
101 <el-upload 96 <el-upload
102 class="upload-demo" 97 class="upload-demo"
103 action="" 98 action=""
104 :before-upload="beforeUpload" 99 :before-upload="beforeUpload"
105 - :http-request="batchDeclareImport" 100 + :http-request="batchDecImport"
106 :show-file-list="false"> 101 :show-file-list="false">
107 - <el-button size="medium" style="background: none">清单批量导入申报</el-button> 102 + <el-button size="medium" style="background: none">导入申报</el-button>
108 </el-upload> 103 </el-upload>
109 </el-col> 104 </el-col>
110 <el-col :span="3"> 105 <el-col :span="3">
111 - <el-button size="medium" @click="ydeldBatchDeclare" style="background: none">运单批量申报</el-button>  
112 - </el-col>  
113 - <el-col :span="4">  
114 - <el-upload  
115 - class="upload-demo"  
116 - action=""  
117 - :before-upload="beforeUpload"  
118 - :http-request="ydbatchDeclareImport"  
119 - :show-file-list="false">  
120 - <el-button size="medium" style="background: none">运单批量导入申报</el-button>  
121 - </el-upload> 106 + <el-button size="medium" @click="batchDecBillNo" style="background: none">主单申报</el-button>
122 </el-col> 107 </el-col>
123 </el-row> 108 </el-row>
124 </div> 109 </div>
125 - <div style="margin-bottom: 20px">  
126 - <el-row :gutter="24">  
127 - <el-col :span="3">  
128 - <el-button size="medium" @click="zfbatchOrder" style="background: none">总分单批量申报</el-button>  
129 - </el-col>  
130 - <el-col :span="4">  
131 - <el-upload  
132 - class="upload-demo"  
133 - action=""  
134 - :before-upload="beforeUpload"  
135 - :http-request="zfbatchOrderImport"  
136 - :show-file-list="false">  
137 - <el-button size="medium" style="background: none">总分单批量导入申报</el-button>  
138 - </el-upload>  
139 - </el-col>  
140 - </el-row>  
141 - </div>  
142 -  
143 <el-table 110 <el-table
144 :data="tableData" 111 :data="tableData"
145 style="width: 100%" 112 style="width: 100%"
@@ -152,43 +119,43 @@ @@ -152,43 +119,43 @@
152 <el-table-column type="expand" label="详细信息"> 119 <el-table-column type="expand" label="详细信息">
153 <template v-slot:default="{ row }"> 120 <template v-slot:default="{ row }">
154 <el-table 121 <el-table
155 - :data="row.exportOrderDeclarationBodyList" 122 + :data="row.exportBodyList"
156 style="width: 85%;margin-left: 45px" 123 style="width: 85%;margin-left: 45px"
157 row-key="id" 124 row-key="id"
158 stripe 125 stripe
159 > 126 >
160 <el-table-column type="index" label="序号" width="50" align="center"/> 127 <el-table-column type="index" label="序号" width="50" align="center"/>
161 - <el-table-column prop="itemno" label="企业商品货号" />  
162 - <el-table-column prop="itemname" label="企业商品名称" />  
163 - <el-table-column prop="itemdescribe" label="企业商品描述" />  
164 - <el-table-column prop="barcode" label="条形码" /> 128 + <el-table-column prop="itemNo" label="企业商品货号" />
  129 + <el-table-column prop="itemName" label="企业商品名称" />
  130 + <el-table-column prop="itemDescribe" label="企业商品描述" />
  131 + <el-table-column prop="barCode" label="条形码" />
165 <el-table-column prop="unit" label="计量单位" /> 132 <el-table-column prop="unit" label="计量单位" />
166 <el-table-column prop="currency" label="币制" /> 133 <el-table-column prop="currency" label="币制" />
167 <el-table-column prop="qty" label="数量" /> 134 <el-table-column prop="qty" label="数量" />
168 <el-table-column prop="price" label="单价" /> 135 <el-table-column prop="price" label="单价" />
169 - <el-table-column prop="totalprice" label="总价" /> 136 + <el-table-column prop="totalPrice" label="总价" />
170 <el-table-column prop="note" label="备注" /> 137 <el-table-column prop="note" label="备注" />
171 </el-table> 138 </el-table>
172 </template> 139 </template>
173 </el-table-column> 140 </el-table-column>
174 <el-table-column type="selection" width="55"></el-table-column> 141 <el-table-column type="selection" width="55"></el-table-column>
175 - <el-table-column prop="ext1" label="客户编号" width="180"></el-table-column>  
176 - <el-table-column prop="ext2" label="主单号" width="180"></el-table-column>  
177 - <el-table-column prop="orderno" label="订单编号" width="180"></el-table-column>  
178 - <el-table-column prop="ordertype" label="订单类型" width="120"> 142 + <el-table-column prop="clientCode" label="客户编号" width="180"></el-table-column>
  143 + <el-table-column prop="billNo" label="主单号" width="180"></el-table-column>
  144 + <el-table-column prop="orderNo" label="订单编号" width="180"></el-table-column>
  145 + <el-table-column prop="orderType" label="订单类型" width="120">
179 <template slot-scope="scope"> 146 <template slot-scope="scope">
180 - <span v-if="scope.row.ordertype==='E'">  
181 - B2C  
182 - </span>  
183 - <span v-else-if="scope.row.ordertype==='B'">  
184 - B2B  
185 - </span> 147 + <span v-if="scope.row.orderType==='E'">
  148 + B2C
  149 + </span>
  150 + <span v-else-if="scope.row.orderType==='B'">
  151 + B2B
  152 + </span>
186 <span v-else> 153 <span v-else>
187 - 海外仓  
188 - </span> 154 + 海外仓
  155 + </span>
189 </template> 156 </template>
190 </el-table-column> 157 </el-table-column>
191 - <el-table-column prop="apptype" label="报送类型" width="120"> 158 + <!-- <el-table-column prop="apptype" label="报送类型" width="120">
192 <template slot-scope="scope"> 159 <template slot-scope="scope">
193 <span v-if="scope.row.apptype==='1'"> 160 <span v-if="scope.row.apptype==='1'">
194 新增 161 新增
@@ -208,9 +175,9 @@ @@ -208,9 +175,9 @@
208 申报 175 申报
209 </span> 176 </span>
210 </template> 177 </template>
211 - </el-table-column>  
212 - <el-table-column prop="ebpname" label="电商平台" width="180"></el-table-column>  
213 - <el-table-column prop="goodsvalue" label="商品金额" width="120"></el-table-column> 178 + </el-table-column> -->
  179 + <el-table-column prop="baseCustomerConfig.ebpname" label="电商平台" width="180"></el-table-column>
  180 + <el-table-column prop="goodsValue" label="商品金额" width="120"></el-table-column>
214 <el-table-column prop="freight" label="运杂费" width="120"></el-table-column> 181 <el-table-column prop="freight" label="运杂费" width="120"></el-table-column>
215 <el-table-column prop="note" label="备注" width="180"></el-table-column> 182 <el-table-column prop="note" label="备注" width="180"></el-table-column>
216 <el-table-column 183 <el-table-column
@@ -219,12 +186,95 @@ @@ -219,12 +186,95 @@
219 width="200" 186 width="200"
220 show-overflow-tooltip> 187 show-overflow-tooltip>
221 <template slot-scope="scope"> 188 <template slot-scope="scope">
222 - <el-button type="text" size="small" @click="sendorder(scope.row)">订单申报</el-button>  
223 - <el-button type="text" size="small" @click="sendDeclare(scope.row)">清单申报</el-button>  
224 - <el-button type="text" size="small" @click="deleteOrderByGuid(scope.row)">订单删除</el-button> 189 + <el-button type="text" size="small" @click="sendorder(scope.row)">申报</el-button>
  190 + <el-button type="text" size="small" @click="deleteOrder(scope.row)">删除</el-button>
  191 + <el-button type="text" @click="selectDecRec(scope.row)">申请回执查询</el-button>
225 </template> 192 </template>
226 </el-table-column> 193 </el-table-column>
227 </el-table> 194 </el-table>
  195 + <el-dialog :visible.sync="dialogTableVisible">
  196 + <template slot="title">
  197 + {{ decRecOrderNo }}
  198 + </template>
  199 + <el-table :data="decRecData">
  200 + <el-table-column property="cebType" label="申报类型">
  201 + <template slot-scope="scope">
  202 + <span v-if="scope.row.cebType==='303'">
  203 + 订单
  204 + </span>
  205 + <span v-else-if="scope.row.cebType==='505'">
  206 + 运单
  207 + </span>
  208 + <span v-else-if="scope.row.cebType==='603'">
  209 + 清单
  210 + </span>
  211 + <span v-else-if="scope.row.cebType==='607'">
  212 + 总分单
  213 + </span>
  214 + <span v-else></span>
  215 + </template>
  216 + </el-table-column>
  217 + <el-table-column property="appType" label="订单报送类型">
  218 + <template slot-scope="scope">
  219 + <span v-if="scope.row.appType==='1'">
  220 + 新增
  221 + </span>
  222 + <span v-else-if="scope.row.appType==='2'">
  223 + 变更
  224 + </span>
  225 + <span v-else></span>
  226 + </template>
  227 + </el-table-column>
  228 + <el-table-column property="appTime" label="订单报送时间">
  229 + <template slot-scope="scope">
  230 + {{ formatDate(scope.row.appTime) }}
  231 + </template>
  232 + </el-table-column>
  233 + <el-table-column property="appStatus" label="订单报送状态">
  234 + <template slot-scope="scope">
  235 + <span v-if="scope.row.appStatus==='1'">
  236 + 暂存
  237 + </span>
  238 + <span v-else-if="scope.row.appStatus==='2'">
  239 + 申报
  240 + </span>
  241 + <span v-else></span>
  242 + </template>
  243 + </el-table-column>
  244 + <el-table-column property="returnStatus" label="回执状态">
  245 + <template slot-scope="scope">
  246 + <span v-if="scope.row.returnStatus === '1'">
  247 + 电子口岸已暂存
  248 + </span>
  249 + <span v-else-if="scope.row.returnStatus === '2'">
  250 + 电子口岸申报中
  251 + </span>
  252 + <span v-else-if="scope.row.returnStatus === '3'">
  253 + 发送海关成功
  254 + </span>
  255 + <span v-else-if="scope.row.returnStatus === '4'">
  256 + 发送海关失败
  257 + </span>
  258 + <span v-else-if="scope.row.returnStatus === '100'">
  259 + 海关退单
  260 + </span>
  261 + <span v-else-if="scope.row.returnStatus === '399'">
  262 + 海关退单
  263 + </span>
  264 + <span v-else></span>
  265 + </template>
  266 + </el-table-column>
  267 + <el-table-column property="returnTime" label="回执时间">
  268 + <template slot-scope="scope">
  269 + <span v-if="scope.row.returnTime !==null && scope.row.returnTime !==''">
  270 + {{ formatDate(scope.row.returnTime) }}
  271 + </span>
  272 + <span v-else></span>
  273 + </template>
  274 + </el-table-column>
  275 + <el-table-column property="returnInfo" label="回执信息" show-overflow-tooltip></el-table-column>
  276 + </el-table>
  277 + </el-dialog>
228 <div class="block"> 278 <div class="block">
229 <el-pagination 279 <el-pagination
230 @size-change="handleSizeChange" 280 @size-change="handleSizeChange"
@@ -240,30 +290,29 @@ @@ -240,30 +290,29 @@
240 </template> 290 </template>
241 291
242 <script> 292 <script>
243 - import {sendOrder,selectLists,batchOrder,batchOrderImport,eldhBatchDeclare,eldhImportDeclare,  
244 - eldBatchDeclare,eldImportDeclare,zfeldBatchDeclare,zfeldImportDeclare,deleteOrderByGuid,  
245 - batchDelOrderByBeans,batchDelExt2} from '../../api/consigner/exportOrder' 293 + import {sendOrder,selectLists,deleteOrder,batchDelOrderByBeans,batchDelBillNo,
  294 + batchDecImport,batchDecList,batchDecBillNo,selectDecRec} from '../../api/consigner/exportOrder'
246 export default { 295 export default {
247 data() { 296 data() {
248 return { 297 return {
249 - apptypes: [  
250 - {  
251 - value: '1',  
252 - label: '新增'  
253 - }, {  
254 - value: '2',  
255 - label: '变更'  
256 - }  
257 - ],  
258 - appstatuss: [  
259 - {  
260 - value: '1',  
261 - label: '暂存'  
262 - }, {  
263 - value: '2',  
264 - label: '申报'  
265 - }  
266 - ], 298 + // apptypes: [
  299 + // {
  300 + // value: '1',
  301 + // label: '新增'
  302 + // }, {
  303 + // value: '2',
  304 + // label: '变更'
  305 + // }
  306 + // ],
  307 + // appstatuss: [
  308 + // {
  309 + // value: '1',
  310 + // label: '暂存'
  311 + // }, {
  312 + // value: '2',
  313 + // label: '申报'
  314 + // }
  315 + // ],
267 ordertypes: [ 316 ordertypes: [
268 { 317 {
269 value: 'E', 318 value: 'E',
@@ -280,14 +329,14 @@ @@ -280,14 +329,14 @@
280 selectedRows: [], 329 selectedRows: [],
281 expandedRowKeys: [], 330 expandedRowKeys: [],
282 queryInfo:{ 331 queryInfo:{
283 - appstatus:'',  
284 - apptype:'',  
285 - orderno:'',  
286 - ordertype:'',  
287 - ext1:'',  
288 - ext2:'',  
289 - starttime:'',  
290 - endtime:'', 332 + // appstatus:'',
  333 + // apptype:'',
  334 + orderNo:'',
  335 + orderType:'',
  336 + clientCode:'',
  337 + billNo:'',
  338 + startTime:'',
  339 + endTime:'',
291 pageNum:1, 340 pageNum:1,
292 pageSize:20 341 pageSize:20
293 }, 342 },
@@ -320,7 +369,11 @@ @@ -320,7 +369,11 @@
320 }] 369 }]
321 }, 370 },
322 value2:'', 371 value2:'',
323 - transformedData:'' 372 + transformedData:'',
  373 + cebType:'',
  374 + decRecData:[],
  375 + dialogTableVisible: false,
  376 + decRecOrderNo:''
324 }; 377 };
325 }, 378 },
326 mounted() { 379 mounted() {
@@ -328,93 +381,43 @@ @@ -328,93 +381,43 @@
328 this.getList(); 381 this.getList();
329 }, 382 },
330 methods: { 383 methods: {
331 -  
332 - //运单批量导入申报  
333 - zfbatchOrderImport({ file, onSuccess, onError }){  
334 - // 生成 FormData 对象  
335 - const formData = new FormData();  
336 - formData.append('file', file);  
337 - zfeldImportDeclare(formData).then((response) => {  
338 - const res = response.data  
339 - if (res.code !== '200') {  
340 - return this.$message.error(res.msg);  
341 - }  
342 - this.$message.success(res.msg);  
343 - this.getList();  
344 - onSuccess(response.data); // 调用 onSuccess 回调通知上传成功  
345 - }).catch(error => {  
346 - // 关闭加载  
347 - this.$message.error(error.toString())  
348 - onError(error); // 调用 onError 回调通知上传失败  
349 - })  
350 - },  
351 - //运单批量申报  
352 - zfbatchOrder(){ 384 + // 批量申报
  385 + batchDecList(){
353 if(this.selectedRows.length!==0){ 386 if(this.selectedRows.length!==0){
354 - this.transformedData = this.selectedRows.map(item => ({  
355 - orderno: item.orderno,  
356 - ext1: item.ext1  
357 - }));  
358 - zfeldBatchDeclare(this.transformedData).then((response)=>{  
359 - const res=response.data;  
360 - if (res.code !== '200') {  
361 - return this.$message.error('总分单批量申报失败!')  
362 - }  
363 - this.$message.success('总分单批量申报成功!');  
364 - this.getList();  
365 - }).catch(error=>{  
366 - this.$message.error(error.toString())  
367 - })  
368 - }else{  
369 - this.$message.error('请选勾取需要申报的总分单信息!');  
370 - }  
371 - },  
372 - //运单批量导入申报  
373 - ydbatchDeclareImport({ file, onSuccess, onError }){  
374 - // 生成 FormData 对象  
375 - const formData = new FormData();  
376 - formData.append('file', file);  
377 - eldImportDeclare(formData).then((response) => {  
378 - const res = response.data  
379 - if (res.code !== '200') {  
380 - return this.$message.error(res.msg); 387 + if(this.cebType.length !== 0){
  388 + this.transformedData = this.selectedRows.map(item => ({
  389 + orderNo: item.orderNo,
  390 + clientCode: item.clientCode,
  391 + cebType: this.cebType
  392 + }));
  393 + batchDecList(this.transformedData).then((response)=>{
  394 + const res=response.data;
  395 + if (res.code !== '200') {
  396 + return this.$message.error('总分单批量申报失败!')
  397 + }
  398 + this.$message.success(res.msg);
  399 + this.getList();
  400 + }).catch(error=>{
  401 + this.$message.error(error.toString())
  402 + })
  403 + }else{
  404 + this.$message.error('请选勾取需要申报的类型!');
381 } 405 }
382 - this.$message.success(res.msg);  
383 - this.getList();  
384 - onSuccess(response.data); // 调用 onSuccess 回调通知上传成功  
385 - }).catch(error => {  
386 - // 关闭加载  
387 - this.$message.error(error.toString())  
388 - onError(error); // 调用 onError 回调通知上传失败  
389 - })  
390 - },  
391 - //运单批量申报  
392 - ydeldBatchDeclare(){  
393 - if(this.selectedRows.length!==0){  
394 - this.transformedData = this.selectedRows.map(item => ({  
395 - orderno: item.orderno,  
396 - ext1: item.ext1  
397 - }));  
398 - eldBatchDeclare(this.transformedData).then((response)=>{  
399 - const res=response.data;  
400 - if (res.code !== '200') {  
401 - return this.$message.error('运单批量申报失败!')  
402 - }  
403 - this.$message.success('运单批量申报成功!');  
404 - this.getList();  
405 - }).catch(error=>{  
406 - this.$message.error(error.toString())  
407 - })  
408 }else{ 406 }else{
409 - this.$message.error('请选勾取需要申报的运单信息!'); 407 + this.$message.error('请选勾取需要申报的信息!');
410 } 408 }
411 }, 409 },
412 - //清单批量导入申报  
413 - batchDeclareImport({ file, onSuccess, onError }){ 410 + // 导入申报
  411 + batchDecImport({ file, onSuccess, onError }){
  412 + if(this.cebType.length === 0){
  413 + this.$message.error('请选勾取需要申报的类型!');
  414 + return;
  415 + }
414 // 生成 FormData 对象 416 // 生成 FormData 对象
415 const formData = new FormData(); 417 const formData = new FormData();
416 formData.append('file', file); 418 formData.append('file', file);
417 - eldhImportDeclare(formData).then((response) => { 419 + formData.append('cebType', this.cebType);
  420 + batchDecImport(formData).then((response) => {
418 const res = response.data 421 const res = response.data
419 if (res.code !== '200') { 422 if (res.code !== '200') {
420 return this.$message.error(res.msg); 423 return this.$message.error(res.msg);
@@ -428,83 +431,31 @@ @@ -428,83 +431,31 @@
428 onError(error); // 调用 onError 回调通知上传失败 431 onError(error); // 调用 onError 回调通知上传失败
429 }) 432 })
430 }, 433 },
431 - //清单申报  
432 - sendDeclare(row){  
433 - const { orderno, ext1 } = row;  
434 - const senddata= [{ orderno, ext1 }];  
435 - eldhBatchDeclare(senddata).then((response)=>{  
436 - const res=response.data;  
437 - if (res.code !== '200') {  
438 - return this.$message.error('清单批量申报失败!')  
439 - }  
440 - this.$message.success('清单批量申报成功!');  
441 - this.getList();  
442 - }).catch(error=>{  
443 - this.$message.error(error.toString())  
444 - })  
445 -  
446 - },  
447 - //清单批量申报  
448 - batchDeclare(){  
449 - if(this.selectedRows.length!==0){  
450 - this.transformedData = this.selectedRows.map(item => ({  
451 - orderno: item.orderno,  
452 - ext1: item.ext1  
453 - }));  
454 - eldhBatchDeclare(this.transformedData).then((response)=>{  
455 - const res=response.data;  
456 - if (res.code !== '200') {  
457 - return this.$message.error('清单批量申报失败!')  
458 - }  
459 - this.$message.success('清单批量申报成功!');  
460 - this.getList();  
461 - }).catch(error=>{  
462 - this.$message.error(error.toString())  
463 - })  
464 - }else{  
465 - this.$message.error('请选勾取需要申报的清单信息!'); 434 + // 主单申报
  435 + batchDecBillNo(){
  436 + if(this.cebType.length === 0){
  437 + this.$message.error("请选勾取需要申报的类型");
  438 + return;
466 } 439 }
467 - },  
468 - //订单批量导入申报  
469 - batchOrderImport({ file, onSuccess, onError }){  
470 - // 生成 FormData 对象  
471 - const formData = new FormData();  
472 - formData.append('file', file);  
473 - batchOrderImport(formData).then((response) => {  
474 - const res = response.data 440 + if (this.queryInfo.billNo.length === 0){
  441 + this.$message.error("请在主单号栏输入主单号");
  442 + return;
  443 + }
  444 +
  445 + const billNo = this.queryInfo.billNo;
  446 + const cebType = this.cebType;
  447 +
  448 + batchDecBillNo({billNo, cebType}).then((response)=>{
  449 + const res=response.data;
475 if (res.code !== '200') { 450 if (res.code !== '200') {
476 - return this.$message.error(res.msg); 451 + return this.$message.error(res.msg)
477 } 452 }
478 this.$message.success(res.msg); 453 this.$message.success(res.msg);
479 this.getList(); 454 this.getList();
480 - onSuccess(response.data); // 调用 onSuccess 回调通知上传成功  
481 - }).catch(error => {  
482 - // 关闭加载 455 + }).catch(error=>{
483 this.$message.error(error.toString()) 456 this.$message.error(error.toString())
484 - onError(error); // 调用 onError 回调通知上传失败  
485 }) 457 })
486 }, 458 },
487 - //批量申报订单  
488 - batchOrder(){  
489 - if(this.selectedRows.length!==0){  
490 - this.transformedData = this.selectedRows.map(item => ({  
491 - orderno: item.orderno,  
492 - ext1: item.ext1  
493 - }));  
494 - batchOrder(this.transformedData).then((response)=>{  
495 - const res=response.data;  
496 - if (res.code !== '200') {  
497 - return this.$message.error('订单批量申报失败!')  
498 - }  
499 - this.$message.success('订单批量申报成功!');  
500 - this.getList();  
501 - }).catch(error=>{  
502 - this.$message.error(error.toString())  
503 - })  
504 - }else{  
505 - this.$message.error('请选勾取需要申报的订单信息!');  
506 - }  
507 - },  
508 //导入订单excel 459 //导入订单excel
509 beforeUpload(file) { 460 beforeUpload(file) {
510 // 检查文件类型 461 // 检查文件类型
@@ -516,46 +467,40 @@ @@ -516,46 +467,40 @@
516 return true; // 允许上传 467 return true; // 允许上传
517 468
518 }, 469 },
519 - /*uploadFile({ file, onSuccess, onError }){  
520 - // 生成 FormData 对象  
521 - const formData = new FormData();  
522 - formData.append('file', file);  
523 - importExcel(formData).then((response) => {  
524 - const res = response.data  
525 - if (res.code !== '200') {  
526 - return this.$message.error(res.msg);  
527 - }  
528 - this.$message.success(res.msg);  
529 - this.getList();  
530 - onSuccess(response.data); // 调用 onSuccess 回调通知上传成功  
531 - }).catch(error => {  
532 - // 关闭加载  
533 - this.$message.error(error.toString())  
534 - onError(error); // 调用 onError 回调通知上传失败  
535 - })  
536 - },*/  
537 //订单申报 470 //订单申报
538 sendorder(row){ 471 sendorder(row){
539 - sendOrder(row).then((response)=>{ 472 + if(this.cebType.length === 0){
  473 + this.$message.error('请选勾取需要申报的类型!');
  474 + return;
  475 + }
  476 + const clientCode = row.clientCode;
  477 + const orderNo = row.orderNo;
  478 + this.transformedData = [{
  479 + clientCode: clientCode,
  480 + orderNo: orderNo,
  481 + cebType: this.cebType
  482 + }];
  483 + batchDecList(this.transformedData).then((response)=>{
540 const res=response.data; 484 const res=response.data;
541 if (res.code !== '200') { 485 if (res.code !== '200') {
542 - return this.$message.error('订单申报失败!') 486 + return this.$message.error(res.msg)
543 } 487 }
544 - this.$message.success('订单申报成功!'); 488 + this.$message.success(res.msg);
545 this.getList(); 489 this.getList();
546 }).catch(error=>{ 490 }).catch(error=>{
547 this.$message.error(error.toString()) 491 this.$message.error(error.toString())
548 }) 492 })
549 }, 493 },
550 // 订单删除 494 // 订单删除
551 - deleteOrderByGuid(row){ 495 + deleteOrder(row){
552 this.$confirm('此操作将永久删除该订单, 是否继续?', '提示', { 496 this.$confirm('此操作将永久删除该订单, 是否继续?', '提示', {
553 confirmButtonText: '确定', 497 confirmButtonText: '确定',
554 cancelButtonText: '取消', 498 cancelButtonText: '取消',
555 type: 'warning' 499 type: 'warning'
556 }).then(() => { 500 }).then(() => {
557 - const guid = row.guid;  
558 - deleteOrderByGuid({guid}).then((response) => { 501 + const clientCode = row.clientCode;
  502 + const orderNo = row.orderNo;
  503 + deleteOrder({clientCode,orderNo}).then((response) => {
559 const res = response.data; 504 const res = response.data;
560 const code = res.code; 505 const code = res.code;
561 const msg = res.msg; 506 const msg = res.msg;
@@ -572,8 +517,8 @@ @@ -572,8 +517,8 @@
572 }, 517 },
573 // 根据主单号删除数据 518 // 根据主单号删除数据
574 batchDelExt2(){ 519 batchDelExt2(){
575 - if (this.selectedRows.length !== 1){  
576 - this.$message.error("此功能仅支持勾选一条数据"); 520 + if (this.queryInfo.billNo.length === 0){
  521 + this.$message.error("请在主单号栏输入主单号");
577 return; 522 return;
578 } 523 }
579 this.$confirm('此操作将永久批量删除所选主单号订单, 是否继续?', '提示', { 524 this.$confirm('此操作将永久批量删除所选主单号订单, 是否继续?', '提示', {
@@ -581,8 +526,9 @@ @@ -581,8 +526,9 @@
581 cancelButtonText: '取消', 526 cancelButtonText: '取消',
582 type: 'warning' 527 type: 'warning'
583 }).then(() => { 528 }).then(() => {
584 - const ext2 = this.selectedRows[0].ext2;  
585 - batchDelExt2({ext2}).then((response) => { 529 + const billNo = this.queryInfo.billNo;
  530 + console.log(billNo)
  531 + batchDelBillNo({billNo}).then((response) => {
586 const res = response.data; 532 const res = response.data;
587 const code = res.code; 533 const code = res.code;
588 const msg = res.msg; 534 const msg = res.msg;
@@ -616,8 +562,7 @@ @@ -616,8 +562,7 @@
616 const msg = res.msg; 562 const msg = res.msg;
617 const data = res.data; 563 const data = res.data;
618 if (code !== '200'){ 564 if (code !== '200'){
619 - const errMsg = `${msg}${data}`;  
620 - this.$message.error(errMsg); 565 + this.$message.error(msg);
621 return; 566 return;
622 } 567 }
623 this.$message.success("订单批量删除成功"); 568 this.$message.success("订单批量删除成功");
@@ -630,8 +575,12 @@ @@ -630,8 +575,12 @@
630 //订单列表查询 575 //订单列表查询
631 getList(){ 576 getList(){
632 if(this.value2 !== null && this.value2 !== ""){ 577 if(this.value2 !== null && this.value2 !== ""){
633 - this.queryInfo.starttime = this.value2[0];  
634 - this.queryInfo.endtime = this.value2[1]; 578 + this.queryInfo.startTime = this.value2[0];
  579 + this.queryInfo.endTime = this.value2[1];
  580 + }
  581 + if(this.value2 === null){
  582 + this.queryInfo.startTime = '',
  583 + this.queryInfo.endTime = ''
635 } 584 }
636 selectLists(this.queryInfo).then((response) => { 585 selectLists(this.queryInfo).then((response) => {
637 const res = response.data 586 const res = response.data
@@ -648,6 +597,37 @@ @@ -648,6 +597,37 @@
648 this.$message.error(error.toString()) 597 this.$message.error(error.toString())
649 }) 598 })
650 }, 599 },
  600 + // 申请回执查询
  601 + selectDecRec(row){
  602 + const guid = row.guid
  603 + selectDecRec({guid}).then((response) => {
  604 + const res = response.data
  605 + if(res.code !== '200'){
  606 + return this.$message.error(res.msg)
  607 + }
  608 + this.decRecOrderNo = row.orderNo
  609 + this.decRecData = res.data
  610 + this.dialogTableVisible = true
  611 + this.$message.success(res.msg)
  612 + }).catch(error => {
  613 + this.$message.error(error.toString)
  614 + })
  615 + },
  616 + // 日期格式化
  617 + formatDate(isoString) {
  618 + const date = new Date(isoString);
  619 + // 获取年、月、日
  620 + const year = date.getFullYear();
  621 + const month = ('0' + (date.getMonth() + 1)).slice(-2); // 月份从0开始,需要加1
  622 + const day = ('0' + date.getDate()).slice(-2);
  623 + // 获取小时、分钟、秒
  624 + const hours = ('0' + date.getHours()).slice(-2);
  625 + const minutes = ('0' + date.getMinutes()).slice(-2);
  626 + const seconds = ('0' + date.getSeconds()).slice(-2);
  627 +
  628 + // 返回格式化的日期字符串
  629 + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  630 + },
651 //分页 631 //分页
652 handleSizeChange(val) { 632 handleSizeChange(val) {
653 this.queryInfo.pageSize=val; 633 this.queryInfo.pageSize=val;