You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1547 lines
51 KiB

11 months ago
10 months ago
11 months ago
1 month ago
11 months ago
11 months ago
11 months ago
11 months ago
5 months ago
11 months ago
10 months ago
10 months ago
11 months ago
10 months ago
11 months ago
5 months ago
11 months ago
10 months ago
11 months ago
7 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
1 month ago
11 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
7 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
8 months ago
11 months ago
11 months ago
3 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
3 months ago
11 months ago
11 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
4 months ago
11 months ago
4 months ago
11 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
1 month ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
10 months ago
11 months ago
10 months ago
10 months ago
11 months ago
11 months ago
10 months ago
8 months ago
11 months ago
3 months ago
1 month ago
11 months ago
1 month ago
3 months ago
11 months ago
1 month ago
11 months ago
11 months ago
3 months ago
11 months ago
8 months ago
11 months ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  4. <el-form-item :label="'BU:'">
  5. <el-select v-model="searchData.buNo" placeholder="请选择" >
  6. <el-option label="全部" value=""></el-option>
  7. <el-option
  8. v-for = "i in buList"
  9. :key = "i.buNo"
  10. :label = "i.buDesc"
  11. :value = "i.buNo">
  12. </el-option>
  13. </el-select>
  14. </el-form-item>
  15. <el-form-item :label="'发货通知单:'">
  16. <el-input v-model="searchData.delNo" style="width: 120px"></el-input>
  17. </el-form-item>
  18. <el-form-item :label="'CMC Invoice:'">
  19. <el-input v-model="searchData.cmcInvoice" style="width: 120px"></el-input>
  20. </el-form-item>
  21. <el-form-item :label="'ReadyDate'" >
  22. <el-date-picker
  23. style="width: 120px"
  24. v-model="searchData.startDate"
  25. type="date"
  26. format="yyyy-MM-dd"
  27. value-format="yyyy-MM-dd"
  28. placeholder="选择日期">
  29. </el-date-picker>
  30. </el-form-item>
  31. <el-form-item :label="'To'" >
  32. <el-date-picker
  33. style="width: 120px"
  34. v-model="searchData.endDate"
  35. type="date"
  36. format="yyyy-MM-dd"
  37. value-format="yyyy-MM-dd"
  38. placeholder="选择日期">
  39. </el-date-picker>
  40. </el-form-item>
  41. <el-form-item label="沃尔玛订单">
  42. <el-checkbox v-model="searchData.walMartOrderFlag" true-label="true" false-label="false" @change="searchTable()"></el-checkbox>
  43. </el-form-item>
  44. <el-form-item :label="' '" >
  45. <el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'查询'}}</el-button>
  46. <download-excel
  47. :fields="fields()"
  48. :data="exportData"
  49. type="xls"
  50. :name="exportName"
  51. :header="exportHeader"
  52. :footer="exportFooter"
  53. :fetch="createExportData"
  54. :before-generate="startDownload"
  55. :before-finish="finishDownload"
  56. worksheet="导出信息"
  57. class="el-button el-button--primary el-button--medium">
  58. {{ '导出' }}
  59. </download-excel>
  60. </el-form-item>
  61. </el-form>
  62. <el-table
  63. @row-click="changeData"
  64. highlight-current-row
  65. :height="height"
  66. :data="dataList"
  67. ref="mainTable"
  68. border :cell-style="cellStyle"
  69. v-loading="dataListLoading"
  70. style="width: 100%;">
  71. <el-table-column
  72. header-align="center"
  73. align="center"
  74. width="100"
  75. fixed="left"
  76. label="操作">
  77. <template slot-scope="scope">
  78. <a type="text" size="small" v-if="scope.row.notifyStatus==='仓库已确认'" @click="declarationModel(scope.row)">创建报关单</a>
  79. </template>
  80. </el-table-column>
  81. <el-table-column
  82. v-for="(item,index) in columnList1" :key="index"
  83. :sortable="item.columnSortable"
  84. :prop="item.columnProp"
  85. :header-align="item.headerAlign"
  86. :show-overflow-tooltip="item.showOverflowTooltip"
  87. :align="item.align"
  88. :fixed="item.fixed==''?false:item.fixed"
  89. :min-width="item.columnWidth"
  90. :label="item.columnLabel">
  91. <template slot-scope="scope">
  92. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  93. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  94. style="width: 100px; height: 80px"/></span>
  95. </template>
  96. </el-table-column>
  97. </el-table>
  98. <el-pagination
  99. @size-change="sizeChangeHandle"
  100. @current-change="currentChangeHandle"
  101. :current-page="pageIndex"
  102. :page-sizes="[20, 50, 100, 1000]"
  103. :page-size="pageSize"
  104. :total="totalPage"
  105. layout="total, sizes, prev, pager, next, jumper">
  106. </el-pagination>
  107. <el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick" >
  108. <el-tab-pane :label="currentRow.cmcInvoice+'明细'" name="detail">
  109. <el-table
  110. :height="height"
  111. :data="dataList2"
  112. border
  113. style="width: 100%;">
  114. <el-table-column
  115. v-for="(item,index) in columnList2" :key="index"
  116. :sortable="item.columnSortable"
  117. :prop="item.columnProp"
  118. :header-align="item.headerAlign"
  119. :show-overflow-tooltip="item.showOverflowTooltip"
  120. :align="item.align"
  121. :fixed="item.fixed==''?false:item.fixed"
  122. :min-width="item.columnWidth"
  123. :label="item.columnLabel">
  124. <template slot-scope="scope">
  125. <template v-if="item.columnProp === 'ttlAmount' || item.columnProp === 'sumPrice'">
  126. <span>{{!!scope.row[item.columnProp]?scope.row[item.columnProp].toFixed(2):''}}</span>
  127. </template>
  128. <template v-else>
  129. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  130. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  131. </template>
  132. </template>
  133. </el-table-column>
  134. </el-table>
  135. </el-tab-pane>
  136. <el-tab-pane label="装箱明细" name="pallet">
  137. <packing-detail-tab
  138. ref="packingDetailTab"
  139. :current-row="currentRow"
  140. :height="height"
  141. :show-actions="false">
  142. </packing-detail-tab>
  143. </el-tab-pane>
  144. </el-tabs>
  145. <el-dialog title="创建报关单" :close-on-click-modal="false" v-drag :visible.sync="declarationFlag" width="1100px">
  146. <el-form label-position="top" style="margin-left: 7px;margin-top: -5px;">
  147. <el-row :gutter="20">
  148. <el-col :span="4">
  149. <el-form-item :label="'CMC Invoice'" >
  150. <el-input v-model="declarationData.cmcInvoice" disabled ></el-input>
  151. </el-form-item>
  152. </el-col>
  153. <el-col :span="4">
  154. <el-form-item :label="'海关编号'" >
  155. <el-input v-model="declarationData.customsOfficeCode" ></el-input>
  156. </el-form-item>
  157. </el-col>
  158. <el-col :span="4">
  159. <el-form-item :label="'录入编号'" >
  160. <el-input v-model="declarationData.inputCode" ></el-input>
  161. </el-form-item>
  162. </el-col>
  163. <el-col :span="4">
  164. <el-form-item :label="'境内发货人'" >
  165. <el-input v-model="declarationData.localShipper" ></el-input>
  166. </el-form-item>
  167. </el-col>
  168. <el-col :span="4">
  169. <el-form-item :label="'出关类别'" >
  170. <el-input v-model="declarationData.shipType" ></el-input>
  171. </el-form-item>
  172. </el-col>
  173. <el-col :span="4">
  174. <el-form-item :label="'出口日期'" >
  175. <el-date-picker
  176. style="width: 100%"
  177. v-model="declarationData.shipDate"
  178. type="date"
  179. format="yyyy-MM-dd"
  180. value-format="yyyy-MM-dd"
  181. placeholder="选择日期">
  182. </el-date-picker>
  183. </el-form-item>
  184. </el-col>
  185. <el-col :span="4">
  186. <el-form-item :label="'申报日期'" >
  187. <el-date-picker
  188. style="width: 100%"
  189. v-model="declarationData.submitDate"
  190. type="date"
  191. format="yyyy-MM-dd"
  192. value-format="yyyy-MM-dd"
  193. placeholder="选择日期">
  194. </el-date-picker>
  195. </el-form-item>
  196. </el-col>
  197. <el-col :span="4">
  198. <el-form-item :label="'境外收货人'" >
  199. <el-input v-model="declarationData.overseasShipper" ></el-input>
  200. </el-form-item>
  201. </el-col>
  202. <el-col :span="12">
  203. <el-form-item :label="'境外收货地址'" >
  204. <el-input v-model="declarationData.overseasAddress" ></el-input>
  205. </el-form-item>
  206. </el-col>
  207. <el-col :span="4">
  208. <el-form-item :label="'备案号'" >
  209. <el-input v-model="declarationData.filingNo" ></el-input>
  210. </el-form-item>
  211. </el-col>
  212. <el-col :span="4">
  213. <el-form-item :label="'运输方式'" >
  214. <el-input v-model="declarationData.shippingMode" disabled ></el-input>
  215. </el-form-item>
  216. </el-col>
  217. <el-col :span="4">
  218. <el-form-item :label="'运输工具名称及航次号'" >
  219. <el-input v-model="declarationData.shippingData" ></el-input>
  220. </el-form-item>
  221. </el-col>
  222. <el-col :span="4">
  223. <el-form-item :label="'提运单号'" >
  224. <el-input v-model="declarationData.deliverNo" ></el-input>
  225. </el-form-item>
  226. </el-col>
  227. <el-col :span="4">
  228. <el-form-item :label="'生产销售单位'" >
  229. <el-input v-model="declarationData.salesPartner" ></el-input>
  230. </el-form-item>
  231. </el-col>
  232. <el-col :span="4">
  233. <el-form-item :label="'监管方式'" >
  234. <el-input v-model="declarationData.regulatoryMethod" ></el-input>
  235. </el-form-item>
  236. </el-col>
  237. <el-col :span="4">
  238. <el-form-item :label="'征免性质'" >
  239. <el-input v-model="declarationData.dutyStatus" ></el-input>
  240. </el-form-item>
  241. </el-col>
  242. <el-col :span="4">
  243. <el-form-item :label="'许可证号'" >
  244. <el-input v-model="declarationData.permitNumber" ></el-input>
  245. </el-form-item>
  246. </el-col>
  247. <el-col :span="4">
  248. <el-form-item :label="'贸易国(地区)'" >
  249. <el-input v-model="declarationData.salesArea" ></el-input>
  250. </el-form-item>
  251. </el-col>
  252. <el-col :span="4">
  253. <el-form-item :label="'运抵国(地区)'" >
  254. <el-input v-model="declarationData.receiveArea" ></el-input>
  255. </el-form-item>
  256. </el-col>
  257. <el-col :span="4">
  258. <el-form-item :label="'指运港'" >
  259. <el-input v-model="declarationData.shippingPort" ></el-input>
  260. </el-form-item>
  261. </el-col>
  262. <el-col :span="4">
  263. <el-form-item :label="'离境口岸'" >
  264. <el-input v-model="declarationData.exitPort" ></el-input>
  265. </el-form-item>
  266. </el-col>
  267. <el-col :span="4">
  268. <el-form-item :label="'随附单证及编号'" >
  269. <el-input v-model="declarationData.documents" ></el-input>
  270. </el-form-item>
  271. </el-col>
  272. <el-col :span="4">
  273. <el-form-item :label="'标记唛码及备注'" >
  274. <el-input v-model="declarationData.remark" ></el-input>
  275. </el-form-item>
  276. </el-col>
  277. <el-col :span="4">
  278. <el-form-item :label="'包装种类'" >
  279. <el-input v-model="declarationData.packageType" ></el-input>
  280. </el-form-item>
  281. </el-col>
  282. <el-col :span="4">
  283. <el-form-item :label="'件数'" >
  284. <el-input v-model="declarationData.packageQty" ></el-input>
  285. </el-form-item>
  286. </el-col>
  287. <el-col :span="4">
  288. <el-form-item :label="'箱数'" >
  289. <el-input v-model="declarationData.boxQty" ></el-input>
  290. </el-form-item>
  291. </el-col>
  292. <el-col :span="4">
  293. <el-form-item :label="'毛重(KG)'" >
  294. <el-input v-model="declarationData.grossWeight" ></el-input>
  295. </el-form-item>
  296. </el-col>
  297. <el-col :span="4">
  298. <el-form-item :label="'净重(KG)'" >
  299. <el-input v-model="declarationData.netWeight" ></el-input>
  300. </el-form-item>
  301. </el-col>
  302. <el-col :span="4">
  303. <el-form-item :label="'成交方式'" >
  304. <el-input v-model="declarationData.paymentType" ></el-input>
  305. </el-form-item>
  306. </el-col>
  307. <el-col :span="4">
  308. <el-form-item :label="'运费'" >
  309. <el-input v-model="declarationData.shipPrice" ></el-input>
  310. </el-form-item>
  311. </el-col>
  312. <el-col :span="4">
  313. <el-form-item :label="'保费'" >
  314. <el-input v-model="declarationData.premium" ></el-input>
  315. </el-form-item>
  316. </el-col>
  317. <el-col :span="4">
  318. <el-form-item :label="'杂费'" >
  319. <el-input v-model="declarationData.otherPrice" ></el-input>
  320. </el-form-item>
  321. </el-col>
  322. <el-col :span="4">
  323. <el-form-item :label="'托盘重量(KG)'" >
  324. <el-input v-model="declarationData.palletWeight" ></el-input>
  325. </el-form-item>
  326. </el-col>
  327. <el-col :span="4">
  328. <el-form-item :label="'总毛重(KG)'" >
  329. <el-input v-model="declarationData.allWeight" ></el-input>
  330. </el-form-item>
  331. </el-col>
  332. <el-col :span="4">
  333. <el-form-item :label="'特殊关系确认'" >
  334. <el-select v-model="declarationData.specialRelationshipComfirm" style="width: 100%">
  335. <el-option value="Y" label="是"></el-option>
  336. <el-option value="N" label="否"></el-option>
  337. </el-select>
  338. </el-form-item>
  339. </el-col>
  340. <el-col :span="4">
  341. <el-form-item :label="'价格影响确认'" >
  342. <el-select v-model="declarationData.priceInfluenceConfirm" style="width: 100%">
  343. <el-option value="Y" label="是"></el-option>
  344. <el-option value="N" label="否"></el-option>
  345. </el-select>
  346. </el-form-item>
  347. </el-col>
  348. <el-col :span="4">
  349. <el-form-item :label="'支付特许使用费确认'" >
  350. <el-select v-model="declarationData.royaltyPaymentsConfirm" style="width: 100%">
  351. <el-option value="Y" label="是"></el-option>
  352. <el-option value="N" label="否"></el-option>
  353. </el-select>
  354. </el-form-item>
  355. </el-col>
  356. </el-row>
  357. </el-form>
  358. <div class="rq ">
  359. <el-table
  360. height="250"
  361. :data="detailList"
  362. border
  363. v-loading="dataListLoading"
  364. style="width: 100%;">
  365. <el-table-column
  366. prop="hsCodeDesc"
  367. header-align="center"
  368. align="left"
  369. label="品名"
  370. min-width="120">
  371. </el-table-column>
  372. <el-table-column
  373. prop="hsCode"
  374. header-align="center"
  375. align="left"
  376. label="HS Code"
  377. min-width="80">
  378. </el-table-column>
  379. <el-table-column
  380. prop="qty"
  381. header-align="center"
  382. align="right"
  383. label="数量"
  384. min-width="60">
  385. </el-table-column>
  386. <el-table-column
  387. prop="unit"
  388. header-align="center"
  389. align="left"
  390. label="单位"
  391. min-width="60">
  392. </el-table-column>
  393. <el-table-column
  394. prop="netWeight"
  395. header-align="center"
  396. align="right"
  397. label="净重"
  398. min-width="60">
  399. </el-table-column>
  400. <el-table-column
  401. prop="unitPrice"
  402. header-align="center"
  403. align="right"
  404. label="单价"
  405. min-width="60">
  406. <!-- <template slot-scope="scope">
  407. <el-input v-model="scope.row.unitPrice" @change="changeToalPrice(scope.row)" type="number" style="height: 11px;width:98%"></el-input>
  408. </template>-->
  409. </el-table-column>
  410. <el-table-column
  411. prop="totalPrice"
  412. header-align="center"
  413. align="right"
  414. label="总价"
  415. min-width="60">
  416. <template slot-scope="scope">
  417. <span >{{scope.row.totalPrice.toFixed(2)}}</span>
  418. </template>
  419. </el-table-column>
  420. <el-table-column
  421. prop="currency"
  422. header-align="center"
  423. align="left"
  424. label="币制"
  425. min-width="60">
  426. <template slot-scope="scope">
  427. <el-input v-model="scope.row.currency" style="height: 11px;width:98%"></el-input>
  428. </template>
  429. </el-table-column>
  430. <el-table-column
  431. prop="madeArea"
  432. header-align="center"
  433. align="left"
  434. label="原产国(地区)"
  435. min-width="80">
  436. <template slot-scope="scope">
  437. <el-input v-model="scope.row.madeArea" style="height: 11px;width:98%"></el-input>
  438. </template>
  439. </el-table-column>
  440. <el-table-column
  441. prop="destination"
  442. header-align="center"
  443. align="left"
  444. label="最终目的国(地区)"
  445. min-width="100">
  446. <template slot-scope="scope">
  447. <el-input v-model="scope.row.destination" style="height: 11px;width:98%"></el-input>
  448. </template>
  449. </el-table-column>
  450. <el-table-column
  451. prop="sourceArea"
  452. header-align="center"
  453. align="left"
  454. label="境内货源地"
  455. min-width="100">
  456. <template slot-scope="scope">
  457. <el-input v-model="scope.row.sourceArea" style="height: 11px;width:98%"></el-input>
  458. </template>
  459. </el-table-column>
  460. <el-table-column
  461. prop="levy"
  462. header-align="center"
  463. align="left"
  464. label="征免"
  465. min-width="60">
  466. <template slot-scope="scope">
  467. <el-input v-model="scope.row.levy" style="height: 11px;width:98%"></el-input>
  468. </template>
  469. </el-table-column>
  470. </el-table>
  471. </div>
  472. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  473. <el-button type="primary" :loading="saveLoading" :disabled="saveLoading" @click="saveDeclaration()">保存</el-button>
  474. <el-button type="primary" @click="declarationFlag=false">关闭</el-button>
  475. </el-footer>
  476. </el-dialog>
  477. </div>
  478. </template>
  479. <script>
  480. import {} from "@/api/sysLanguage.js"
  481. import PackingDetailTab from "./components/PackingDetailTab.vue";
  482. import {
  483. searchEcssCoDelNotifyHeaderForDanZheng,
  484. searchEcssCoDelNotifyDetail,
  485. searchCoDelPalletDataNew,
  486. getDeclarationDefaultData,
  487. saveDeclaration,
  488. }from "@/api/ecss/ecss.js"
  489. import {getBuList}from '@/api/factory/site.js'
  490. export default {
  491. name: "null",
  492. components:{
  493. PackingDetailTab,
  494. },
  495. data() {
  496. return {
  497. pageIndex: 1,
  498. pageSize: 100,
  499. totalPage: 0,
  500. height: 200,
  501. buList:[],
  502. dataList:[],
  503. dataList2:[],
  504. detailList:[],
  505. dataListLoading: false,
  506. saveLoading: false,
  507. searchData: {
  508. page: 1,
  509. limit: 100,
  510. buNo:'',
  511. delNo:'',
  512. cmcInvoice:'',
  513. notifyStatus:'',
  514. startDate:'',
  515. endDate:'',
  516. username:this.$store.state.user.name,
  517. },
  518. buttons:{
  519. search:'查询',
  520. },
  521. activeName:'detail',
  522. columnList1: [
  523. {
  524. userId: this.$store.state.user.name,
  525. functionId: 801001,
  526. serialNumber: '801001Table1BuDesc',
  527. tableId: "801001Table1",
  528. tableName: "关务系统发货通知单",
  529. columnProp: "buDesc",
  530. headerAlign: "center",
  531. align: "left",
  532. columnLabel: "BU",
  533. columnHidden: false,
  534. columnImage: false,
  535. columnSortable: false,
  536. sortLv: 0,
  537. status: true,
  538. fixed: '',
  539. columnWidth: 60
  540. },
  541. {
  542. userId: this.$store.state.user.name,
  543. functionId: 801001,
  544. serialNumber: '801001Table1CmcInvoice',
  545. tableId: "801001Table1",
  546. tableName: "关务系统发货通知单",
  547. columnProp: "cmcInvoice",
  548. headerAlign: "center",
  549. align: "left",
  550. columnLabel: "CMC Invoice",
  551. columnHidden: false,
  552. columnImage: false,
  553. columnSortable: false,
  554. sortLv: 0,
  555. status: true,
  556. fixed: '',
  557. columnWidth: 100
  558. },
  559. {
  560. userId: this.$store.state.user.name,
  561. functionId: 801001,
  562. serialNumber: '801001Table1DelNo',
  563. tableId: "801001Table1",
  564. tableName: "关务系统发货通知单",
  565. columnProp: "delNo",
  566. headerAlign: "center",
  567. align: "center",
  568. columnLabel: "发货通知单号",
  569. columnHidden: false,
  570. columnImage: false,
  571. columnSortable: false,
  572. sortLv: 0,
  573. status: true,
  574. fixed: '',
  575. columnWidth: 110
  576. },
  577. {
  578. userId: this.$store.state.user.name,
  579. functionId: 801001,
  580. serialNumber: '801001Table1ReadyDate',
  581. tableId: "801001Table1",
  582. tableName: "关务系统发货通知单",
  583. columnProp: "readyDate",
  584. headerAlign: "center",
  585. align: "center",
  586. columnLabel: "ReadyDate",
  587. columnHidden: false,
  588. columnImage: false,
  589. columnSortable: false,
  590. sortLv: 0,
  591. status: true,
  592. fixed: '',
  593. columnWidth: 100
  594. },
  595. {
  596. userId: this.$store.state.user.name,
  597. functionId: 801001,
  598. serialNumber: '801001Table1CustomerName',
  599. tableId: "801001Table1",
  600. tableName: "关务系统发货通知单",
  601. columnProp: "customerName",
  602. headerAlign: "center",
  603. align: "left",
  604. columnLabel: "客户名称",
  605. columnHidden: false,
  606. columnImage: false,
  607. columnSortable: false,
  608. sortLv: 0,
  609. status: true,
  610. fixed: '',
  611. columnWidth: 220
  612. },
  613. {
  614. userId: this.$store.state.user.name,
  615. functionId: 801001,
  616. serialNumber: '801001Table1ShippingMode',
  617. tableId: "801001Table1",
  618. tableName: "关务系统发货通知单",
  619. columnProp: "shippingMode",
  620. headerAlign: "center",
  621. align: "left",
  622. columnLabel: "ShippingMode",
  623. columnHidden: false,
  624. columnImage: false,
  625. columnSortable: false,
  626. sortLv: 0,
  627. status: true,
  628. fixed: '',
  629. columnWidth: 100
  630. },
  631. {
  632. userId: this.$store.state.user.name,
  633. functionId: 801001,
  634. serialNumber: '801001Table1Destination',
  635. tableId: "801001Table1",
  636. tableName: "关务系统发货通知单",
  637. columnProp: "destination",
  638. headerAlign: "center",
  639. align: "left",
  640. columnLabel: "Destination",
  641. columnHidden: false,
  642. columnImage: false,
  643. columnSortable: false,
  644. sortLv: 0,
  645. status: true,
  646. fixed: '',
  647. columnWidth: 100
  648. },
  649. {
  650. userId: this.$store.state.user.name,
  651. functionId: 801001,
  652. serialNumber: '801001Table1NotifyStatus',
  653. tableId: "801001Table1",
  654. tableName: "关务系统发货通知单",
  655. columnProp: "notifyStatus",
  656. headerAlign: "center",
  657. align: "left",
  658. columnLabel: "通知单状态",
  659. columnHidden: false,
  660. columnImage: false,
  661. columnSortable: false,
  662. sortLv: 0,
  663. status: true,
  664. fixed: '',
  665. columnWidth: 100
  666. },
  667. {
  668. userId: this.$store.state.user.name,
  669. functionId: 801001,
  670. serialNumber: '801001Table1NotifyDate',
  671. tableId: "801001Table1",
  672. tableName: "关务系统发货通知单",
  673. columnProp: "notifyDate",
  674. headerAlign: "center",
  675. align: "center",
  676. columnLabel: "发货日期",
  677. columnHidden: false,
  678. columnImage: false,
  679. columnSortable: false,
  680. sortLv: 0,
  681. status: true,
  682. fixed: '',
  683. columnWidth: 120
  684. },
  685. {
  686. userId: this.$store.state.user.name,
  687. functionId: 801001,
  688. serialNumber: '801001Table1ErpDelNo',
  689. tableId: "801001Table1",
  690. tableName: "关务系统发货通知单",
  691. columnProp: "erpDelNo",
  692. headerAlign: "center",
  693. align: "left",
  694. columnLabel: "ERP发货单号",
  695. columnHidden: false,
  696. columnImage: false,
  697. columnSortable: false,
  698. sortLv: 0,
  699. status: true,
  700. fixed: '',
  701. columnWidth: 100
  702. },
  703. {
  704. userId: this.$store.state.user.name,
  705. functionId: 801001,
  706. serialNumber: '801001Table1CreateBy',
  707. tableId: "801001Table1",
  708. tableName: "关务系统发货通知单",
  709. columnProp: "createBy",
  710. headerAlign: "center",
  711. align: "left",
  712. columnLabel: "创建人",
  713. columnHidden: false,
  714. columnImage: false,
  715. columnSortable: false,
  716. sortLv: 0,
  717. status: true,
  718. fixed: '',
  719. columnWidth: 80
  720. },
  721. {
  722. userId: this.$store.state.user.name,
  723. functionId: 801001,
  724. serialNumber: '801001Table1CreateDate',
  725. tableId: "801001Table1",
  726. tableName: "关务系统发货通知单",
  727. columnProp: "createDate",
  728. headerAlign: "center",
  729. align: "center",
  730. columnLabel: "创建时间",
  731. columnHidden: false,
  732. columnImage: false,
  733. columnSortable: false,
  734. sortLv: 0,
  735. status: true,
  736. fixed: '',
  737. columnWidth: 130
  738. },
  739. {
  740. userId: this.$store.state.user.name,
  741. functionId: 801001,
  742. serialNumber: '801001Table1UpdateBy',
  743. tableId: "801001Table1",
  744. tableName: "关务系统发货通知单",
  745. columnProp: "updateBy",
  746. headerAlign: "center",
  747. align: "left",
  748. columnLabel: "修改人",
  749. columnHidden: false,
  750. columnImage: false,
  751. columnSortable: false,
  752. sortLv: 0,
  753. status: true,
  754. fixed: '',
  755. columnWidth: 80
  756. },
  757. {
  758. userId: this.$store.state.user.name,
  759. functionId: 801001,
  760. serialNumber: '801001Table1UpdateDate',
  761. tableId: "801001Table1",
  762. tableName: "关务系统发货通知单",
  763. columnProp: "updateDate",
  764. headerAlign: "center",
  765. align: "center",
  766. columnLabel: "修改时间",
  767. columnHidden: false,
  768. columnImage: false,
  769. columnSortable: false,
  770. sortLv: 0,
  771. status: true,
  772. fixed: '',
  773. columnWidth: 130
  774. },
  775. {
  776. userId: this.$store.state.user.name,
  777. functionId: 801001,
  778. serialNumber: '801001Table1Remark',
  779. tableId: "801001Table1",
  780. tableName: "关务系统发货通知单",
  781. columnProp: "remark",
  782. headerAlign: "center",
  783. align: "left",
  784. columnLabel: "Remark",
  785. columnHidden: false,
  786. columnImage: false,
  787. columnSortable: false,
  788. sortLv: 0,
  789. status: true,
  790. fixed: '',
  791. columnWidth: 300
  792. },
  793. ],
  794. columnList2: [
  795. {
  796. userId: this.$store.state.user.name,
  797. functionId: 801001,
  798. serialNumber: '801001Table2ItemNo',
  799. tableId: "801001Table2",
  800. tableName: "关务系统发货通知单明细",
  801. columnProp: "itemNo",
  802. headerAlign: "center",
  803. align: "left",
  804. columnLabel: "行号",
  805. columnHidden: false,
  806. columnImage: false,
  807. columnSortable: false,
  808. sortLv: 0,
  809. status: true,
  810. fixed: '',
  811. columnWidth: 80
  812. },
  813. {
  814. userId: this.$store.state.user.name,
  815. functionId: 801001,
  816. serialNumber: '801001Table2PartNo',
  817. tableId: "801001Table2",
  818. tableName: "关务系统发货通知单明细",
  819. columnProp: "pn",
  820. headerAlign: "center",
  821. align: "left",
  822. columnLabel: "PN",
  823. columnHidden: false,
  824. columnImage: false,
  825. columnSortable: false,
  826. sortLv: 0,
  827. status: true,
  828. fixed: '',
  829. columnWidth: 100
  830. },
  831. {
  832. userId: this.$store.state.user.name,
  833. functionId: 801001,
  834. serialNumber: '801001Table2PartDescription',
  835. tableId: "801001Table2",
  836. tableName: "关务系统发货通知单明细",
  837. columnProp: "partDescription",
  838. headerAlign: "center",
  839. align: "left",
  840. columnLabel: "Description",
  841. columnHidden: false,
  842. columnImage: false,
  843. columnSortable: false,
  844. sortLv: 0,
  845. status: true,
  846. fixed: '',
  847. columnWidth: 300
  848. },
  849. {
  850. userId: this.$store.state.user.name,
  851. functionId: 801001,
  852. serialNumber: '801001Table2Qty',
  853. tableId: "801001Table2",
  854. tableName: "关务系统发货通知单明细",
  855. columnProp: "qty",
  856. headerAlign: "center",
  857. align: "right",
  858. columnLabel: "Qty (pcs)",
  859. columnHidden: false,
  860. columnImage: false,
  861. columnSortable: false,
  862. sortLv: 0,
  863. status: true,
  864. fixed: '',
  865. columnWidth: 100
  866. },
  867. {
  868. userId: this.$store.state.user.name,
  869. functionId: 801001,
  870. serialNumber: '801001Table2SalesOrder',
  871. tableId: "801001Table2",
  872. tableName: "关务系统发货通知单明细",
  873. columnProp: "salesOrder",
  874. headerAlign: "center",
  875. align: "left",
  876. columnLabel: "销售订单号",
  877. columnHidden: false,
  878. columnImage: false,
  879. columnSortable: false,
  880. sortLv: 0,
  881. status: true,
  882. fixed: '',
  883. columnWidth: 100
  884. },
  885. {
  886. userId: this.$store.state.user.name,
  887. functionId: 801001,
  888. serialNumber: '801001Table2CustomerPO',
  889. tableId: "801001Table2",
  890. tableName: "关务系统发货通知单明细",
  891. columnProp: "customerPO",
  892. headerAlign: "center",
  893. align: "left",
  894. columnLabel: "客户采购单号",
  895. columnHidden: false,
  896. columnImage: false,
  897. columnSortable: false,
  898. sortLv: 0,
  899. status: true,
  900. fixed: '',
  901. columnWidth: 100
  902. },
  903. {
  904. userId: this.$store.state.user.name,
  905. functionId: 801001,
  906. serialNumber: '801001Table2Version',
  907. tableId: "801001Table2",
  908. tableName: "关务系统发货通知单明细",
  909. columnProp: "version",
  910. headerAlign: "center",
  911. align: "left",
  912. columnLabel: "Version",
  913. columnHidden: false,
  914. columnImage: false,
  915. columnSortable: false,
  916. sortLv: 0,
  917. status: true,
  918. fixed: '',
  919. columnWidth: 100
  920. },
  921. {
  922. userId: this.$store.state.user.name,
  923. functionId: 801001,
  924. serialNumber: '801001Table2Status',
  925. tableId: "801001Table2",
  926. tableName: "关务系统发货通知单明细",
  927. columnProp: "status",
  928. headerAlign: "center",
  929. align: "left",
  930. columnLabel: "Status",
  931. columnHidden: false,
  932. columnImage: false,
  933. columnSortable: false,
  934. sortLv: 0,
  935. status: true,
  936. fixed: '',
  937. columnWidth: 100
  938. },
  939. {
  940. userId: this.$store.state.user.name,
  941. functionId: 801001,
  942. serialNumber: '801001Table2Family',
  943. tableId: "801001Table2",
  944. tableName: "关务系统发货通知单明细",
  945. columnProp: "family",
  946. headerAlign: "center",
  947. align: "left",
  948. columnLabel: "Family",
  949. columnHidden: false,
  950. columnImage: false,
  951. columnSortable: false,
  952. sortLv: 0,
  953. status: true,
  954. fixed: '',
  955. columnWidth: 100
  956. },
  957. {
  958. userId: this.$store.state.user.name,
  959. functionId: 801001,
  960. serialNumber: '801001Table2Lt',
  961. tableId: "801001Table2",
  962. tableName: "关务系统发货通知单明细",
  963. columnProp: "lt",
  964. headerAlign: "center",
  965. align: "right",
  966. columnLabel: "LT (wks)",
  967. columnHidden: false,
  968. columnImage: false,
  969. columnSortable: false,
  970. sortLv: 0,
  971. status: true,
  972. fixed: '',
  973. columnWidth: 100
  974. },
  975. {
  976. userId: this.$store.state.user.name,
  977. functionId: 801001,
  978. serialNumber: '801001Table2CmcComment',
  979. tableId: "801001Table2",
  980. tableName: "关务系统发货通知单明细",
  981. columnProp: "cmcComment",
  982. headerAlign: "center",
  983. align: "left",
  984. columnLabel: "CMC Comment",
  985. columnHidden: false,
  986. columnImage: false,
  987. columnSortable: false,
  988. sortLv: 0,
  989. status: true,
  990. fixed: '',
  991. columnWidth: 100
  992. },
  993. {
  994. userId: this.$store.state.user.name,
  995. functionId: 801001,
  996. serialNumber: '801001Table2SaleType',
  997. tableId: "801001Table2",
  998. tableName: "关务系统发货通知单明细",
  999. columnProp: "saleType",
  1000. headerAlign: "center",
  1001. align: "left",
  1002. columnLabel: "内外销方式",
  1003. columnHidden: false,
  1004. columnImage: false,
  1005. columnSortable: false,
  1006. sortLv: 0,
  1007. status: true,
  1008. fixed: '',
  1009. columnWidth: 100
  1010. },
  1011. {
  1012. userId: this.$store.state.user.name,
  1013. functionId: 801001,
  1014. serialNumber: '801001Table2AwbBl',
  1015. tableId: "801001Table2",
  1016. tableName: "关务系统发货通知单明细",
  1017. columnProp: "awbBl",
  1018. headerAlign: "center",
  1019. align: "left",
  1020. columnLabel: "AWB/ BL#",
  1021. columnHidden: false,
  1022. columnImage: false,
  1023. columnSortable: false,
  1024. sortLv: 0,
  1025. status: true,
  1026. fixed: '',
  1027. columnWidth: 100
  1028. },
  1029. {
  1030. userId: this.$store.state.user.name,
  1031. functionId: 801001,
  1032. serialNumber: '801001Table2ShippingNumber',
  1033. tableId: "801001Table2",
  1034. tableName: "关务系统发货通知单明细",
  1035. columnProp: "shippingNumber",
  1036. headerAlign: "center",
  1037. align: "left",
  1038. columnLabel: "ShippingNumber",
  1039. columnHidden: false,
  1040. columnImage: false,
  1041. columnSortable: false,
  1042. sortLv: 0,
  1043. status: true,
  1044. fixed: '',
  1045. columnWidth: 120
  1046. },
  1047. {
  1048. userId: this.$store.state.user.name,
  1049. functionId: 801001,
  1050. serialNumber: '801001Table2ForwarderInfo',
  1051. tableId: "801001Table2",
  1052. tableName: "关务系统发货通知单明细",
  1053. columnProp: "forwarderInfo",
  1054. headerAlign: "center",
  1055. align: "left",
  1056. columnLabel: "Forwarder Info",
  1057. columnHidden: false,
  1058. columnImage: false,
  1059. columnSortable: false,
  1060. sortLv: 0,
  1061. status: true,
  1062. fixed: '',
  1063. columnWidth: 100
  1064. },
  1065. {
  1066. userId: this.$store.state.user.name,
  1067. functionId: 801001,
  1068. serialNumber: '801001Table2Currency',
  1069. tableId: "801001Table2",
  1070. tableName: "关务系统发货通知单明细",
  1071. columnProp: "currency",
  1072. headerAlign: "center",
  1073. align: "left",
  1074. columnLabel: "Currency",
  1075. columnHidden: false,
  1076. columnImage: false,
  1077. columnSortable: false,
  1078. sortLv: 0,
  1079. status: true,
  1080. fixed: '',
  1081. columnWidth: 100
  1082. },
  1083. {
  1084. userId: this.$store.state.user.name,
  1085. functionId: 801001,
  1086. serialNumber: '801001Table2Tp',
  1087. tableId: "801001Table2",
  1088. tableName: "关务系统发货通知单明细",
  1089. columnProp: "tp",
  1090. headerAlign: "center",
  1091. align: "right",
  1092. columnLabel: "TP",
  1093. columnHidden: false,
  1094. columnImage: false,
  1095. columnSortable: false,
  1096. sortLv: 0,
  1097. status: true,
  1098. fixed: '',
  1099. columnWidth: 80
  1100. },
  1101. {
  1102. userId: this.$store.state.user.name,
  1103. functionId: 801001,
  1104. serialNumber: '801001Table2TtlAmount',
  1105. tableId: "801001Table2",
  1106. tableName: "关务系统发货通知单明细",
  1107. columnProp: "ttlAmount",
  1108. headerAlign: "center",
  1109. align: "right",
  1110. columnLabel: "TTL Amount",
  1111. columnHidden: false,
  1112. columnImage: false,
  1113. columnSortable: false,
  1114. sortLv: 0,
  1115. status: true,
  1116. fixed: '',
  1117. columnWidth: 80
  1118. },
  1119. {
  1120. userId: this.$store.state.user.name,
  1121. functionId: 801001,
  1122. serialNumber: '801001Table2Remark',
  1123. tableId: "801001Table2",
  1124. tableName: "关务系统发货通知单明细",
  1125. columnProp: "vat",
  1126. headerAlign: "center",
  1127. align: "right",
  1128. columnLabel: "VAT",
  1129. columnHidden: false,
  1130. columnImage: false,
  1131. columnSortable: false,
  1132. sortLv: 0,
  1133. status: true,
  1134. fixed: '',
  1135. columnWidth: 100
  1136. },
  1137. {
  1138. userId: this.$store.state.user.name,
  1139. functionId: 801001,
  1140. serialNumber: '801001Table2SumPrice',
  1141. tableId: "801001Table2",
  1142. tableName: "关务系统发货通知单明细",
  1143. columnProp: "sumPrice",
  1144. headerAlign: "center",
  1145. align: "right",
  1146. columnLabel: "价税合计",
  1147. columnHidden: false,
  1148. columnImage: false,
  1149. columnSortable: false,
  1150. sortLv: 0,
  1151. status: true,
  1152. fixed: '',
  1153. columnWidth: 80
  1154. },
  1155. {
  1156. userId: this.$store.state.user.name,
  1157. functionId: 801001,
  1158. serialNumber: '801001Table2So',
  1159. tableId: "801001Table2",
  1160. tableName: "关务系统发货通知单明细",
  1161. columnProp: "so",
  1162. headerAlign: "center",
  1163. align: "left",
  1164. columnLabel: "SO",
  1165. columnHidden: false,
  1166. columnImage: false,
  1167. columnSortable: false,
  1168. sortLv: 0,
  1169. status: true,
  1170. fixed: '',
  1171. columnWidth: 100
  1172. },
  1173. {
  1174. userId: this.$store.state.user.name,
  1175. functionId: 801001,
  1176. serialNumber: '801001Table2Upc',
  1177. tableId: "801001Table2",
  1178. tableName: "关务系统发货通知单明细",
  1179. columnProp: "upc",
  1180. headerAlign: "center",
  1181. align: "left",
  1182. columnLabel: "UPC",
  1183. columnHidden: false,
  1184. columnImage: false,
  1185. columnSortable: false,
  1186. sortLv: 0,
  1187. status: true,
  1188. fixed: '',
  1189. columnWidth: 100
  1190. },
  1191. // {
  1192. // userId: this.$store.state.user.name,
  1193. // functionId: 801001,
  1194. // serialNumber: '801001Table2ErpDelItemNo',
  1195. // tableId: "801001Table2",
  1196. // tableName: "关务系统发货通知单明细",
  1197. // columnProp: "erpDelItemNo",
  1198. // headerAlign: "center",
  1199. // align: "right",
  1200. // columnLabel: "ERP发货单行号",
  1201. // columnHidden: false,
  1202. // columnImage: false,
  1203. // columnSortable: false,
  1204. // sortLv: 0,
  1205. // status: true,
  1206. // fixed: '',
  1207. // columnWidth: 60
  1208. // },
  1209. {
  1210. userId: this.$store.state.user.name,
  1211. functionId: 801001,
  1212. serialNumber: '801001Table2Remark',
  1213. tableId: "801001Table2",
  1214. tableName: "关务系统发货通知单明细",
  1215. columnProp: "remark",
  1216. headerAlign: "center",
  1217. align: "left",
  1218. columnLabel: "Remark",
  1219. columnHidden: false,
  1220. columnImage: false,
  1221. columnSortable: false,
  1222. sortLv: 0,
  1223. status: true,
  1224. fixed: '',
  1225. columnWidth: 300
  1226. },
  1227. {
  1228. userId: this.$store.state.user.name,
  1229. functionId: 801001,
  1230. serialNumber: '801001Table2Remark',
  1231. tableId: "801001Table2",
  1232. tableName: "关务系统发货通知单明细",
  1233. columnProp: "roll",
  1234. headerAlign: "center",
  1235. align: "right",
  1236. columnLabel: "Roll",
  1237. columnHidden: false,
  1238. columnImage: false,
  1239. columnSortable: false,
  1240. sortLv: 0,
  1241. status: true,
  1242. fixed: '',
  1243. columnWidth: 100
  1244. },
  1245. {
  1246. userId: this.$store.state.user.name,
  1247. functionId: 801001,
  1248. serialNumber: '801001Table2Remark',
  1249. tableId: "801001Table2",
  1250. tableName: "关务系统发货通知单明细",
  1251. columnProp: "carton",
  1252. headerAlign: "center",
  1253. align: "right",
  1254. columnLabel: "Carton",
  1255. columnHidden: false,
  1256. columnImage: false,
  1257. columnSortable: false,
  1258. sortLv: 0,
  1259. status: true,
  1260. fixed: '',
  1261. columnWidth: 100
  1262. },
  1263. ],
  1264. currentRow:{},
  1265. // 导出 start
  1266. exportData: [],
  1267. exportName: '发货通知单'+this.dayjs().format('YYYYMMDDHHmmss'),
  1268. exportHeader: ["发货通知单"],
  1269. exportFooter: [],
  1270. // 导出 end
  1271. declarationFlag:false,
  1272. customerData:{},
  1273. customerMap:new Map,
  1274. customerAddData:{},
  1275. declarationData:{
  1276. site:'',
  1277. customsOfficeCode:'',
  1278. inputCode:'',
  1279. localShipper:'',
  1280. localShipAddress:'',
  1281. shipType:'',
  1282. shipDate:'',
  1283. submitDate:'',
  1284. filingNo:'',
  1285. overseasShipper:'',
  1286. overseasAddress :'',
  1287. shippingMode:'',
  1288. shippingData:'',
  1289. deliverNo:'',
  1290. salesPartner:'',
  1291. regulatoryMethod:'',
  1292. dutyStatus:'',
  1293. permitNumber:'',
  1294. cmcInvoice:'',
  1295. salesArea:'',
  1296. receiveArea:'',
  1297. shippingPort:'',
  1298. exitPort:'',
  1299. documents:'',
  1300. remark:'',
  1301. packageType:'',
  1302. packageQty:'',
  1303. grossWeight:'',
  1304. netWeight:'',
  1305. paymentType:'',
  1306. shipPrice:'',
  1307. premium:'',
  1308. otherPrice:'',
  1309. specialRelationshipComfirm:'',
  1310. priceInfluenceConfirm:'',
  1311. royaltyPaymentsConfirm:'',
  1312. delNo:'',
  1313. palletWeight:'',
  1314. allWeight:'',
  1315. },
  1316. }
  1317. },
  1318. mounted() {
  1319. this.$nextTick(() => {
  1320. this.height = (window.innerHeight - 240)/2;
  1321. })
  1322. },
  1323. methods: {
  1324. // 每页数
  1325. sizeChangeHandle (val) {
  1326. this.pageSize = val
  1327. this.pageIndex = 1
  1328. this.searchTable()
  1329. },
  1330. // 当前页
  1331. currentChangeHandle (val) {
  1332. this.pageIndex = val
  1333. this.searchTable()
  1334. },
  1335. searchTable(){
  1336. this.searchData.limit = this.pageSize
  1337. this.searchData.page = this.pageIndex
  1338. searchEcssCoDelNotifyHeaderForDanZheng(this.searchData).then(({data}) => {
  1339. //区分请求成功和失败的状况
  1340. if (data && data.code == 0) {
  1341. this.dataList = data.page.list
  1342. this.pageIndex = data.page.currPage
  1343. this.pageSize = data.page.pageSize
  1344. this.totalPage = data.page.totalCount
  1345. if(this.dataList.length>0){
  1346. this.$refs.mainTable.setCurrentRow(this.dataList[0]);
  1347. this.changeData(this.dataList[0])
  1348. this.dataList.forEach(o => {
  1349. if (o.notifyStatus==='仓库已确认'&&!o.notifyDate) {
  1350. o.notifyDate='发货日期不确定'
  1351. }
  1352. });
  1353. }else {
  1354. this.changeData(null)
  1355. }
  1356. } else {
  1357. this.dataList = [];
  1358. }
  1359. });
  1360. },
  1361. cellStyle({row, column }) {
  1362. if (column.property === 'notifyDate' && row.notifyDate==='发货日期不确定') { // 根据列属性判断
  1363. return { color: '#ff5d03' };
  1364. }
  1365. return {};
  1366. },
  1367. changeData(row){
  1368. this.currentRow = JSON.parse(JSON.stringify(row));
  1369. if (this.currentRow.notifyDate==='发货日期不确定') {
  1370. this.currentRow.notifyDate=''
  1371. }
  1372. this.headerData=row;
  1373. this.refreshCurrentTabTable ();
  1374. },
  1375. refreshCurrentTabTable(){
  1376. if(this.currentRow===''||this.currentRow===null){
  1377. this.currentRow={site:'',delNo:''}
  1378. }
  1379. if(this.activeName==='detail'){
  1380. searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => {
  1381. //区分请求成功和失败的状况
  1382. if (data && data.code == 0) {
  1383. this.dataList2 = data.rows
  1384. } else {
  1385. this.dataList2 = [];
  1386. }
  1387. });
  1388. }
  1389. if(this.activeName==='pallet'){
  1390. // 刷新装箱明细组件
  1391. if (this.$refs.packingDetailTab) {
  1392. this.$refs.packingDetailTab.refresh();
  1393. }
  1394. }
  1395. },
  1396. tabClick (tab, event) {
  1397. // 刷新列表数据
  1398. this.refreshCurrentTabTable()
  1399. },
  1400. getBu () {
  1401. let tempData = {
  1402. username: this.$store.state.user.name,
  1403. }
  1404. getBuList(tempData).then(({data}) => {
  1405. if (data.code === 0) {
  1406. this.buList = data.row2
  1407. if (this.buList.length===1) {
  1408. this.searchData.buNo = this.buList[0].buNo;
  1409. }
  1410. }
  1411. })
  1412. },
  1413. changeToalPrice(row){
  1414. row.totalPrice=row.unitPrice*row.qty
  1415. },
  1416. declarationModel(row){
  1417. let indata=JSON.parse(JSON.stringify(row));
  1418. if (row.notifyDate==='发货日期不确定') {
  1419. indata.notifyDate=''
  1420. }
  1421. getDeclarationDefaultData(indata).then(({data}) => {
  1422. //区分请求成功和失败的状况
  1423. if (data && data.code === 0) {
  1424. this.declarationData=data.row
  1425. this.detailList=data.rows
  1426. /* this.customerData=data.customers
  1427. this.customerAddData = data.customerAdd
  1428. if (data.customerAdd && data.customerAdd.length > 0 && data.customers && data.customers.length > 0) {
  1429. this.declarationData.overseasAddress = this.declarationData.overseasAddress?this.declarationData.overseasAddress:data.customerAdd[0].cDeliverAdd
  1430. this.declarationData.overseasShipper = this.declarationData.overseasShipper?this.declarationData.overseasShipper:data.customers[0].ccontactname
  1431. } */
  1432. this.declarationFlag=true
  1433. /* this.customerData.forEach(o => {
  1434. if (!this.customerMap.has(o.ccontactname)) {
  1435. this.customerMap.set(o.ccontactname, o.cnative);
  1436. }
  1437. }); */
  1438. } else {
  1439. this.$alert(data.msg, '错误', {
  1440. confirmButtonText: '确定'
  1441. })
  1442. }
  1443. });
  1444. },
  1445. /* setDestination(){
  1446. this.detailList.forEach(o => o.destination=this.customerMap.get(this.declarationData.overseasShipper))
  1447. this.declarationData.receiveArea=this.customerMap.get(this.declarationData.overseasShipper)
  1448. this.declarationData.salesArea=this.customerMap.get(this.declarationData.overseasShipper)
  1449. }, */
  1450. saveDeclaration(){
  1451. // 防止重复点击
  1452. if(this.saveLoading) {
  1453. return false
  1454. }
  1455. if(this.detailList==null|| this.detailList.length<1){
  1456. this.$alert('不存在明细记录!', '错误', {
  1457. confirmButtonText: '确定'
  1458. })
  1459. return false
  1460. }
  1461. for (let i = 0; i <this.detailList.length ; i++) {
  1462. if(this.detailList[i].unitPrice==null||this.detailList[i].unitPrice==""||this.detailList[i].unitPrice<=0){
  1463. this.$alert('请输入正确的单价!', '错误', {
  1464. confirmButtonText: '确定'
  1465. })
  1466. return false
  1467. }
  1468. }
  1469. // 开始loading
  1470. this.saveLoading = true
  1471. this.declarationData.detailList=this.detailList
  1472. saveDeclaration(this.declarationData).then(({data}) => {
  1473. //区分请求成功和失败的状况
  1474. if (data && data.code === 0) {
  1475. this.declarationFlag=false
  1476. this.searchTable()
  1477. } else {
  1478. this.$alert(data.msg, '错误', {
  1479. confirmButtonText: '确定'
  1480. })
  1481. }
  1482. }).catch(error => {
  1483. // 处理请求异常
  1484. this.$alert('保存失败,请重试!', '错误', {
  1485. confirmButtonText: '确定'
  1486. })
  1487. console.error('保存报关单失败:', error)
  1488. }).finally(() => {
  1489. // 无论成功失败都要关闭loading
  1490. this.saveLoading = false
  1491. });
  1492. },
  1493. //导出excel
  1494. async createExportData() {
  1495. this.searchData.limit = -1
  1496. this.searchData.page = 1
  1497. await searchEcssCoDelNotifyHeaderForDanZheng(this.searchData).then(({data}) => {
  1498. this.exportList= data.page.list;
  1499. })
  1500. return this.exportList;
  1501. },
  1502. startDownload() {
  1503. // this.exportData = this.dataList
  1504. },
  1505. finishDownload() {
  1506. },
  1507. fields() {
  1508. let json = "{"
  1509. this.columnList1.forEach((item, index) => {
  1510. if (index == this.columnList1.length - 1) {
  1511. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1512. } else {
  1513. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1514. }
  1515. })
  1516. json += "}"
  1517. let s = eval("(" + json + ")")
  1518. return s
  1519. },
  1520. },
  1521. activated() {
  1522. this.searchTable()
  1523. },
  1524. created() {
  1525. this.getBu ()
  1526. }
  1527. }
  1528. </script>
  1529. <style scoped>
  1530. </style>