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.

3323 lines
117 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
3 months ago
2 months ago
1 year ago
11 months ago
1 year ago
1 month ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
6 months ago
5 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 month ago
2 months ago
10 months ago
1 year ago
10 months ago
1 year ago
6 months ago
1 year ago
1 year ago
1 year ago
1 year ago
6 months ago
1 year ago
1 month ago
8 months ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
11 months ago
11 months ago
1 year ago
11 months ago
1 year ago
5 months ago
1 year ago
5 months ago
1 year ago
6 months ago
5 months ago
6 months ago
1 year ago
6 months ago
1 year ago
3 months ago
1 year ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
6 months ago
1 year ago
1 year ago
1 month ago
12 months ago
8 months ago
6 months ago
9 months ago
6 months ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 year ago
12 months ago
1 year ago
1 month ago
1 year ago
1 year ago
1 year ago
1 month ago
1 year ago
5 months ago
1 year ago
1 year ago
1 month ago
2 months ago
1 month ago
1 year ago
11 months ago
8 months ago
1 year ago
8 months ago
12 months ago
1 month ago
12 months ago
1 year ago
3 months ago
2 months ago
1 year ago
1 year ago
1 year ago
1 month ago
1 year ago
6 months ago
3 months ago
1 year ago
1 year ago
3 months ago
2 months ago
1 year ago
1 year ago
1 year ago
11 months ago
6 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
3 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
6 months ago
1 year ago
6 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
6 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
6 months ago
3 months ago
1 year ago
8 months ago
1 year ago
1 year ago
8 months ago
1 month ago
1 year ago
6 months ago
12 months ago
1 year ago
1 year ago
1 year ago
3 months ago
1 year ago
1 year ago
1 month ago
1 year ago
1 year ago
1 month ago
2 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 month ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
6 months ago
6 months ago
2 months ago
2 months ago
5 months ago
5 months ago
3 months ago
4 months ago
6 months ago
1 year ago
3 months ago
2 months ago
1 year ago
2 months ago
6 months ago
2 months ago
1 year ago
2 months ago
6 months ago
2 months ago
1 year ago
2 months ago
6 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
3 months ago
3 months ago
3 months ago
1 year ago
3 months ago
3 months ago
3 months ago
1 year ago
3 months ago
3 months ago
1 year ago
3 months ago
1 year ago
5 months ago
5 months ago
5 months ago
6 months ago
1 year ago
1 year ago
1 year ago
1 year ago
3 months ago
3 months ago
1 year ago
3 months ago
3 months ago
3 months ago
1 year ago
3 months ago
3 months ago
1 year ago
3 months ago
1 year ago
3 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
1 year ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
6 months ago
1 month ago
1 month ago
1 month ago
1 month ago
8 months ago
8 months ago
1 year ago
9 months ago
1 year ago
1 year ago
1 year ago
6 months ago
6 months ago
1 month ago
1 year ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="60px" style="margin-top: 0px;">
  4. <el-form-item :label="'BU:'">
  5. <el-select v-model="searchData.buNo" placeholder="请选择" style="width: 80px">
  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="'通知单状态:'">
  22. <el-select filterable v-model="searchData.notifyStatus" style="width: 120px">
  23. <el-option label="全部" value=""></el-option>
  24. <el-option label="已计划" value="已计划"></el-option>
  25. <el-option label="已下达" value="已下达"></el-option>
  26. <el-option label="仓库已确认" value="仓库已确认"></el-option>
  27. <el-option label="已报关" value="已报关"></el-option>
  28. <el-option label="订单取消" value="订单取消"></el-option>
  29. </el-select>
  30. </el-form-item>
  31. <el-form-item :label="'ReadyDate'" >
  32. <el-date-picker
  33. style="width: 120px"
  34. v-model="searchData.startDate"
  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="'To'" >
  42. <el-date-picker
  43. style="width: 120px"
  44. v-model="searchData.endDate"
  45. type="date"
  46. format="yyyy-MM-dd"
  47. value-format="yyyy-MM-dd"
  48. placeholder="选择日期">
  49. </el-date-picker>
  50. </el-form-item>
  51. <el-form-item label="改单">
  52. <el-checkbox v-model="searchData.modifyData" true-label="true" false-label="false" @change="searchTable()"></el-checkbox>
  53. </el-form-item>
  54. <el-form-item label="FSC">
  55. <el-checkbox v-model="searchData.fscFlag" true-label="true" false-label="false" @change="searchTable()"></el-checkbox>
  56. </el-form-item>
  57. <el-form-item label="沃尔玛订单">
  58. <el-checkbox v-model="searchData.walMartOrderFlag" true-label="true" false-label="false" @change="searchTable()"></el-checkbox>
  59. </el-form-item>
  60. <el-form-item label="维护箱尺寸">
  61. <el-checkbox v-model="searchData.boxSizeFlag" true-label="true" false-label="false" @change="searchTable()"></el-checkbox>
  62. </el-form-item>
  63. <el-form-item :label="' '" >
  64. <el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'查询'}}</el-button>
  65. </el-form-item>
  66. <el-form-item :label="' '" >
  67. <el-button @click="importModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导入'}}</el-button>
  68. <el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button>
  69. </el-form-item><br>
  70. <el-form-item label=" ">
  71. <el-button @click="exportInvoiceList()" type="primary" style="margin-left: 2px">{{'导出发票'}}</el-button>
  72. </el-form-item>
  73. <el-form-item label=" ">
  74. <el-button @click="exportGoodsList()" type="primary" style="margin-left: 2px">{{'导出出口货物委托书'}}</el-button>
  75. </el-form-item>
  76. <el-form-item label=" ">
  77. <el-button @click="openCustomerInfoDialog()" type="primary" style="margin-left: 2px">{{'客户信息'}}</el-button>
  78. </el-form-item>
  79. </el-form>
  80. <el-table
  81. @row-click="changeData"
  82. highlight-current-row
  83. :height="height"
  84. :data="dataList"
  85. ref="mainTable" :cell-style="cellStyle"
  86. border :row-class-name="tableRowClassName"
  87. v-loading="dataListLoading"
  88. style="width: 100%;">
  89. <el-table-column
  90. header-align="center"
  91. align="center"
  92. width="140"
  93. fixed="left"
  94. label="操作">
  95. <template slot-scope="scope">
  96. <a type="text" size="small" @click="updateHeaderModelDo(scope.row)">修改</a>
  97. <a type="text" style="color: green" size="small" v-if="scope.row.notifyStatus==='已计划' && scope.row.notifyStatus!=='订单取消' && !xiadaLoading" @click="xiadaChoose(scope.row)">下达</a>
  98. <a type="text" style="color: orange" size="small" v-if="scope.row.notifyStatus==='已下达'&& scope.row.notifyStatus!=='订单取消'" @click="jihuaEcssDel(scope.row)">取消下达</a>
  99. <a type="text" style="color: green" size="small" v-if="scope.row.notifyStatus==='已下达' && scope.row.walMartOrderFlag==='Y'" @click="declarationCompleted(scope.row)">一键结单</a>
  100. <a type="text" style="color: red" size="small" v-if="scope.row.notifyStatus!=='订单取消'" @click="cancelDelHeader(scope.row)">废弃</a>
  101. <a type="text" style="color: green" size="small" v-if="scope.row.notifyStatus==='订单取消'" @click="recoverDelHeader(scope.row)">取消废弃</a>
  102. <a type="text" style="color: red" size="small" v-if="scope.row.notifyStatus==='已计划'&& scope.row.notifyStatus!=='订单取消'" @click="deleteDelHeader(scope.row)">删除</a>
  103. </template>
  104. </el-table-column>
  105. <el-table-column
  106. v-for="(item,index) in columnList1" :key="index"
  107. :sortable="item.columnSortable"
  108. :prop="item.columnProp"
  109. :header-align="item.headerAlign"
  110. :show-overflow-tooltip="item.showOverflowTooltip"
  111. :align="item.align"
  112. :fixed="item.fixed==''?false:item.fixed"
  113. :min-width="item.columnWidth"
  114. :label="item.columnLabel">
  115. <template slot-scope="scope">
  116. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  117. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  118. style="width: 100px; height: 80px"/></span>
  119. </template>
  120. </el-table-column>
  121. </el-table>
  122. <el-pagination
  123. @size-change="sizeChangeHandle"
  124. @current-change="currentChangeHandle"
  125. :current-page="pageIndex"
  126. :page-sizes="[20, 50, 100, 1000]"
  127. :page-size="pageSize"
  128. :total="totalPage"
  129. layout="total, sizes, prev, pager, next, jumper">
  130. </el-pagination>
  131. <el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick" >
  132. <el-tab-pane :label="currentRow.cmcInvoice+'明细'" name="detail">
  133. <el-button v-show="currentRow.notifyStatus!=='订单取消'" @click="openCreateDetailModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button>
  134. <el-button v-show="currentRow.notifyStatus!=='订单取消'" @click="importDetailModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'改单导入'}}</el-button>
  135. <el-button v-show="currentRow.notifyStatus!=='订单取消'" @click="importUpcModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'UPC导入'}}</el-button>
  136. <el-button v-show="currentRow.notifyStatus!=='订单取消'" @click="fixTtlAmountHandle()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'TTL Amount修正'}}</el-button>
  137. <el-table ref="detailTable"
  138. :height="height"
  139. :data="dataList2" :cell-style="cellStyleDetail"
  140. border show-summary :summary-method="getSummaries"
  141. style="width: 100%;">
  142. <el-table-column
  143. v-for="(item,index) in columnList2" :key="index"
  144. :sortable="item.columnSortable"
  145. :prop="item.columnProp"
  146. :header-align="item.headerAlign"
  147. :show-overflow-tooltip="item.showOverflowTooltip"
  148. :align="item.align"
  149. :fixed="item.fixed==''?false:item.fixed"
  150. :min-width="item.columnWidth"
  151. :label="item.columnLabel">
  152. <template slot-scope="scope">
  153. <template v-if="item.columnProp === 'ttlAmount' || item.columnProp === 'sumPrice'">
  154. <span>{{!!scope.row[item.columnProp]?scope.row[item.columnProp].toFixed(2):''}}</span>
  155. </template>
  156. <!-- PN字段特殊处理添加提示信息 -->
  157. <template v-else-if="item.columnProp === 'pn'">
  158. <el-tooltip
  159. v-if="isPnDataIncomplete(scope.row)"
  160. content="品名未维护,点击跳转到维护页面"
  161. placement="top">
  162. <span
  163. v-if="!item.columnHidden"
  164. class="clickable-pn"
  165. @click="navigateToPartHsCode(scope.row.pn)">
  166. {{ scope.row[item.columnProp] }}
  167. </span>
  168. </el-tooltip>
  169. <span v-else-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  170. </template>
  171. <template v-else>
  172. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  173. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  174. </template>
  175. </template>
  176. </el-table-column>
  177. <el-table-column
  178. fixed="left"
  179. header-align="center"
  180. align="center"
  181. width="100" v-if="currentRow.notifyStatus!=='订单取消'"
  182. label="操作">
  183. <template slot-scope="scope">
  184. <a v-if="currentRow.notifyStatus!=='订单取消'&& scope.row.qty!==0" type="text" size="small" @click="openUpdateDetailModel(scope.row)">修改</a>
  185. <a v-if="currentRow.notifyStatus!=='订单取消' && scope.row.qty!==0" style="color: red" type="text" size="small" @click="deleteDelDetail(scope.row)">取消</a>
  186. </template>
  187. </el-table-column>
  188. </el-table>
  189. </el-tab-pane>
  190. <el-tab-pane label="装箱明细" name="pallet">
  191. <packing-detail-tab
  192. ref="packingDetailTab"
  193. :current-row="currentRow"
  194. :height="height"
  195. :show-actions="false">
  196. </packing-detail-tab>
  197. </el-tab-pane>
  198. <el-tab-pane label="UPC明细" name="upcDetail" v-if="dataList3.length > 0">
  199. <el-button
  200. @click="deleteAllUpcData()"
  201. type="danger"
  202. style="margin-bottom: 2px;">
  203. 一键删除
  204. </el-button>
  205. <el-table
  206. ref="upcTable"
  207. :height="height"
  208. :data="dataList3"
  209. :span-method="arraySpanMethod"
  210. border
  211. style="width: 100%;">
  212. <el-table-column
  213. prop="cartonNo"
  214. label="箱号"
  215. width="120"
  216. align="center"
  217. header-align="center">
  218. </el-table-column>
  219. <el-table-column
  220. prop="so"
  221. label="SO"
  222. width="120"
  223. align="center"
  224. header-align="center">
  225. </el-table-column>
  226. <el-table-column
  227. prop="pn"
  228. label="P/N"
  229. min-width="150"
  230. align="left"
  231. header-align="center">
  232. </el-table-column>
  233. <el-table-column
  234. prop="description"
  235. label="Description"
  236. min-width="200"
  237. align="left"
  238. header-align="center">
  239. </el-table-column>
  240. <el-table-column
  241. prop="upc"
  242. label="UPC"
  243. width="150"
  244. align="center"
  245. header-align="center">
  246. </el-table-column>
  247. <el-table-column
  248. prop="qty"
  249. label="Qty"
  250. width="100"
  251. align="center"
  252. header-align="center">
  253. </el-table-column>
  254. </el-table>
  255. </el-tab-pane>
  256. <el-tab-pane label="相关文档" name="codelnotifyDocument">
  257. <oss-components label="申请单号" style="margin-top: 5px" height="44vh" :columns="ossColumns"
  258. :order-ref1="currentRow.site" :order-ref2="currentRow.delNo" :codelnotifyFlag="'1'"
  259. :rfq-no="currentRow.delNo">
  260. </oss-components>
  261. </el-tab-pane>
  262. </el-tabs>
  263. <el-dialog title="编辑发货通知单" :close-on-click-modal="false" v-drag :visible.sync="updateHeaderModelFlag" width="672px">
  264. <el-form label-position="top" style="margin-left: 5px;margin-top: -5px;">
  265. <el-row :gutter="20">
  266. <el-col :span="6">
  267. <el-form-item :label="'BU'" >
  268. <el-input v-model="updateHeaderModel.buDesc" disabled ></el-input>
  269. </el-form-item>
  270. </el-col>
  271. <el-col :span="6">
  272. <el-form-item :label="'CMC Invoice'" >
  273. <el-input v-model="updateHeaderModel.cmcInvoice" disabled ></el-input>
  274. </el-form-item>
  275. </el-col>
  276. <el-col :span="6">
  277. <el-form-item :label="'发货通知单号'" >
  278. <el-input v-model="updateHeaderModel.delNo" disabled ></el-input>
  279. </el-form-item>
  280. </el-col>
  281. <el-col :span="6">
  282. <el-form-item :label="'ReadyDate'" >
  283. <el-date-picker
  284. style="width: 145px"
  285. v-model="updateHeaderModel.readyDate"
  286. type="date"
  287. format="yyyy-MM-dd"
  288. value-format="yyyy-MM-dd"
  289. placeholder="选择日期">
  290. </el-date-picker>
  291. </el-form-item>
  292. </el-col>
  293. </el-row>
  294. <el-row :gutter="20">
  295. <el-col :span="6">
  296. <el-form-item :label="'ShippingMode'" >
  297. <el-input v-model="updateHeaderModel.shippingMode" ></el-input>
  298. </el-form-item>
  299. </el-col>
  300. <el-col :span="12">
  301. <el-form-item :label="'Destination'" >
  302. <el-input v-model="updateHeaderModel.destination" ></el-input>
  303. </el-form-item>
  304. </el-col>
  305. <el-col :span="6">
  306. <el-form-item :label="'发货日期'" >
  307. <el-date-picker
  308. style="width: 145px"
  309. v-model="updateHeaderModel.notifyDate"
  310. disabled
  311. type="date"
  312. format="yyyy-MM-dd"
  313. value-format="yyyy-MM-dd"
  314. placeholder="选择日期">
  315. </el-date-picker>
  316. </el-form-item>
  317. </el-col>
  318. </el-row>
  319. <el-row :gutter="20">
  320. <el-col :span="24">
  321. <el-form-item :label="'Remark'" >
  322. <el-input v-model="updateHeaderModel.remark" ></el-input>
  323. </el-form-item>
  324. </el-col>
  325. </el-row>
  326. </el-form>
  327. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  328. <el-button type="primary" @click="doUpdateHeader()">保存</el-button>
  329. <el-button type="primary" @click="updateHeaderModelFlag=false">关闭</el-button>
  330. </el-footer>
  331. </el-dialog>
  332. <el-dialog title="编辑发货通知单明细" :close-on-click-modal="false" v-drag :visible.sync="updateDetailModelFlag" width="750px">
  333. <el-form label-position="top" style="margin-left: 7px;margin-top: -5px;">
  334. <el-row :gutter="20">
  335. <el-col :span="6">
  336. <el-form-item :label="'行号'" >
  337. <el-input v-model="updateDetailModel.itemNo" style="text-align: right" disabled ></el-input>
  338. </el-form-item>
  339. </el-col>
  340. <el-col :span="6">
  341. <el-form-item :label="'PN'">
  342. <span slot="label" @click="queryComponentPartModal"><a herf="#">PN</a></span>
  343. <el-input v-model="updateDetailModel.pn" ></el-input>
  344. </el-form-item>
  345. </el-col>
  346. <el-col :span="12">
  347. <el-form-item :label="'Description'" >
  348. <el-input v-model="updateDetailModel.partDescription" ></el-input>
  349. </el-form-item>
  350. </el-col>
  351. <el-col :span="6">
  352. <el-form-item :label="'Qty (pcs)'" >
  353. <el-input v-model="updateDetailModel.qty" type="number" @input="calculateAmounts"></el-input>
  354. </el-form-item>
  355. </el-col>
  356. <el-col :span="6">
  357. <el-form-item :label="'销售订单号'" >
  358. <el-input v-model="updateDetailModel.salesOrder" ></el-input>
  359. </el-form-item>
  360. </el-col>
  361. <el-col :span="6">
  362. <el-form-item :label="'客户采购单号'" >
  363. <el-input v-model="updateDetailModel.customerPO" ></el-input>
  364. </el-form-item>
  365. </el-col>
  366. <el-col :span="6">
  367. <el-form-item :label="'Version'" >
  368. <el-input v-model="updateDetailModel.version" ></el-input>
  369. </el-form-item>
  370. </el-col>
  371. <el-col :span="6">
  372. <el-form-item :label="'Status'" >
  373. <el-input v-model="updateDetailModel.status" ></el-input>
  374. </el-form-item>
  375. </el-col>
  376. <el-col :span="6">
  377. <el-form-item :label="'Family'" >
  378. <el-input v-model="updateDetailModel.family" ></el-input>
  379. </el-form-item>
  380. </el-col>
  381. <el-col :span="6">
  382. <el-form-item :label="'LT (wks)'" >
  383. <el-input v-model="updateDetailModel.lt" type="number" ></el-input>
  384. </el-form-item>
  385. </el-col>
  386. <el-col :span="6">
  387. <el-form-item :label="'CMC Comment'" >
  388. <el-input v-model="updateDetailModel.cmcComment" ></el-input>
  389. </el-form-item>
  390. </el-col>
  391. <el-col :span="6">
  392. <el-form-item :label="'内外销方式'" >
  393. <el-input v-model="updateDetailModel.saleType" ></el-input>
  394. </el-form-item>
  395. </el-col>
  396. <el-col :span="6">
  397. <el-form-item :label="'AWB/ BL#'" >
  398. <el-input v-model="updateDetailModel.awbBl" ></el-input>
  399. </el-form-item>
  400. </el-col>
  401. <el-col :span="6">
  402. <el-form-item :label="'ShippingNumber'" >
  403. <el-input v-model="updateDetailModel.shippingNumber" ></el-input>
  404. </el-form-item>
  405. </el-col>
  406. <el-col :span="6">
  407. <el-form-item :label="'Forwarder Info'" >
  408. <el-input v-model="updateDetailModel.forwarderInfo" ></el-input>
  409. </el-form-item>
  410. </el-col>
  411. <el-col :span="6">
  412. <el-form-item :label="'Currency'" >
  413. <el-input v-model="updateDetailModel.currency" ></el-input>
  414. </el-form-item>
  415. </el-col>
  416. <el-col :span="6">
  417. <el-form-item :label="'TP'" >
  418. <el-input v-model="updateDetailModel.tp" type="number" @input="calculateAmounts"></el-input>
  419. </el-form-item>
  420. </el-col>
  421. <el-col :span="6">
  422. <el-form-item :label="'TTL Amount'" >
  423. <el-input v-model="updateDetailModel.ttlAmount" type="number" ></el-input>
  424. </el-form-item>
  425. </el-col>
  426. <el-col :span="6">
  427. <el-form-item :label="'VAT'" >
  428. <el-input v-model="updateDetailModel.vat" @input="calculateAmounts"></el-input>
  429. </el-form-item>
  430. </el-col>
  431. <el-col :span="6">
  432. <el-form-item :label="'价税合计'" >
  433. <el-input v-model="updateDetailModel.sumPrice" type="number" ></el-input>
  434. </el-form-item>
  435. </el-col>
  436. <el-col :span="6">
  437. <el-form-item :label="'SO'" >
  438. <el-input v-model="updateDetailModel.so" ></el-input>
  439. </el-form-item>
  440. </el-col>
  441. <el-col :span="6">
  442. <el-form-item :label="'UPC'" >
  443. <el-input v-model="updateDetailModel.upc" ></el-input>
  444. </el-form-item>
  445. </el-col>
  446. <el-col :span="6">
  447. <el-form-item :label="'Roll'" >
  448. <el-input v-model="updateDetailModel.roll" ></el-input>
  449. </el-form-item>
  450. </el-col>
  451. <el-col :span="6">
  452. <el-form-item :label="'Carton'" >
  453. <el-input v-model="updateDetailModel.carton" ></el-input>
  454. </el-form-item>
  455. </el-col>
  456. <el-col :span="18">
  457. <el-form-item :label="'Remark'" >
  458. <el-input v-model="updateDetailModel.remark" ></el-input>
  459. </el-form-item>
  460. </el-col>
  461. </el-row>
  462. </el-form>
  463. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  464. <el-button type="primary" @click="doUpdateDetail()" :loading="updateDetailLoading" :disabled="updateDetailLoading">
  465. {{ updateDetailLoading ? '保存中...' : '保存' }}
  466. </el-button>
  467. <el-button type="primary" @click="updateDetailModelFlag=false" :disabled="updateDetailLoading">关闭</el-button>
  468. </el-footer>
  469. </el-dialog>
  470. <el-dialog title="订单确认" :close-on-click-modal="false" v-drag :visible.sync="walMartOrderDialog" width="200px">
  471. <el-form label-position="top" style="margin-left: 36px;margin-top: 10px;">
  472. <el-row :gutter="20">
  473. <el-col :span="24">
  474. <el-form-item v-if="currentRow.buNo=='03-RFID'" :label="'沃尔玛订单'" >
  475. <el-radio v-model="walMartOrderFlag" label="Y"></el-radio>
  476. <el-radio v-model="walMartOrderFlag" label="N"></el-radio>
  477. </el-form-item>
  478. </el-col>
  479. <el-col :span="24">
  480. <el-form-item v-if="currentRow.buNo=='03-RFID'" :label="'FSC'" >
  481. <el-radio v-model="fscFlag" label="Y"></el-radio>
  482. <el-radio v-model="fscFlag" label="N"></el-radio>
  483. </el-form-item>
  484. </el-col>
  485. <el-col :span="24">
  486. <el-form-item :label="'维护箱尺寸'" >
  487. <el-radio v-model="boxSizeFlag" label="Y"></el-radio>
  488. <el-radio v-model="boxSizeFlag" label="N"></el-radio>
  489. </el-form-item>
  490. </el-col>
  491. </el-row>
  492. </el-form>
  493. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  494. <el-button type="primary" @click="xiadaEcssDel" :loading="xiadaLoading">
  495. {{ xiadaLoading ? '下达中...' : '确定' }}
  496. </el-button>
  497. <el-button type="primary" @click="walMartOrderDialog=false" :disabled="xiadaLoading">关闭</el-button>
  498. </el-footer>
  499. </el-dialog>
  500. <!-- 导入 -->
  501. <del-upload-excel ref="delUploadExcel" @refreshTable="searchTable" v-drag></del-upload-excel>
  502. <!-- 导入 -->
  503. <del-detail-upload-excel ref="delDetailUploadExcel" @refreshTable="searchTable" v-drag></del-detail-upload-excel>
  504. <!-- UPC导入 -->
  505. <upc-upload-excel ref="upcUploadExcel" @refreshTable="searchTable" v-drag></upc-upload-excel>
  506. <!--列表的组件-->
  507. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  508. <el-dialog title="物料清单" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="componentPartModelFlag" width="700px">
  509. <el-form :inline="true" label-position="top" :model="componentPartData">
  510. <el-form-item :label="'PN'">
  511. <el-input v-model="componentPartData.sku" clearable style="width: 120px"></el-input>
  512. </el-form-item>
  513. <el-form-item :label="'物料编码'">
  514. <el-input v-model="componentPartData.partNo" clearable style="width: 120px"></el-input>
  515. </el-form-item>
  516. <el-form-item :label="'物料描述'">
  517. <el-input v-model="componentPartData.partDesc" clearable style="width: 120px"></el-input>
  518. </el-form-item>
  519. <el-form-item :label="' '">
  520. <el-button type="primary" @click="queryComponentPartList">查询</el-button>
  521. </el-form-item>
  522. </el-form>
  523. <el-table
  524. :height="250"
  525. :data="componentPartList"
  526. @row-dblclick="getComponentRowData"
  527. border
  528. style="width: 100%;">
  529. <el-table-column
  530. v-for="(item,index) in componentPartColumnList" :key="index"
  531. :sortable="item.columnSortable"
  532. :prop="item.columnProp"
  533. :header-align="item.headerAlign"
  534. :show-overflow-tooltip="item.showOverflowTooltip"
  535. :align="item.align"
  536. :fixed="item.fixed==''?false:item.fixed"
  537. :min-width="item.columnWidth"
  538. :label="item.columnLabel">
  539. <template slot-scope="scope">
  540. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  541. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  542. </template>
  543. </el-table-column>
  544. </el-table>
  545. <!-- 分页插件 -->
  546. <el-pagination
  547. @size-change="sizeChangeHandle3"
  548. @current-change="currentChangeHandle3"
  549. :current-page="pageIndex3"
  550. :page-sizes="[20, 50, 100, 200, 500]"
  551. :page-size="pageSize3"
  552. :total="totalPage3"
  553. layout="total, sizes, prev, pager, next, jumper">
  554. </el-pagination>
  555. <el-footer style="height:35px;margin-top:10px;text-align:center">
  556. <el-button type="primary" @click="componentPartModelFlag = false">关闭</el-button>
  557. </el-footer>
  558. </el-dialog>
  559. <el-dialog title="导出发票" :close-on-click-modal="false" v-drag :visible.sync="exportInvoiceFlag" width="450px">
  560. <el-form label-position="top" style="margin-left: 2px;margin-top: 10px;">
  561. <el-row :gutter="20">
  562. <el-col :span="24">
  563. <el-form-item :label="''" >
  564. <template #label>
  565. <span slot="label" style="" class="big-label">
  566. <a href="#" @click="openTemplate('发票')">发票模版</a>
  567. </span>
  568. </template>
  569. <el-input v-model="exportInvoice.templateName" disabled ></el-input>
  570. </el-form-item>
  571. </el-col>
  572. <el-col :span="12" >
  573. <el-form-item :label="''" >
  574. <el-checkbox v-model="exportInvoice.hsCodeDesc">品名</el-checkbox>
  575. </el-form-item>
  576. </el-col>
  577. <el-col :span="12" >
  578. <el-form-item :label="''" >
  579. <el-checkbox v-model="exportInvoice.hsCodeFlag">Hs Code</el-checkbox>
  580. </el-form-item>
  581. </el-col>
  582. <el-col :span="12" >
  583. <el-form-item :label="''" >
  584. <el-checkbox v-model="exportInvoice.contractFlag">合同</el-checkbox>
  585. </el-form-item>
  586. </el-col>
  587. <el-col :span="12" >
  588. <el-form-item :label="''" >
  589. <el-checkbox v-model="exportInvoice.goodsLabel">货物明细</el-checkbox>
  590. </el-form-item>
  591. </el-col>
  592. <el-col :span="12">
  593. <el-form-item :label="'品名类型'" >
  594. <el-radio v-model="exportInvoice.hsCodeDescType" label="Y">中文</el-radio>
  595. <el-radio v-model="exportInvoice.hsCodeDescType" label="N">英文</el-radio>
  596. </el-form-item>
  597. </el-col>
  598. <el-col :span="12">
  599. <el-form-item :label="' '" >
  600. <el-checkbox v-model="exportInvoice.showWeight">显示毛净重</el-checkbox>
  601. </el-form-item>
  602. </el-col>
  603. <el-col :span="12">
  604. <el-form-item :label="'RFID Base Material'" >
  605. <el-checkbox v-model="exportInvoice.material"></el-checkbox>
  606. </el-form-item>
  607. </el-col>
  608. <el-col :span="12">
  609. <el-form-item :label="'HS Code'" >
  610. <el-input :disabled="!exportInvoice.material" v-model="exportInvoice.hsCode"></el-input>
  611. </el-form-item>
  612. </el-col>
  613. <el-col :span="12">
  614. <el-form-item :label="'Non-reusable plastic packaging'" >
  615. <el-checkbox v-model="exportInvoice.packaging"></el-checkbox>
  616. </el-form-item>
  617. </el-col>
  618. <el-col :span="12">
  619. <el-form-item :label="'plastic packaging'" >
  620. <el-input :disabled="!exportInvoice.packaging" v-model="exportInvoice.kgs"></el-input>
  621. </el-form-item>
  622. </el-col>
  623. <el-col :span="12" v-show="currentRow.buNo==='01-Label' || currentRow.buNo==='03-RFID'">
  624. <el-form-item :label="'制造地'" >
  625. <el-input v-model="exportInvoice.origin"></el-input>
  626. </el-form-item>
  627. </el-col>
  628. <el-col :span="24" style="">
  629. <el-form-item :label="'备注'" >
  630. <el-input type="textarea" :rows="3" v-model="exportInvoice.fpremark"></el-input>
  631. </el-form-item>
  632. </el-col>
  633. </el-row>
  634. </el-form>
  635. <el-table v-show="currentRow.buNo==='03-RFID'"
  636. :height="240"
  637. :data="notifyPartDetailList"
  638. stripe
  639. highlight-current-row
  640. border :row-style="{ height: '30px' }"
  641. style="width: 100%;margin-top: 60px" class="zxClass">
  642. <el-table-column
  643. prop="pn"
  644. header-align="center"
  645. align="center"
  646. label="PN">
  647. </el-table-column>
  648. <el-table-column
  649. prop="ehundred"
  650. header-align="center"
  651. align="center"
  652. label="E100">
  653. <template slot-scope="scope">
  654. <el-input v-model="scope.row.ehundred" style="width: 100px;"></el-input>
  655. </template>
  656. </el-table-column>
  657. <el-table-column
  658. prop="lossratio"
  659. header-align="center"
  660. align="center"
  661. label="纯FSC纸重量损耗">
  662. <template slot-scope="scope">
  663. <el-input v-model="scope.row.lossratio" style="width: 100px;"></el-input>
  664. </template>
  665. </el-table-column>
  666. </el-table>
  667. <el-footer style="height:40px;margin-top: 60px;text-align:center">
  668. <el-button type="primary" @click="downloadInvoice()">确定</el-button>
  669. <el-button type="primary" @click="exportInvoiceFlag=false">关闭</el-button>
  670. </el-footer>
  671. </el-dialog>
  672. <el-dialog title="导出出口货物委托书" :close-on-click-modal="false" v-drag :visible.sync="exportGoodsFlag" width="500px">
  673. <el-form label-position="top" style="margin-left: 7px;margin-top: 10px;">
  674. <el-row :gutter="20">
  675. <el-col :span="12">
  676. <el-form-item :label="'品名类型'" >
  677. <el-radio v-model="exportGoods.hsCodeDescType" label="Y">中文</el-radio>
  678. <el-radio v-model="exportGoods.hsCodeDescType" label="N">英文</el-radio>
  679. </el-form-item>
  680. </el-col>
  681. <el-col :span="12">
  682. <el-form-item :label="'贸易方式'" >
  683. <el-input v-model="exportGoods.salesMethod"></el-input>
  684. </el-form-item>
  685. </el-col>
  686. <el-col :span="12">
  687. <el-form-item :label="'币制'" >
  688. <el-input v-model="exportGoods.currency"></el-input>
  689. </el-form-item>
  690. </el-col>
  691. <el-col :span="12">
  692. <el-form-item :label="'货物产地'" >
  693. <el-input v-model="exportGoods.madeArea"></el-input>
  694. </el-form-item>
  695. </el-col>
  696. <el-col :span="12">
  697. <el-form-item :label="'发货港'" >
  698. <el-input v-model="exportGoods.sendPort"></el-input>
  699. </el-form-item>
  700. </el-col>
  701. <el-col :span="12">
  702. <el-form-item :label="'唛头'" >
  703. <el-input v-model="exportGoods.voyage"></el-input>
  704. </el-form-item>
  705. </el-col>
  706. <el-col :span="12">
  707. <el-form-item :label="'提/送货日期'" >
  708. <el-input v-model="exportGoods.deliveryGoodsDate"></el-input>
  709. </el-form-item>
  710. </el-col>
  711. <el-col :span="12">
  712. <el-form-item :label="'船期'" >
  713. <el-input v-model="exportGoods.shippingDate"></el-input>
  714. </el-form-item>
  715. </el-col>
  716. <el-col :span="24">
  717. <el-form-item :label="'发货人'" >
  718. <el-input type="textarea"
  719. :rows="4" v-model="exportGoods.shipper"></el-input>
  720. </el-form-item>
  721. </el-col>
  722. </el-row>
  723. </el-form>
  724. <el-footer style="height:40px;margin-top: 80px;text-align:center">
  725. <el-button type="primary" @click="downloadExportGoods()">确定</el-button>
  726. <el-button type="primary" @click="exportGoodsFlag=false">关闭</el-button>
  727. </el-footer>
  728. </el-dialog>
  729. <el-dialog title="模版" @close="closeTemplateDialog" @open="openTemplateDialog" :visible.sync="templateFlag" width="559px" v-drag>
  730. <el-form inline="inline" label-position="top" :model="templateData" style="margin-left: 7px;margin-top: -5px;">
  731. <el-form-item label="模版名称">
  732. <el-input v-model="templateData.name" clearable style="width: 110px"></el-input>
  733. </el-form-item>
  734. <el-form-item label=" ">
  735. <el-button type="primary" style="padding: 3px 12px" @click="searchTemplateList()">查询</el-button>
  736. </el-form-item>
  737. </el-form>
  738. <el-table
  739. :height="height + 110"
  740. :data="templateList"
  741. stripe
  742. highlight-current-row
  743. border
  744. @row-dblclick="templateRowDblclick"
  745. style="width: 100%;">
  746. <el-table-column
  747. prop="buNo"
  748. header-align="center"
  749. align="center"
  750. label="BuNo">
  751. </el-table-column>
  752. <el-table-column
  753. prop="name"
  754. header-align="center"
  755. align="center"
  756. label="模版名称">
  757. </el-table-column>
  758. <el-table-column
  759. prop="shippingMode"
  760. header-align="center"
  761. align="center"
  762. label="运输方式">
  763. </el-table-column>
  764. </el-table>
  765. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  766. <el-button @click="templateFlag = false">关闭</el-button>
  767. </el-footer>
  768. </el-dialog>
  769. <!-- 客户信息编辑对话框 -->
  770. <el-dialog title="编辑客户信息" :close-on-click-modal="false" v-drag :visible.sync="customerInfoDialogFlag" width="600px">
  771. <el-form label-position="top" style="margin-left: 7px; margin-top: -5px;">
  772. <el-row :gutter="20">
  773. <el-col :span="16">
  774. <el-form-item label="客户名称(Customer Name)">
  775. <el-input
  776. v-model="customerInfoModel.customerName"
  777. style="cursor: pointer;">
  778. </el-input>
  779. </el-form-item>
  780. </el-col>
  781. <el-col :span="8">
  782. <el-form-item label="贸易国(Sales Area)">
  783. <el-input v-model="customerInfoModel.salesArea" placeholder="请输入贸易国"></el-input>
  784. </el-form-item>
  785. </el-col>
  786. </el-row>
  787. <el-row :gutter="20">
  788. <el-col :span="24">
  789. <el-form-item label="客户地址(Local Ship Address)">
  790. <el-input v-model="customerInfoModel.localShipAddress"></el-input>
  791. </el-form-item>
  792. </el-col>
  793. </el-row>
  794. <el-row :gutter="20">
  795. <el-col :span="16">
  796. <el-form-item label="收货单位(Overseas Shipper)">
  797. <el-input v-model="customerInfoModel.overseasShipper"></el-input>
  798. </el-form-item>
  799. </el-col>
  800. <el-col :span="8">
  801. <el-form-item label="运抵国(Cnative)">
  802. <el-input v-model="customerInfoModel.cnative" placeholder="请输入运抵国"></el-input>
  803. </el-form-item>
  804. </el-col>
  805. </el-row>
  806. <el-row :gutter="20">
  807. <el-col :span="24">
  808. <el-form-item label="收货单位地址(Overseas Address)">
  809. <el-input v-model="customerInfoModel.overseasAddress">
  810. </el-input>
  811. </el-form-item>
  812. </el-col>
  813. </el-row>
  814. <el-row :gutter="20">
  815. <el-col :span="24">
  816. <el-form-item label="模板名称">
  817. <el-input
  818. v-model="customerInfoModel.templateName"
  819. placeholder="请输入模板名称(用于另存为新的客户模版)">
  820. <el-button
  821. slot="append"
  822. type="success"
  823. :disabled="!customerInfoModel.templateName || !customerInfoModel.templateName.trim()"
  824. :class="{ 'fake-disabled': !customerInfoModel.templateName }"
  825. @click="saveAsTemplate">
  826. 另存为
  827. </el-button>
  828. </el-input>
  829. </el-form-item>
  830. </el-col>
  831. </el-row>
  832. </el-form>
  833. <el-footer style="height:40px; margin-top: 10px; text-align:center">
  834. <el-button type="primary" @click="updateCustomerInfo('')">仅保存客户信息</el-button>
  835. <el-button type="primary" @click="updateCustomerInfo(customerInfoModel.templateNo)">保存并修改模版</el-button>
  836. <el-button @click="customerInfoDialogFlag = false">关闭</el-button>
  837. </el-footer>
  838. </el-dialog>
  839. </div>
  840. </template>
  841. <script>
  842. import Chooselist from '@/views/modules/common/Chooselist_eam'
  843. import delUploadExcel from "./del_upload_excel.vue";
  844. import delDetailUploadExcel from "./del_detail_upload_excel.vue";
  845. import upcUploadExcel from "./upc_upload_excel.vue";
  846. import PackingDetailTab from "./components/PackingDetailTab.vue";
  847. import {} from "@/api/sysLanguage.js"
  848. import { getTableUserListLanguage} from "@/api/table.js"
  849. import {getTableDefaultListLanguage} from "../../../api/table";
  850. import excel from "@/utils/excel-util.js";
  851. import {
  852. searchEcssCoDelNotifyHeader,
  853. searchEcssCoDelNotifyDetail,
  854. updateEcssDelHeader,
  855. updateCustomerInfo,
  856. deleteEcssDelHeader,
  857. cancelEcssDelHeader,
  858. recoverEcssDelHeader,
  859. changeEcssDelStatus,
  860. updateEcssDelDetail,
  861. deleteEcssDelDetail,
  862. searchCoDelPalletDataNew,
  863. queryPartListAll,
  864. searchTemplateList,
  865. getCustomerList,
  866. getCustomers,
  867. getCustomerAdd,
  868. getNotifyPartDetail,
  869. fixTtlAmount,
  870. searchUpcImportData,
  871. deleteUpcImportData,
  872. updateCustomerTemplate
  873. }from "@/api/ecss/ecss.js"
  874. import {getBuList}from '@/api/factory/site.js'
  875. import ExportUtil from "@/utils/export";
  876. import OssComponents from '../oss/ossComponents.vue'
  877. export default {
  878. name: "null",
  879. components:{
  880. OssComponents,
  881. delUploadExcel,
  882. delDetailUploadExcel,
  883. upcUploadExcel,
  884. Chooselist,
  885. PackingDetailTab,
  886. },
  887. data() {
  888. return {
  889. pageIndex: 1,
  890. pageSize: 100,
  891. totalPage: 0,
  892. height: 200,
  893. // 选中行持久化相关
  894. selectedRowKey: null, // 当前选中行的唯一标识
  895. componentPartModelFlag: false,
  896. componentPartData: {
  897. site: '',
  898. buNo: '',
  899. sku: '',
  900. partNo: '',
  901. partDesc: '',
  902. page: 1,
  903. limit: 10
  904. },
  905. pageIndex3: 1,
  906. pageSize3: 20,
  907. totalPage3: 0,
  908. componentPartList: [],
  909. componentPartColumnList: [
  910. {
  911. columnProp: 'sku',
  912. headerAlign: "center",
  913. align: "center",
  914. columnLabel: 'PN',
  915. columnHidden: false,
  916. columnImage: false,
  917. status: true,
  918. fixed: '',
  919. columnWidth: 120
  920. },
  921. {
  922. columnProp: 'partNo',
  923. headerAlign: "center",
  924. align: "center",
  925. columnLabel: '物料编码',
  926. columnHidden: false,
  927. columnImage: false,
  928. status: true,
  929. fixed: '',
  930. columnWidth: 120
  931. },
  932. {
  933. columnProp: 'partDesc',
  934. headerAlign: "center",
  935. align: "center",
  936. columnLabel: '物料描述',
  937. columnHidden: false,
  938. columnImage: false,
  939. status: true,
  940. fixed: '',
  941. columnWidth: 300
  942. },
  943. ],
  944. walMartOrderFlag: 'N',
  945. fscFlag: 'N',
  946. boxSizeFlag: 'N',
  947. walMartOrderDialog:false,
  948. buList:[],
  949. dataList:[],
  950. dataList2:[],
  951. dataList3:[], // UPC数据列表
  952. dataListLoading: false,
  953. xiadaLoading: false, // 下达按钮加载状态
  954. updateDetailLoading: false, // 明细保存/取消按钮加载状态
  955. searchData: {
  956. page: 1,
  957. limit: 100,
  958. buNo:'',
  959. delNo:'',
  960. cmcInvoice:'',
  961. notifyStatus:'',
  962. startDate:'',
  963. endDate:'',
  964. username:this.$store.state.user.name,
  965. modifyData:'',
  966. fscFlag:'',
  967. walMartOrderFlag:'',
  968. boxSizeFlag:'',
  969. },
  970. buttons:{
  971. search:'查询',
  972. },
  973. updateHeaderModelFlag:false,
  974. updateHeaderModel:{
  975. site:'',
  976. buDesc:'',
  977. cmcInvoice:'',
  978. delNo:'',
  979. readyDate:'',
  980. shippingMode:'',
  981. destination:'',
  982. notifyDate:'',
  983. remark:'',
  984. },
  985. updateDetailModelFlag:false,
  986. updateDetailModel:{
  987. site:'',
  988. buNo:'',
  989. delNo:'',
  990. itemNo:'',
  991. partNo:'',
  992. partDescription:'',
  993. qty:'',
  994. salesOrder:'',
  995. line:'',
  996. customerPO:'',
  997. version:'',
  998. status:'',
  999. family:'',
  1000. lt:'',
  1001. cmcComment:'',
  1002. saleType:'',
  1003. awbBl:'',
  1004. shippingNumber:'',
  1005. forwarderInfo:'',
  1006. currency:'',
  1007. tp:'',
  1008. ttlAmount:'',
  1009. sumPrice:'',
  1010. so:'',
  1011. upc:'',
  1012. remark:'',
  1013. pn:'',
  1014. addFlag:'',
  1015. carton:'',
  1016. vat:'',
  1017. roll:'',
  1018. },
  1019. activeName:'detail',
  1020. columnList1: [
  1021. {
  1022. userId: this.$store.state.user.name,
  1023. functionId: 801001,
  1024. serialNumber: '801001Table1BuDesc',
  1025. tableId: "801001Table1",
  1026. tableName: "关务系统发货通知单",
  1027. columnProp: "buDesc",
  1028. headerAlign: "center",
  1029. align: "left",
  1030. columnLabel: "BU",
  1031. columnHidden: false,
  1032. columnImage: false,
  1033. columnSortable: false,
  1034. sortLv: 0,
  1035. status: true,
  1036. fixed: '',
  1037. columnWidth: 60
  1038. },
  1039. {
  1040. userId: this.$store.state.user.name,
  1041. functionId: 801001,
  1042. serialNumber: '801001Table1CmcInvoice',
  1043. tableId: "801001Table1",
  1044. tableName: "关务系统发货通知单",
  1045. columnProp: "cmcInvoice",
  1046. headerAlign: "center",
  1047. align: "left",
  1048. columnLabel: "CMC Invoice",
  1049. columnHidden: false,
  1050. columnImage: false,
  1051. columnSortable: false,
  1052. sortLv: 0,
  1053. status: true,
  1054. fixed: '',
  1055. columnWidth: 100
  1056. },
  1057. {
  1058. userId: this.$store.state.user.name,
  1059. functionId: 801001,
  1060. serialNumber: '801001Table1DelNo',
  1061. tableId: "801001Table1",
  1062. tableName: "关务系统发货通知单",
  1063. columnProp: "delNo",
  1064. headerAlign: "center",
  1065. align: "center",
  1066. columnLabel: "发货通知单号",
  1067. columnHidden: false,
  1068. columnImage: false,
  1069. columnSortable: false,
  1070. sortLv: 0,
  1071. status: true,
  1072. fixed: '',
  1073. columnWidth: 110
  1074. },
  1075. {
  1076. userId: this.$store.state.user.name,
  1077. functionId: 801001,
  1078. serialNumber: '801001Table1ReadyDate',
  1079. tableId: "801001Table1",
  1080. tableName: "关务系统发货通知单",
  1081. columnProp: "readyDate",
  1082. headerAlign: "center",
  1083. align: "center",
  1084. columnLabel: "ReadyDate",
  1085. columnHidden: false,
  1086. columnImage: false,
  1087. columnSortable: false,
  1088. sortLv: 0,
  1089. status: true,
  1090. fixed: '',
  1091. columnWidth: 100
  1092. },
  1093. {
  1094. userId: this.$store.state.user.name,
  1095. functionId: 801001,
  1096. serialNumber: '801001Table1CustomerName',
  1097. tableId: "801001Table1",
  1098. tableName: "关务系统发货通知单",
  1099. columnProp: "customerName",
  1100. headerAlign: "center",
  1101. align: "left",
  1102. columnLabel: "客户名称",
  1103. columnHidden: false,
  1104. columnImage: false,
  1105. columnSortable: false,
  1106. sortLv: 0,
  1107. status: true,
  1108. fixed: '',
  1109. columnWidth: 220
  1110. },
  1111. {
  1112. userId: this.$store.state.user.name,
  1113. functionId: 801001,
  1114. serialNumber: '801001Table1ShippingMode',
  1115. tableId: "801001Table1",
  1116. tableName: "关务系统发货通知单",
  1117. columnProp: "shippingMode",
  1118. headerAlign: "center",
  1119. align: "left",
  1120. columnLabel: "ShippingMode",
  1121. columnHidden: false,
  1122. columnImage: false,
  1123. columnSortable: false,
  1124. sortLv: 0,
  1125. status: true,
  1126. fixed: '',
  1127. columnWidth: 100
  1128. },
  1129. {
  1130. userId: this.$store.state.user.name,
  1131. functionId: 801001,
  1132. serialNumber: '801001Table1Destination',
  1133. tableId: "801001Table1",
  1134. tableName: "关务系统发货通知单",
  1135. columnProp: "destination",
  1136. headerAlign: "center",
  1137. align: "left",
  1138. columnLabel: "Destination",
  1139. columnHidden: false,
  1140. columnImage: false,
  1141. columnSortable: false,
  1142. sortLv: 0,
  1143. status: true,
  1144. fixed: '',
  1145. columnWidth: 100
  1146. },
  1147. {
  1148. userId: this.$store.state.user.name,
  1149. functionId: 801001,
  1150. serialNumber: '801001Table1NotifyStatus',
  1151. tableId: "801001Table1",
  1152. tableName: "关务系统发货通知单",
  1153. columnProp: "notifyStatus",
  1154. headerAlign: "center",
  1155. align: "left",
  1156. columnLabel: "通知单状态",
  1157. columnHidden: false,
  1158. columnImage: false,
  1159. columnSortable: false,
  1160. sortLv: 0,
  1161. status: true,
  1162. fixed: '',
  1163. columnWidth: 100
  1164. },
  1165. {
  1166. userId: this.$store.state.user.name,
  1167. functionId: 801001,
  1168. serialNumber: '801001Table1NotifyStatus',
  1169. tableId: "801001Table1",
  1170. tableName: "关务系统发货通知单",
  1171. columnProp: "modifyLabel",
  1172. headerAlign: "center",
  1173. align: "left",
  1174. columnLabel: "改单",
  1175. columnHidden: false,
  1176. columnImage: false,
  1177. columnSortable: false,
  1178. sortLv: 0,
  1179. status: true,
  1180. fixed: '',
  1181. columnWidth: 60
  1182. },
  1183. {
  1184. userId: this.$store.state.user.name,
  1185. functionId: 801001,
  1186. serialNumber: '801001Table1NotifyDate',
  1187. tableId: "801001Table1",
  1188. tableName: "关务系统发货通知单",
  1189. columnProp: "notifyDate",
  1190. headerAlign: "center",
  1191. align: "center",
  1192. columnLabel: "发货日期",
  1193. columnHidden: false,
  1194. columnImage: false,
  1195. columnSortable: false,
  1196. sortLv: 0,
  1197. status: true,
  1198. fixed: '',
  1199. columnWidth: 120
  1200. },
  1201. {
  1202. userId: this.$store.state.user.name,
  1203. functionId: 801001,
  1204. serialNumber: '801001Table1ErpDelNo',
  1205. tableId: "801001Table1",
  1206. tableName: "关务系统发货通知单",
  1207. columnProp: "walMartOrderFlag",
  1208. headerAlign: "center",
  1209. align: "left",
  1210. columnLabel: "沃尔玛订单",
  1211. columnHidden: false,
  1212. columnImage: false,
  1213. columnSortable: false,
  1214. sortLv: 0,
  1215. status: true,
  1216. fixed: '',
  1217. columnWidth: 100
  1218. },
  1219. {
  1220. userId: this.$store.state.user.name,
  1221. functionId: 801001,
  1222. serialNumber: '801001Table1BoxSizeFlag',
  1223. tableId: "801001Table1",
  1224. tableName: "关务系统发货通知单",
  1225. columnProp: "boxSizeFlag",
  1226. headerAlign: "center",
  1227. align: "left",
  1228. columnLabel: "维护箱尺寸",
  1229. columnHidden: false,
  1230. columnImage: false,
  1231. columnSortable: false,
  1232. sortLv: 0,
  1233. status: true,
  1234. fixed: '',
  1235. columnWidth: 100
  1236. },
  1237. {
  1238. userId: this.$store.state.user.name,
  1239. functionId: 801001,
  1240. serialNumber: '801001Table1CreateBy',
  1241. tableId: "801001Table1",
  1242. tableName: "关务系统发货通知单",
  1243. columnProp: "createBy",
  1244. headerAlign: "center",
  1245. align: "left",
  1246. columnLabel: "创建人",
  1247. columnHidden: false,
  1248. columnImage: false,
  1249. columnSortable: false,
  1250. sortLv: 0,
  1251. status: true,
  1252. fixed: '',
  1253. columnWidth: 80
  1254. },
  1255. {
  1256. userId: this.$store.state.user.name,
  1257. functionId: 801001,
  1258. serialNumber: '801001Table1CreateDate',
  1259. tableId: "801001Table1",
  1260. tableName: "关务系统发货通知单",
  1261. columnProp: "createDate",
  1262. headerAlign: "center",
  1263. align: "center",
  1264. columnLabel: "创建时间",
  1265. columnHidden: false,
  1266. columnImage: false,
  1267. columnSortable: false,
  1268. sortLv: 0,
  1269. status: true,
  1270. fixed: '',
  1271. columnWidth: 130
  1272. },
  1273. {
  1274. userId: this.$store.state.user.name,
  1275. functionId: 801001,
  1276. serialNumber: '801001Table1UpdateBy',
  1277. tableId: "801001Table1",
  1278. tableName: "关务系统发货通知单",
  1279. columnProp: "updateBy",
  1280. headerAlign: "center",
  1281. align: "left",
  1282. columnLabel: "修改人",
  1283. columnHidden: false,
  1284. columnImage: false,
  1285. columnSortable: false,
  1286. sortLv: 0,
  1287. status: true,
  1288. fixed: '',
  1289. columnWidth: 80
  1290. },
  1291. {
  1292. userId: this.$store.state.user.name,
  1293. functionId: 801001,
  1294. serialNumber: '801001Table1UpdateDate',
  1295. tableId: "801001Table1",
  1296. tableName: "关务系统发货通知单",
  1297. columnProp: "updateDate",
  1298. headerAlign: "center",
  1299. align: "center",
  1300. columnLabel: "修改时间",
  1301. columnHidden: false,
  1302. columnImage: false,
  1303. columnSortable: false,
  1304. sortLv: 0,
  1305. status: true,
  1306. fixed: '',
  1307. columnWidth: 130
  1308. },
  1309. {
  1310. userId: this.$store.state.user.name,
  1311. functionId: 801001,
  1312. serialNumber: '801001Table1Remark',
  1313. tableId: "801001Table1",
  1314. tableName: "关务系统发货通知单",
  1315. columnProp: "remark",
  1316. headerAlign: "center",
  1317. align: "left",
  1318. columnLabel: "Remark",
  1319. columnHidden: false,
  1320. columnImage: false,
  1321. columnSortable: false,
  1322. sortLv: 0,
  1323. status: true,
  1324. fixed: '',
  1325. columnWidth: 300
  1326. },
  1327. ],
  1328. columnList2: [
  1329. {
  1330. userId: this.$store.state.user.name,
  1331. functionId: 801001,
  1332. serialNumber: '801001Table2ItemNo',
  1333. tableId: "801001Table2",
  1334. tableName: "关务系统发货通知单明细",
  1335. columnProp: "itemNo",
  1336. headerAlign: "center",
  1337. align: "left",
  1338. columnLabel: "行号",
  1339. columnHidden: false,
  1340. columnImage: false,
  1341. columnSortable: false,
  1342. sortLv: 0,
  1343. status: true,
  1344. fixed: '',
  1345. columnWidth: 80
  1346. },
  1347. {
  1348. userId: this.$store.state.user.name,
  1349. functionId: 801001,
  1350. serialNumber: '801001Table2PartNo',
  1351. tableId: "801001Table2",
  1352. tableName: "关务系统发货通知单明细",
  1353. columnProp: "pn",
  1354. headerAlign: "center",
  1355. align: "left",
  1356. columnLabel: "PN",
  1357. columnHidden: false,
  1358. columnImage: false,
  1359. columnSortable: false,
  1360. sortLv: 0,
  1361. status: true,
  1362. fixed: '',
  1363. columnWidth: 100
  1364. },
  1365. {
  1366. userId: this.$store.state.user.name,
  1367. functionId: 801001,
  1368. serialNumber: '801001Table2PartDescription',
  1369. tableId: "801001Table2",
  1370. tableName: "关务系统发货通知单明细",
  1371. columnProp: "partDescription",
  1372. headerAlign: "center",
  1373. align: "left",
  1374. columnLabel: "Description",
  1375. columnHidden: false,
  1376. columnImage: false,
  1377. columnSortable: false,
  1378. sortLv: 0,
  1379. status: true,
  1380. fixed: '',
  1381. columnWidth: 300
  1382. },
  1383. {
  1384. userId: this.$store.state.user.name,
  1385. functionId: 801001,
  1386. serialNumber: '801001Table2Qty',
  1387. tableId: "801001Table2",
  1388. tableName: "关务系统发货通知单明细",
  1389. columnProp: "qty",
  1390. headerAlign: "center",
  1391. align: "right",
  1392. columnLabel: "Qty (pcs)",
  1393. columnHidden: false,
  1394. columnImage: false,
  1395. columnSortable: false,
  1396. sortLv: 0,
  1397. status: true,
  1398. fixed: '',
  1399. columnWidth: 100
  1400. },
  1401. {
  1402. userId: this.$store.state.user.name,
  1403. functionId: 801001,
  1404. serialNumber: '801001Table2SalesOrder',
  1405. tableId: "801001Table2",
  1406. tableName: "关务系统发货通知单明细",
  1407. columnProp: "salesOrder",
  1408. headerAlign: "center",
  1409. align: "left",
  1410. columnLabel: "销售订单号",
  1411. columnHidden: false,
  1412. columnImage: false,
  1413. columnSortable: false,
  1414. sortLv: 0,
  1415. status: true,
  1416. fixed: '',
  1417. columnWidth: 100
  1418. },
  1419. {
  1420. userId: this.$store.state.user.name,
  1421. functionId: 801001,
  1422. serialNumber: '801001Table2CustomerPO',
  1423. tableId: "801001Table2",
  1424. tableName: "关务系统发货通知单明细",
  1425. columnProp: "customerPO",
  1426. headerAlign: "center",
  1427. align: "left",
  1428. columnLabel: "客户采购单号",
  1429. columnHidden: false,
  1430. columnImage: false,
  1431. columnSortable: false,
  1432. sortLv: 0,
  1433. status: true,
  1434. fixed: '',
  1435. columnWidth: 100
  1436. },
  1437. {
  1438. userId: this.$store.state.user.name,
  1439. functionId: 801001,
  1440. serialNumber: '801001Table2Version',
  1441. tableId: "801001Table2",
  1442. tableName: "关务系统发货通知单明细",
  1443. columnProp: "version",
  1444. headerAlign: "center",
  1445. align: "left",
  1446. columnLabel: "Version",
  1447. columnHidden: false,
  1448. columnImage: false,
  1449. columnSortable: false,
  1450. sortLv: 0,
  1451. status: true,
  1452. fixed: '',
  1453. columnWidth: 100
  1454. },
  1455. {
  1456. userId: this.$store.state.user.name,
  1457. functionId: 801001,
  1458. serialNumber: '801001Table2Status',
  1459. tableId: "801001Table2",
  1460. tableName: "关务系统发货通知单明细",
  1461. columnProp: "status",
  1462. headerAlign: "center",
  1463. align: "left",
  1464. columnLabel: "Status",
  1465. columnHidden: false,
  1466. columnImage: false,
  1467. columnSortable: false,
  1468. sortLv: 0,
  1469. status: true,
  1470. fixed: '',
  1471. columnWidth: 100
  1472. },
  1473. {
  1474. userId: this.$store.state.user.name,
  1475. functionId: 801001,
  1476. serialNumber: '801001Table2Family',
  1477. tableId: "801001Table2",
  1478. tableName: "关务系统发货通知单明细",
  1479. columnProp: "family",
  1480. headerAlign: "center",
  1481. align: "left",
  1482. columnLabel: "Family",
  1483. columnHidden: false,
  1484. columnImage: false,
  1485. columnSortable: false,
  1486. sortLv: 0,
  1487. status: true,
  1488. fixed: '',
  1489. columnWidth: 100
  1490. },
  1491. {
  1492. userId: this.$store.state.user.name,
  1493. functionId: 801001,
  1494. serialNumber: '801001Table2Lt',
  1495. tableId: "801001Table2",
  1496. tableName: "关务系统发货通知单明细",
  1497. columnProp: "lt",
  1498. headerAlign: "center",
  1499. align: "right",
  1500. columnLabel: "LT (wks)",
  1501. columnHidden: false,
  1502. columnImage: false,
  1503. columnSortable: false,
  1504. sortLv: 0,
  1505. status: true,
  1506. fixed: '',
  1507. columnWidth: 100
  1508. },
  1509. {
  1510. userId: this.$store.state.user.name,
  1511. functionId: 801001,
  1512. serialNumber: '801001Table2CmcComment',
  1513. tableId: "801001Table2",
  1514. tableName: "关务系统发货通知单明细",
  1515. columnProp: "cmcComment",
  1516. headerAlign: "center",
  1517. align: "left",
  1518. columnLabel: "CMC Comment",
  1519. columnHidden: false,
  1520. columnImage: false,
  1521. columnSortable: false,
  1522. sortLv: 0,
  1523. status: true,
  1524. fixed: '',
  1525. columnWidth: 100
  1526. },
  1527. {
  1528. userId: this.$store.state.user.name,
  1529. functionId: 801001,
  1530. serialNumber: '801001Table2SaleType',
  1531. tableId: "801001Table2",
  1532. tableName: "关务系统发货通知单明细",
  1533. columnProp: "saleType",
  1534. headerAlign: "center",
  1535. align: "left",
  1536. columnLabel: "内外销方式",
  1537. columnHidden: false,
  1538. columnImage: false,
  1539. columnSortable: false,
  1540. sortLv: 0,
  1541. status: true,
  1542. fixed: '',
  1543. columnWidth: 100
  1544. },
  1545. {
  1546. userId: this.$store.state.user.name,
  1547. functionId: 801001,
  1548. serialNumber: '801001Table2AwbBl',
  1549. tableId: "801001Table2",
  1550. tableName: "关务系统发货通知单明细",
  1551. columnProp: "awbBl",
  1552. headerAlign: "center",
  1553. align: "left",
  1554. columnLabel: "AWB/ BL#",
  1555. columnHidden: false,
  1556. columnImage: false,
  1557. columnSortable: false,
  1558. sortLv: 0,
  1559. status: true,
  1560. fixed: '',
  1561. columnWidth: 100
  1562. },
  1563. {
  1564. userId: this.$store.state.user.name,
  1565. functionId: 801001,
  1566. serialNumber: '801001Table2ShippingNumber',
  1567. tableId: "801001Table2",
  1568. tableName: "关务系统发货通知单明细",
  1569. columnProp: "shippingNumber",
  1570. headerAlign: "center",
  1571. align: "left",
  1572. columnLabel: "ShippingNumber",
  1573. columnHidden: false,
  1574. columnImage: false,
  1575. columnSortable: false,
  1576. sortLv: 0,
  1577. status: true,
  1578. fixed: '',
  1579. columnWidth: 100
  1580. },
  1581. {
  1582. userId: this.$store.state.user.name,
  1583. functionId: 801001,
  1584. serialNumber: '801001Table2ForwarderInfo',
  1585. tableId: "801001Table2",
  1586. tableName: "关务系统发货通知单明细",
  1587. columnProp: "forwarderInfo",
  1588. headerAlign: "center",
  1589. align: "left",
  1590. columnLabel: "Forwarder Info",
  1591. columnHidden: false,
  1592. columnImage: false,
  1593. columnSortable: false,
  1594. sortLv: 0,
  1595. status: true,
  1596. fixed: '',
  1597. columnWidth: 100
  1598. },
  1599. {
  1600. userId: this.$store.state.user.name,
  1601. functionId: 801001,
  1602. serialNumber: '801001Table2Currency',
  1603. tableId: "801001Table2",
  1604. tableName: "关务系统发货通知单明细",
  1605. columnProp: "currency",
  1606. headerAlign: "center",
  1607. align: "left",
  1608. columnLabel: "Currency",
  1609. columnHidden: false,
  1610. columnImage: false,
  1611. columnSortable: false,
  1612. sortLv: 0,
  1613. status: true,
  1614. fixed: '',
  1615. columnWidth: 100
  1616. },
  1617. {
  1618. userId: this.$store.state.user.name,
  1619. functionId: 801001,
  1620. serialNumber: '801001Table2Tp',
  1621. tableId: "801001Table2",
  1622. tableName: "关务系统发货通知单明细",
  1623. columnProp: "tp",
  1624. headerAlign: "center",
  1625. align: "right",
  1626. columnLabel: "TP",
  1627. columnHidden: false,
  1628. columnImage: false,
  1629. columnSortable: false,
  1630. sortLv: 0,
  1631. status: true,
  1632. fixed: '',
  1633. columnWidth: 80
  1634. },
  1635. {
  1636. userId: this.$store.state.user.name,
  1637. functionId: 801001,
  1638. serialNumber: '801001Table2TtlAmount',
  1639. tableId: "801001Table2",
  1640. tableName: "关务系统发货通知单明细",
  1641. columnProp: "ttlAmount",
  1642. headerAlign: "center",
  1643. align: "right",
  1644. columnLabel: "TTL Amount",
  1645. columnHidden: false,
  1646. columnImage: false,
  1647. columnSortable: false,
  1648. sortLv: 0,
  1649. status: true,
  1650. fixed: '',
  1651. columnWidth: 80
  1652. },
  1653. {
  1654. userId: this.$store.state.user.name,
  1655. functionId: 801001,
  1656. serialNumber: '801001Table2Remark',
  1657. tableId: "801001Table2",
  1658. tableName: "关务系统发货通知单明细",
  1659. columnProp: "vat",
  1660. headerAlign: "center",
  1661. align: "right",
  1662. columnLabel: "VAT",
  1663. columnHidden: false,
  1664. columnImage: false,
  1665. columnSortable: false,
  1666. sortLv: 0,
  1667. status: true,
  1668. fixed: '',
  1669. columnWidth: 100
  1670. },
  1671. {
  1672. userId: this.$store.state.user.name,
  1673. functionId: 801001,
  1674. serialNumber: '801001Table2SumPrice',
  1675. tableId: "801001Table2",
  1676. tableName: "关务系统发货通知单明细",
  1677. columnProp: "sumPrice",
  1678. headerAlign: "center",
  1679. align: "right",
  1680. columnLabel: "价税合计",
  1681. columnHidden: false,
  1682. columnImage: false,
  1683. columnSortable: false,
  1684. sortLv: 0,
  1685. status: true,
  1686. fixed: '',
  1687. columnWidth: 80
  1688. },
  1689. {
  1690. userId: this.$store.state.user.name,
  1691. functionId: 801001,
  1692. serialNumber: '801001Table2So',
  1693. tableId: "801001Table2",
  1694. tableName: "关务系统发货通知单明细",
  1695. columnProp: "so",
  1696. headerAlign: "center",
  1697. align: "left",
  1698. columnLabel: "SO",
  1699. columnHidden: false,
  1700. columnImage: false,
  1701. columnSortable: false,
  1702. sortLv: 0,
  1703. status: true,
  1704. fixed: '',
  1705. columnWidth: 100
  1706. },
  1707. {
  1708. userId: this.$store.state.user.name,
  1709. functionId: 801001,
  1710. serialNumber: '801001Table2Upc',
  1711. tableId: "801001Table2",
  1712. tableName: "关务系统发货通知单明细",
  1713. columnProp: "upc",
  1714. headerAlign: "center",
  1715. align: "left",
  1716. columnLabel: "UPC",
  1717. columnHidden: false,
  1718. columnImage: false,
  1719. columnSortable: false,
  1720. sortLv: 0,
  1721. status: true,
  1722. fixed: '',
  1723. columnWidth: 100
  1724. },
  1725. // {
  1726. // userId: this.$store.state.user.name,
  1727. // functionId: 801001,
  1728. // serialNumber: '801001Table2ErpDelItemNo',
  1729. // tableId: "801001Table2",
  1730. // tableName: "关务系统发货通知单明细",
  1731. // columnProp: "erpDelItemNo",
  1732. // headerAlign: "center",
  1733. // align: "right",
  1734. // columnLabel: "ERP发货单行号",
  1735. // columnHidden: false,
  1736. // columnImage: false,
  1737. // columnSortable: false,
  1738. // sortLv: 0,
  1739. // status: true,
  1740. // fixed: '',
  1741. // columnWidth: 60
  1742. // },
  1743. {
  1744. userId: this.$store.state.user.name,
  1745. functionId: 801001,
  1746. serialNumber: '801001Table2Remark',
  1747. tableId: "801001Table2",
  1748. tableName: "关务系统发货通知单明细",
  1749. columnProp: "remark",
  1750. headerAlign: "center",
  1751. align: "left",
  1752. columnLabel: "Remark",
  1753. columnHidden: false,
  1754. columnImage: false,
  1755. columnSortable: false,
  1756. sortLv: 0,
  1757. status: true,
  1758. fixed: '',
  1759. columnWidth: 300
  1760. },
  1761. {
  1762. userId: this.$store.state.user.name,
  1763. functionId: 801001,
  1764. serialNumber: '801001Table2Remark',
  1765. tableId: "801001Table2",
  1766. tableName: "关务系统发货通知单明细",
  1767. columnProp: "roll",
  1768. headerAlign: "center",
  1769. align: "right",
  1770. columnLabel: "Roll",
  1771. columnHidden: false,
  1772. columnImage: false,
  1773. columnSortable: false,
  1774. sortLv: 0,
  1775. status: true,
  1776. fixed: '',
  1777. columnWidth: 100
  1778. },
  1779. {
  1780. userId: this.$store.state.user.name,
  1781. functionId: 801001,
  1782. serialNumber: '801001Table2Remark',
  1783. tableId: "801001Table2",
  1784. tableName: "关务系统发货通知单明细",
  1785. columnProp: "carton",
  1786. headerAlign: "center",
  1787. align: "right",
  1788. columnLabel: "Carton",
  1789. columnHidden: false,
  1790. columnImage: false,
  1791. columnSortable: false,
  1792. sortLv: 0,
  1793. status: true,
  1794. fixed: '',
  1795. columnWidth: 100
  1796. },
  1797. {
  1798. userId: this.$store.state.user.name,
  1799. functionId: 801001,
  1800. serialNumber: '801001Table2Remark',
  1801. tableId: "801001Table2",
  1802. tableName: "关务系统发货通知单明细",
  1803. columnProp: "qtyRoll",
  1804. headerAlign: "center",
  1805. align: "right",
  1806. columnLabel: "qty/roll",
  1807. columnHidden: false,
  1808. columnImage: false,
  1809. columnSortable: false,
  1810. sortLv: 0,
  1811. status: true,
  1812. fixed: '',
  1813. columnWidth: 100
  1814. },
  1815. {
  1816. userId: this.$store.state.user.name,
  1817. functionId: 801001,
  1818. serialNumber: '801001Table2Remark',
  1819. tableId: "801001Table2",
  1820. tableName: "关务系统发货通知单明细",
  1821. columnProp: "qtyBox",
  1822. headerAlign: "center",
  1823. align: "right",
  1824. columnLabel: "qty/box",
  1825. columnHidden: false,
  1826. columnImage: false,
  1827. columnSortable: false,
  1828. sortLv: 0,
  1829. status: true,
  1830. fixed: '',
  1831. columnWidth: 100
  1832. },
  1833. ],
  1834. ossColumns:[
  1835. {
  1836. userId: this.$store.state.user.name,
  1837. functionId: 103001,
  1838. serialNumber: '103001Table2FileName',
  1839. tableId: '103001Table2',
  1840. tableName: '文件信息表',
  1841. columnProp: 'fileName',
  1842. headerAlign: 'center',
  1843. align: 'center',
  1844. columnLabel: '文件名称',
  1845. columnHidden: false,
  1846. columnImage: false,
  1847. columnSortable: false,
  1848. sortLv: 0,
  1849. status: true,
  1850. fixed: '',
  1851. columnWidth: 140
  1852. },
  1853. {
  1854. userId: this.$store.state.user.name,
  1855. functionId: 103001,
  1856. serialNumber: '103001Table2FileRemark',
  1857. tableId: '103001Table2',
  1858. tableName: '文件信息表',
  1859. columnProp: 'fileRemark',
  1860. headerAlign: 'center',
  1861. align: 'center',
  1862. columnLabel: '备注',
  1863. columnHidden: false,
  1864. columnImage: false,
  1865. columnSortable: false,
  1866. sortLv: 0,
  1867. status: true,
  1868. fixed: '',
  1869. columnWidth: 240
  1870. },
  1871. {
  1872. userId: this.$store.state.user.name,
  1873. functionId: 103001,
  1874. serialNumber: '103001Table2CreateDate',
  1875. tableId: '103001Table2',
  1876. tableName: '文件信息表',
  1877. columnProp: 'createDate',
  1878. headerAlign: 'center',
  1879. align: 'center',
  1880. columnLabel: '上传时间',
  1881. columnHidden: false,
  1882. columnImage: false,
  1883. columnSortable: false,
  1884. sortLv: 0,
  1885. status: true,
  1886. fixed: '',
  1887. columnWidth: 140
  1888. },
  1889. {
  1890. userId: this.$store.state.user.name,
  1891. functionId: 103001,
  1892. serialNumber: '103001Table2CreatedBy',
  1893. tableId: '103001Table2',
  1894. tableName: '文件信息表',
  1895. columnProp: 'createdBy',
  1896. headerAlign: 'center',
  1897. align: 'center',
  1898. columnLabel: '上传人',
  1899. columnHidden: false,
  1900. columnImage: false,
  1901. columnSortable: false,
  1902. sortLv: 0,
  1903. status: true,
  1904. fixed: '',
  1905. columnWidth: 140
  1906. }
  1907. ],
  1908. currentRow:{},
  1909. // 导出 start
  1910. exportData: [],
  1911. exportName: '发货通知单'+this.dayjs().format('YYYYMMDDHHmmss'),
  1912. exportHeader: ["发货通知单"],
  1913. exportFooter: [],
  1914. // 导出 end
  1915. exportInvoiceFlag:false,
  1916. exportInvoice:{
  1917. origin:"made in china",
  1918. templateName:'',
  1919. hsCodeDesc:'',
  1920. contractFlag:'',
  1921. packaging:'',
  1922. kgs:'',
  1923. hsCode:'',
  1924. material:'',
  1925. hsCodeDescType:'',
  1926. goodsLabel:true,
  1927. hsCodeFlag:true,
  1928. overseasShipper:'',
  1929. overseasAddress:'',
  1930. fpremark:'',
  1931. showWeight:false
  1932. },
  1933. exportGoodsFlag:false,
  1934. exportGoods:{
  1935. salesMethod:'EXW',
  1936. currency: 'USD',
  1937. madeArea: 'Nantong, China',
  1938. sendPort:'Shanghai, China',
  1939. deliveryGoodsDate:'',
  1940. voyage :'',
  1941. shippingDate:'',
  1942. hsCodeDescType:'Y',
  1943. shipper:'Checkpoint Commercial (Shanghai) Co., Ltd. 保点贸易(上海)有限公司\t\t\t\t\t\t\n' +
  1944. 'Room 1411, No. 31, Lane 2419, Hunan Road, Pudong New Area, Shanghai\t\t\t\t\t\t\n' +
  1945. '电话/Tel: (86-21)38112888 传真/Fax: (86-21)38112990\t\t\t\t\t\t\n' +
  1946. '上海市浦东新区沪南路2419弄31号1411室\t\t\t\t\t\t\n'
  1947. },
  1948. notifyPartDetailList:[],
  1949. templateFlag:false,
  1950. templateData:{},
  1951. templateList:[],
  1952. customerData:{},
  1953. customerAddData:{},
  1954. // 客户信息编辑相关
  1955. customerInfoDialogFlag: false,
  1956. customerInfoModel: {
  1957. customerName: '',
  1958. localShipAddress: '',
  1959. overseasShipper: '',
  1960. overseasAddress: '',
  1961. salesArea: '',
  1962. cnative: '',
  1963. templateName: ''
  1964. },
  1965. // 客户选择相关
  1966. customerSelectFlag: false,
  1967. addressSelectFlag: false,
  1968. shipperSelectFlag: false,
  1969. overseasAddressSelectFlag: false,
  1970. customerListForEdit: [],
  1971. customerAddrsForEdit: [],
  1972. customSearchData: {},
  1973. }
  1974. },
  1975. mounted() {
  1976. this.$nextTick(() => {
  1977. this.height = (window.innerHeight - 240)/2;
  1978. })
  1979. },
  1980. methods: {
  1981. isPnDataIncomplete(row) {
  1982. const hsCodeDesc = row.hsCodeDesc !== null && row.hsCodeDesc !== undefined && row.hsCodeDesc !== ''&& row.hsCodeDesc !== '*';
  1983. return !hsCodeDesc;
  1984. },
  1985. // 跳转到PN维护页面
  1986. navigateToPartHsCode(pn) {
  1987. if (!pn) {
  1988. this.$message.warning('PN不能为空');
  1989. return;
  1990. }
  1991. this.$router.push({
  1992. path: '/ecss-partHsCode',
  1993. query: {
  1994. sku: pn
  1995. }
  1996. });
  1997. },
  1998. // 获取基础数据列表S
  1999. getBaseList(val, type) {
  2000. this.tagNo = val
  2001. this.$nextTick(() => {
  2002. let strVal = ''
  2003. if (val === 507) {
  2004. strVal = this.updateDetailModel.partNo
  2005. }
  2006. this.$refs.baseList.init(val, strVal)
  2007. })
  2008. },
  2009. /* 列表方法的回调 */
  2010. getBaseData(val) {
  2011. if (this.tagNo === 507) {
  2012. this.updateDetailModel.partNo = val.part_no
  2013. }
  2014. },
  2015. // 每页数
  2016. sizeChangeHandle (val) {
  2017. this.pageSize = val
  2018. this.pageIndex = 1
  2019. this.searchTable()
  2020. },
  2021. // 当前页
  2022. currentChangeHandle (val) {
  2023. this.pageIndex = val
  2024. this.searchTable()
  2025. },
  2026. searchTable(){
  2027. this.searchData.limit = this.pageSize
  2028. this.searchData.page = this.pageIndex
  2029. searchEcssCoDelNotifyHeader(this.searchData).then(({data}) => {
  2030. //区分请求成功和失败的状况
  2031. if (data && data.code == 0) {
  2032. this.dataList = data.page.list
  2033. this.pageIndex = data.page.currPage
  2034. this.pageSize = data.page.pageSize
  2035. this.totalPage = data.page.totalCount
  2036. if(this.dataList.length>0){
  2037. this.dataList.forEach(o => {
  2038. // 显示改单次数,如:改单(1)、改单(2)
  2039. o.modifyLabel = !!o.modifyFlag ? (o.modifyCount>1 ? '改单(' + o.modifyCount + ')' : '改单(1)') : '';
  2040. });
  2041. // 使用 $nextTick 确保 DOM 渲染完成后再设置选中行
  2042. this.$nextTick(() => {
  2043. try {
  2044. // 检查表格引用是否存在
  2045. if (!this.$refs.mainTable) {
  2046. console.warn('[行选择持久化] 表格引用不存在,跳过设置选中行');
  2047. return;
  2048. }
  2049. // 尝试恢复之前选中的行
  2050. const restoredRow = this.restoreSelectedRow();
  2051. if (restoredRow) {
  2052. this.$refs.mainTable.setCurrentRow(restoredRow);
  2053. this.changeData(restoredRow);
  2054. } else {
  2055. // 如果没有之前选中的行,默认选中第一行
  2056. this.$refs.mainTable.setCurrentRow(this.dataList[0]);
  2057. this.changeData(this.dataList[0]);
  2058. }
  2059. } catch (error) {
  2060. console.error('[行选择持久化] 设置选中行失败:', error);
  2061. // 降级处理:只调用 changeData,不设置表格选中状态
  2062. const restoredRow = this.restoreSelectedRow();
  2063. this.changeData(restoredRow || this.dataList[0]);
  2064. }
  2065. });
  2066. }else {
  2067. this.changeData(null)
  2068. }
  2069. } else {
  2070. this.dataList = [];
  2071. }
  2072. });
  2073. },
  2074. // 动态列开始 获取 用户保存的 格式列
  2075. async getTableUserColumn (tableId, columnId) {
  2076. let queryTableUser = {
  2077. userId: this.$store.state.user.name,
  2078. functionId: this.$route.meta.menuId,
  2079. tableId: tableId,
  2080. status: true,
  2081. languageCode: this.$i18n.locale
  2082. }
  2083. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  2084. if (data.rows.length > 0) {
  2085. //this.columnList1 = []
  2086. switch (columnId) {
  2087. case 1:
  2088. this.columnList1 = data.rows
  2089. break;
  2090. // case 2:
  2091. // this.columnDetailList = data.rows
  2092. // break;
  2093. // case 3:
  2094. // this.columnList2 = data.rows
  2095. // break;
  2096. // case 4:
  2097. // this.columnList3 = data.rows
  2098. // break;
  2099. }
  2100. } else {
  2101. this.getColumnList(tableId, columnId)
  2102. }
  2103. })
  2104. },
  2105. // 获取 tableDefault 列
  2106. async getColumnList (tableId, columnId) {
  2107. let queryTable = {
  2108. functionId: this.$route.meta.menuId,
  2109. tableId: tableId,
  2110. languageCode: this.$i18n.locale
  2111. }
  2112. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  2113. if (!data.rows.length == 0) {
  2114. switch (columnId) {
  2115. case 1:
  2116. this.columnList1 = data.rows
  2117. break;
  2118. // case 2:
  2119. // this.columnDetailList = data.rows
  2120. // break;
  2121. // case 3:
  2122. // this.columnList2 = data.rows
  2123. // break;
  2124. // case 4:
  2125. // this.columnList3 = data.rows
  2126. // break;
  2127. }
  2128. } else {
  2129. // this.showDefault = true.
  2130. }
  2131. })
  2132. },
  2133. changeData(row){
  2134. this.currentRow = JSON.parse(JSON.stringify(row));
  2135. this.headerData=row;
  2136. // 保存选中行的唯一标识到本地存储
  2137. if (row && row.delNo) {
  2138. this.selectedRowKey = row.delNo;
  2139. this.saveSelectedRowToStorage();
  2140. }
  2141. // 预先查询UPC数据,用于判断是否显示UPC tab
  2142. this.getUpcDataList();
  2143. this.refreshCurrentTabTable ();
  2144. },
  2145. importModel(){
  2146. this.$nextTick(() => {
  2147. this.$refs.delUploadExcel.init()
  2148. })
  2149. },
  2150. importDetailModel(){
  2151. this.$nextTick(() => {
  2152. this.$refs.delDetailUploadExcel.init(this.currentRow)
  2153. })
  2154. },
  2155. /**
  2156. * UPC导入
  2157. */
  2158. importUpcModel(){
  2159. if (!this.currentRow || !this.currentRow.cmcInvoice) {
  2160. this.$message.warning('请先选择一个发货通知单')
  2161. return
  2162. }
  2163. this.$nextTick(() => {
  2164. this.$refs.upcUploadExcel.init(this.currentRow)
  2165. })
  2166. },
  2167. // TTL Amount修正方法
  2168. fixTtlAmountHandle(){
  2169. if (!this.currentRow || !this.currentRow.delNo) {
  2170. this.$message.warning('请先选择一个发货通知单')
  2171. return
  2172. }
  2173. this.$confirm('确认要将所有明细的价税合计(sumPrice)赋值到TTL Amount字段吗?', '提示', {
  2174. confirmButtonText: '确定',
  2175. cancelButtonText: '取消',
  2176. type: 'warning'
  2177. }).then(() => {
  2178. fixTtlAmount(this.currentRow).then(({data}) => {
  2179. if (data && data.code === 0) {
  2180. this.$message({
  2181. message: 'TTL Amount修正成功',
  2182. type: 'success',
  2183. duration: 1500
  2184. })
  2185. // 刷新明细列表
  2186. this.refreshCurrentTabTable()
  2187. } else {
  2188. this.$alert(data.msg || 'TTL Amount修正失败', '错误', {
  2189. confirmButtonText: '确定'
  2190. })
  2191. }
  2192. }).catch((error) => {
  2193. this.$alert('TTL Amount修正失败: ' + error, '错误', {
  2194. confirmButtonText: '确定'
  2195. })
  2196. })
  2197. }).catch(() => {
  2198. // 用户取消操作
  2199. })
  2200. },
  2201. refreshCurrentTabTable(){
  2202. if(this.currentRow===''||this.currentRow===null){
  2203. this.currentRow={site:'',delNo:''}
  2204. }
  2205. if(this.activeName==='detail'){
  2206. searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => {
  2207. //区分请求成功和失败的状况
  2208. if (data && data.code == 0) {
  2209. this.dataList2 = data.rows
  2210. } else {
  2211. this.dataList2 = [];
  2212. }
  2213. });
  2214. }
  2215. if(this.activeName==='pallet'){
  2216. // 刷新装箱明细组件
  2217. if (this.$refs.packingDetailTab) {
  2218. this.$refs.packingDetailTab.refresh();
  2219. }
  2220. }
  2221. if(this.activeName==='upcDetail'){
  2222. // 查询UPC数据
  2223. this.getUpcDataList()
  2224. }
  2225. },
  2226. /**
  2227. * 获取UPC数据列表
  2228. */
  2229. getUpcDataList(){
  2230. if(!this.currentRow || !this.currentRow.cmcInvoice){
  2231. this.dataList3 = []
  2232. return
  2233. }
  2234. const params = {
  2235. site: this.currentRow.site,
  2236. cmcInvoice: this.currentRow.cmcInvoice
  2237. }
  2238. searchUpcImportData(params).then(({data}) => {
  2239. if (data && data.code === 0) {
  2240. this.dataList3 = data.rows || []
  2241. } else {
  2242. this.dataList3 = []
  2243. }
  2244. }).catch((error) => {
  2245. console.error('查询UPC数据失败:', error)
  2246. this.dataList3 = []
  2247. })
  2248. },
  2249. /**
  2250. * 删除发货通知单的全部UPC数据
  2251. */
  2252. deleteAllUpcData(){
  2253. if (!this.currentRow || !this.currentRow.cmcInvoice) {
  2254. this.$message.warning('请先选择一个发货通知单')
  2255. return
  2256. }
  2257. // 确认删除
  2258. this.$confirm(`确定要删除发票号 ${this.currentRow.cmcInvoice} 的全部UPC数据吗?`, '删除确认', {
  2259. confirmButtonText: '确定',
  2260. cancelButtonText: '取消',
  2261. type: 'warning'
  2262. }).then(() => {
  2263. const params = {
  2264. site: this.currentRow.site,
  2265. cmcInvoice: this.currentRow.cmcInvoice
  2266. }
  2267. deleteUpcImportData(params).then(({data}) => {
  2268. if (data && data.code === 0) {
  2269. this.$message.success('UPC数据删除成功')
  2270. // 清空当前数据列表
  2271. this.dataList3 = []
  2272. // 切换回明细tab
  2273. this.activeName = 'detail'
  2274. } else {
  2275. this.$alert(data.msg || 'UPC数据删除失败', '错误', {
  2276. confirmButtonText: '确定'
  2277. })
  2278. }
  2279. }).catch((error) => {
  2280. console.error('删除UPC数据失败:', error)
  2281. this.$alert('删除UPC数据失败: ' + error, '错误', {
  2282. confirmButtonText: '确定'
  2283. })
  2284. })
  2285. }).catch(() => {
  2286. // 用户取消删除
  2287. })
  2288. },
  2289. /**
  2290. * 合并表格单元格方法
  2291. * 用于合并相同cartonNo的行
  2292. */
  2293. arraySpanMethod({ row, column, rowIndex, columnIndex }) {
  2294. // 只对第一列(箱号列)进行合并
  2295. if (columnIndex === 0) {
  2296. // 如果数据为空,不合并
  2297. if (!this.dataList3 || this.dataList3.length === 0) {
  2298. return {
  2299. rowspan: 1,
  2300. colspan: 1
  2301. }
  2302. }
  2303. // 获取当前行的箱号
  2304. const currentCartonNo = row.cartonNo
  2305. // 如果是第一行,或者与上一行的箱号不同
  2306. if (rowIndex === 0 || this.dataList3[rowIndex - 1].cartonNo !== currentCartonNo) {
  2307. // 计算相同箱号的行数
  2308. let rowspan = 1
  2309. for (let i = rowIndex + 1; i < this.dataList3.length; i++) {
  2310. if (this.dataList3[i].cartonNo === currentCartonNo) {
  2311. rowspan++
  2312. } else {
  2313. break
  2314. }
  2315. }
  2316. return {
  2317. rowspan: rowspan,
  2318. colspan: 1
  2319. }
  2320. } else {
  2321. // 如果与上一行的箱号相同,则隐藏该单元格
  2322. return {
  2323. rowspan: 0,
  2324. colspan: 0
  2325. }
  2326. }
  2327. }
  2328. // 其他列不合并
  2329. return {
  2330. rowspan: 1,
  2331. colspan: 1
  2332. }
  2333. },
  2334. tabClick (tab, event) {
  2335. // 刷新列表数据
  2336. this.refreshCurrentTabTable()
  2337. },
  2338. updateHeaderModelDo(row){
  2339. this.updateHeaderModel=JSON.parse(JSON.stringify(row));
  2340. this.updateHeaderModelFlag=true
  2341. },
  2342. doUpdateHeader(){
  2343. if(this.updateHeaderModel.readyDate==null||this.updateHeaderModel.readyDate==''){
  2344. this.$alert('请选择ReadyDate!', '错误', {
  2345. confirmButtonText: '确定'
  2346. })
  2347. return false
  2348. }
  2349. updateEcssDelHeader(this.updateHeaderModel).then(({data}) => {
  2350. if (data && data.code === 0) {
  2351. // 保存当前选中行的标识,以便刷新后恢复
  2352. const currentSelectedKey = this.currentRow ? this.currentRow.delNo : null;
  2353. if (currentSelectedKey) {
  2354. this.selectedRowKey = currentSelectedKey;
  2355. this.saveSelectedRowToStorage();
  2356. }
  2357. this.searchTable()
  2358. this.updateHeaderModelFlag = false
  2359. this.$message({
  2360. message: '操作成功',
  2361. type: 'success',
  2362. duration: 1500,
  2363. onClose: () => {}
  2364. })
  2365. } else {
  2366. this.$alert(data.msg, '错误', {
  2367. confirmButtonText: '确定'
  2368. })
  2369. }
  2370. })
  2371. },
  2372. deleteDelHeader(row){
  2373. this.$confirm('确认删除吗?', '提示').then(() => {
  2374. deleteEcssDelHeader(row).then(({data}) => {
  2375. if (data && data.code === 0) {
  2376. // 如果删除的是当前选中行,清除选中状态
  2377. if (this.currentRow && this.currentRow.delNo === row.delNo) {
  2378. this.clearSelectedRowStorage();
  2379. }
  2380. this.searchTable()
  2381. this.$message({
  2382. message: '操作成功',
  2383. type: 'success',
  2384. duration: 1500,
  2385. onClose: () => {}
  2386. })
  2387. } else {
  2388. this.$alert(data.msg, '错误', {
  2389. confirmButtonText: '确定'
  2390. })
  2391. }
  2392. })
  2393. })
  2394. },
  2395. xiadaChoose(row){
  2396. // 设置当前行
  2397. this.currentRow = row;
  2398. if (this.dataList2.length===0) {
  2399. this.$alert('该发货通知单下没有明细无法下达!', '错误', {
  2400. confirmButtonText: '确定'
  2401. })
  2402. return false
  2403. }
  2404. this.walMartOrderFlag='N';
  2405. this.fscFlag='N';
  2406. this.boxSizeFlag = 'N';
  2407. this.walMartOrderDialog=true;
  2408. },
  2409. cancelDelHeader(row){
  2410. this.$confirm('确认废弃吗?', '提示').then(() => {
  2411. cancelEcssDelHeader(row).then(({data}) => {
  2412. if (data && data.code === 0) {
  2413. // 保存当前选中行的标识,以便刷新后恢复
  2414. const currentSelectedKey = row ? row.delNo : null;
  2415. if (currentSelectedKey) {
  2416. this.selectedRowKey = currentSelectedKey;
  2417. this.saveSelectedRowToStorage();
  2418. }
  2419. this.searchTable()
  2420. this.$message({
  2421. message: '操作成功',
  2422. type: 'success',
  2423. duration: 1500,
  2424. onClose: () => {}
  2425. })
  2426. } else {
  2427. this.$alert(data.msg, '错误', {
  2428. confirmButtonText: '确定'
  2429. })
  2430. }
  2431. })
  2432. })
  2433. },
  2434. recoverDelHeader(row){
  2435. this.$confirm('确认取消废弃吗?', '提示').then(() => {
  2436. recoverEcssDelHeader(row).then(({data}) => {
  2437. if (data && data.code === 0) {
  2438. // 保存当前选中行的标识,以便刷新后恢复
  2439. const currentSelectedKey = row ? row.delNo : null;
  2440. if (currentSelectedKey) {
  2441. this.selectedRowKey = currentSelectedKey;
  2442. this.saveSelectedRowToStorage();
  2443. }
  2444. this.searchTable()
  2445. this.$message({
  2446. message: '操作成功',
  2447. type: 'success',
  2448. duration: 1500,
  2449. onClose: () => {}
  2450. })
  2451. } else {
  2452. this.$alert(data.msg, '错误', {
  2453. confirmButtonText: '确定'
  2454. })
  2455. }
  2456. })
  2457. })
  2458. },
  2459. tableRowClassName({row}) {
  2460. if (row.notifyStatus==='订单取消') {
  2461. return 'warning-row';
  2462. }
  2463. },
  2464. cellStyle({row, column }) {
  2465. // 改单列显示橙色:只要modifyFlag为true就显示橙色
  2466. if (column.property === 'modifyLabel' && row.modifyFlag===true) {
  2467. return { color: '#ff5d03' };
  2468. }
  2469. return {};
  2470. },
  2471. cellStyleDetail({row, column }) {
  2472. if (column.property === 'qty' && row.modifyQtyFlag===true) {
  2473. return { color: '#ff5d03' };
  2474. }
  2475. // PN列保持原有的 modifyFlag 判断
  2476. if (column.property === 'pn' && row.modifyFlag===true) {
  2477. return { color: '#ff5d03' };
  2478. }
  2479. // 检查 pn 列,当 boxrolls、rollqty、boxweight 其中任意一个没有值时,将 pn 颜色改成橙色
  2480. if (column.property === 'pn') {
  2481. const hsCodeDesc = row.hsCodeDesc !== null && row.hsCodeDesc !== undefined && row.hsCodeDesc !== ''&& row.hsCodeDesc !== '*';
  2482. if (!hsCodeDesc) {
  2483. return { color: '#ff8c00' }; // 橙色
  2484. }
  2485. }
  2486. return {};
  2487. },
  2488. xiadaEcssDel(){
  2489. let inData={
  2490. site:this.currentRow.site,
  2491. buNo:this.currentRow.buNo,
  2492. createBy:this.currentRow.createBy,
  2493. delNo:this.currentRow.delNo,
  2494. cmcInvoice:this.currentRow.cmcInvoice,
  2495. notifyStatus:'已下达',
  2496. walMartOrderFlag:this.walMartOrderFlag,
  2497. fscFlag:this.fscFlag,
  2498. boxSizeFlag:this.boxSizeFlag
  2499. }
  2500. // 开始加载
  2501. this.dataListLoading = true;
  2502. changeEcssDelStatus(inData).then(({data}) => {
  2503. if (data && data.code === 0) {
  2504. // 保存当前选中行的标识,以便刷新后恢复
  2505. const currentSelectedKey = this.currentRow ? this.currentRow.delNo : null;
  2506. if (currentSelectedKey) {
  2507. this.selectedRowKey = currentSelectedKey;
  2508. this.saveSelectedRowToStorage();
  2509. }
  2510. this.searchTable()
  2511. this.$message({
  2512. message: '操作成功',
  2513. type: 'success',
  2514. duration: 1500,
  2515. onClose: () => {}
  2516. })
  2517. } else {
  2518. this.$alert(data.msg, '错误', {
  2519. confirmButtonText: '确定'
  2520. })
  2521. }
  2522. }).catch((error) => {
  2523. // 处理错误情况
  2524. this.$alert('操作失败,请重试', '错误', {
  2525. confirmButtonText: '确定'
  2526. })
  2527. }).finally(() => {
  2528. // 无论成功还是失败都要恢复加载状态
  2529. this.dataListLoading = false;
  2530. })
  2531. this.walMartOrderDialog=false;
  2532. },
  2533. jihuaEcssDel(row){
  2534. let inData={
  2535. site:row.site,
  2536. delNo:row.delNo,
  2537. notifyStatus:'已计划'
  2538. }
  2539. this.$confirm('确认取消下达吗?', '提示').then(() => {
  2540. changeEcssDelStatus(inData).then(({data}) => {
  2541. if (data && data.code === 0) {
  2542. // 保存当前选中行的标识,以便刷新后恢复
  2543. const currentSelectedKey = row ? row.delNo : null;
  2544. if (currentSelectedKey) {
  2545. this.selectedRowKey = currentSelectedKey;
  2546. this.saveSelectedRowToStorage();
  2547. }
  2548. this.searchTable()
  2549. this.$message({
  2550. message: '操作成功',
  2551. type: 'success',
  2552. duration: 1500,
  2553. onClose: () => {}
  2554. })
  2555. } else {
  2556. this.$alert(data.msg, '错误', {
  2557. confirmButtonText: '确定'
  2558. })
  2559. }
  2560. })
  2561. })
  2562. },
  2563. declarationCompleted(row){
  2564. let inData={
  2565. site:row.site,
  2566. delNo:row.delNo,
  2567. walMartOrderFlag:row.walMartOrderFlag,
  2568. notifyStatus:'已报关'
  2569. }
  2570. this.$confirm('确认一键结单吗?', '提示').then(() => {
  2571. changeEcssDelStatus(inData).then(({data}) => {
  2572. if (data && data.code === 0) {
  2573. // 保存当前选中行的标识,以便刷新后恢复
  2574. const currentSelectedKey = row ? row.delNo : null;
  2575. if (currentSelectedKey) {
  2576. this.selectedRowKey = currentSelectedKey;
  2577. this.saveSelectedRowToStorage();
  2578. }
  2579. this.searchTable()
  2580. this.$message({
  2581. message: '操作成功',
  2582. type: 'success',
  2583. duration: 1500,
  2584. onClose: () => {}
  2585. })
  2586. } else {
  2587. this.$alert(data.msg, '错误', {
  2588. confirmButtonText: '确定'
  2589. })
  2590. }
  2591. })
  2592. })
  2593. },
  2594. // 每页数
  2595. sizeChangeHandle3 (val) {
  2596. this.pageSize3 = val
  2597. this.pageIndex3 = 1
  2598. this.queryComponentPartModal()
  2599. },
  2600. // 当前页
  2601. currentChangeHandle3 (val) {
  2602. this.pageIndex3 = val
  2603. this.queryComponentPartModal()
  2604. },
  2605. // 子物料列表
  2606. queryComponentPartModal () {
  2607. this.componentPartData.limit = this.pageSize3
  2608. this.componentPartData.page = this.pageIndex3
  2609. this.componentPartData.site = this.currentRow.site
  2610. this.componentPartData.buNo = this.currentRow.buNo
  2611. // 查询所有物料
  2612. queryPartListAll(this.componentPartData).then(({data}) => {
  2613. if (data && data.code === 0) {
  2614. this.componentPartList = data.page.list
  2615. this.pageIndex3 = data.page.currPage
  2616. this.pageSize3 = data.page.pageSize
  2617. this.totalPage3 = data.page.totalCount
  2618. this.componentPartModelFlag = true
  2619. } else {
  2620. this.componentPartList = []
  2621. }
  2622. })
  2623. },
  2624. // 物料查询列表
  2625. queryComponentPartList () {
  2626. this.componentPartData.limit = this.pageSize3
  2627. this.componentPartData.page = this.pageIndex3
  2628. // 查询所有物料
  2629. queryPartListAll(this.componentPartData).then(({data}) => {
  2630. if (data && data.code === 0) {
  2631. this.componentPartList = data.page.list
  2632. this.pageIndex3 = data.page.currPage
  2633. this.pageSize3 = data.page.pageSize
  2634. this.totalPage3 = data.page.totalCount
  2635. } else {
  2636. this.componentPartList = []
  2637. }
  2638. })
  2639. },
  2640. // 双击选中子物料
  2641. getComponentRowData (row) {
  2642. this.updateDetailModel.partDescription = row.partDesc
  2643. this.updateDetailModel.pn = row.sku
  2644. this.updateDetailModel.partNo = row.partNo
  2645. this.componentPartModelFlag = false
  2646. },
  2647. doUpdateDetail(){
  2648. if(this.updateDetailModel.partNo==null||this.updateDetailModel.partNo==''){
  2649. this.$alert('请输入PN!', '错误', {
  2650. confirmButtonText: '确定'
  2651. })
  2652. return false
  2653. }
  2654. if(this.updateDetailModel.qty==null||this.updateDetailModel.qty==''){
  2655. this.$alert('请输入QTY!', '错误', {
  2656. confirmButtonText: '确定'
  2657. })
  2658. return false
  2659. }
  2660. if(this.updateDetailModel.qty<=0){
  2661. this.$alert('QTY必须大于0!', '错误', {
  2662. confirmButtonText: '确定'
  2663. })
  2664. return false
  2665. }
  2666. // 开始加载
  2667. this.updateDetailLoading = true
  2668. updateEcssDelDetail(this.updateDetailModel).then(({data}) => {
  2669. if (data && data.code === 0) {
  2670. // 保存当前选中行的标识,以便刷新后恢复
  2671. const currentSelectedKey = this.currentRow ? this.currentRow.delNo : null
  2672. if (currentSelectedKey) {
  2673. this.selectedRowKey = currentSelectedKey
  2674. this.saveSelectedRowToStorage()
  2675. }
  2676. // 刷新明细表格
  2677. this.refreshCurrentTabTable()
  2678. // 刷新表头列表
  2679. this.searchTable()
  2680. this.updateDetailModelFlag=false
  2681. this.$message({
  2682. message: '操作成功',
  2683. type: 'success',
  2684. duration: 1500,
  2685. onClose: () => {}
  2686. })
  2687. } else {
  2688. this.$alert(data.msg, '错误', {
  2689. confirmButtonText: '确定'
  2690. })
  2691. }
  2692. }).catch((error) => {
  2693. // 处理错误情况
  2694. this.$alert('操作失败,请重试', '错误', {
  2695. confirmButtonText: '确定'
  2696. })
  2697. }).finally(() => {
  2698. // 无论成功还是失败都要恢复加载状态
  2699. this.updateDetailLoading = false
  2700. })
  2701. },
  2702. // 自动计算金额
  2703. calculateAmounts() {
  2704. // 获取数值,如果无效则为0
  2705. const qty = parseFloat(this.updateDetailModel.qty) || 0;
  2706. const tp = parseFloat(this.updateDetailModel.tp) || 0;
  2707. const vat = parseFloat(this.updateDetailModel.vat) || 0;
  2708. // 价税合计 = 数量 * TP,保留两位小数
  2709. const sumPrice = qty * tp;
  2710. this.updateDetailModel.sumPrice = sumPrice > 0 ? sumPrice.toFixed(2) : '';
  2711. // TTL Amount = 价税合计 * VAT,保留两位小数
  2712. const ttlAmount = sumPrice * vat;
  2713. this.updateDetailModel.ttlAmount = ttlAmount > 0 ? ttlAmount.toFixed(2) : '';
  2714. },
  2715. openCreateDetailModel(){
  2716. this.updateDetailModel.site=this.currentRow.site;
  2717. this.updateDetailModel.buNo=this.currentRow.buNo;
  2718. this.updateDetailModel.delNo=this.currentRow.delNo;
  2719. this.updateDetailModel.partNo=''
  2720. this.updateDetailModel.qty=''
  2721. this.updateDetailModel.partDescription=''
  2722. this.updateDetailModel.itemNo=''
  2723. this.updateDetailModel.salesOrder=''
  2724. this.updateDetailModel.line=''
  2725. this.updateDetailModel.customerPO=''
  2726. this.updateDetailModel.version=''
  2727. this.updateDetailModel.status=''
  2728. this.updateDetailModel.family=''
  2729. this.updateDetailModel.lt=''
  2730. this.updateDetailModel.cmcComment=''
  2731. this.updateDetailModel.saleType=''
  2732. this.updateDetailModel.awbBl=''
  2733. this.updateDetailModel.shippingNumber=''
  2734. this.updateDetailModel.forwarderInfo=''
  2735. this.updateDetailModel.currency=''
  2736. this.updateDetailModel.tp=''
  2737. this.updateDetailModel.ttlAmount=''
  2738. this.updateDetailModel.sumPrice=''
  2739. this.updateDetailModel.so=''
  2740. this.updateDetailModel.upc=''
  2741. this.updateDetailModel.remark=''
  2742. this.updateDetailModel.pn=''
  2743. this.updateDetailModel.roll=''
  2744. this.updateDetailModel.carton=''
  2745. this.updateDetailModel.vat=''
  2746. this.updateDetailModel.addFlag=0
  2747. this.updateDetailModelFlag=true
  2748. },
  2749. openUpdateDetailModel(row){
  2750. this.updateDetailModel=JSON.parse(JSON.stringify(row));
  2751. this.updateDetailModel.addFlag=1
  2752. this.updateDetailModelFlag=true
  2753. },
  2754. deleteDelDetail(row){
  2755. this.$confirm('确认取消此明细?', '提示').then(() => {
  2756. // 开始加载
  2757. this.updateDetailLoading = true
  2758. deleteEcssDelDetail(row).then(({data}) => {
  2759. if (data && data.code === 0) {
  2760. // 保存当前选中行的标识,以便刷新后恢复
  2761. const currentSelectedKey = this.currentRow ? this.currentRow.delNo : null
  2762. if (currentSelectedKey) {
  2763. this.selectedRowKey = currentSelectedKey
  2764. this.saveSelectedRowToStorage()
  2765. }
  2766. // 刷新明细表格
  2767. this.refreshCurrentTabTable()
  2768. // 刷新表头列表
  2769. this.searchTable()
  2770. this.$message({
  2771. message: '操作成功',
  2772. type: 'success',
  2773. duration: 1500,
  2774. onClose: () => {}
  2775. })
  2776. } else {
  2777. this.$alert(data.msg, '错误', {
  2778. confirmButtonText: '确定'
  2779. })
  2780. }
  2781. }).catch((error) => {
  2782. // 处理错误情况
  2783. this.$alert('操作失败,请重试', '错误', {
  2784. confirmButtonText: '确定'
  2785. })
  2786. }).finally(() => {
  2787. // 无论成功还是失败都要恢复加载状态
  2788. this.updateDetailLoading = false
  2789. })
  2790. }).catch(() => {
  2791. // 用户取消确认时不需要loading状态
  2792. })
  2793. },
  2794. getBu () {
  2795. let tempData = {
  2796. username: this.$store.state.user.name,
  2797. }
  2798. getBuList(tempData).then(({data}) => {
  2799. if (data.code === 0) {
  2800. this.buList = data.row2
  2801. if (this.buList.length===1) {
  2802. this.searchData.buNo = this.buList[0].buNo;
  2803. }
  2804. }
  2805. })
  2806. },
  2807. //导出excel
  2808. async createExportData() {
  2809. this.searchData.limit = -1
  2810. this.searchData.page = 1
  2811. await searchEcssCoDelNotifyHeader(this.searchData).then(({data}) => {
  2812. this.exportList= data.page.list;
  2813. })
  2814. return this.exportList;
  2815. },
  2816. startDownload() {
  2817. // this.exportData = this.dataList
  2818. },
  2819. finishDownload() {
  2820. },
  2821. fields() {
  2822. let json = "{"
  2823. this.columnList1.forEach((item, index) => {
  2824. if (index == this.columnList1.length - 1) {
  2825. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  2826. } else {
  2827. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  2828. }
  2829. })
  2830. json += "}"
  2831. let s = eval("(" + json + ")")
  2832. return s
  2833. },
  2834. async exportExcel() {
  2835. this.searchData.limit = -1
  2836. this.searchData.page = 1
  2837. excel.exportTable({
  2838. url: "/ecss/coDel/searchEcssCoDelNotifyHeader",
  2839. columnMapping: this.columnList1,//可以直接用table,不需要的列就剔除
  2840. mergeSetting: [],//需要合并的列
  2841. params: this.searchData,
  2842. fileName: this.exportName+".xlsx",
  2843. rowFetcher: res => res.data,
  2844. columnFormatter: [],
  2845. dropColumns: [],//需要剔除的列,例如dropColumns: ["netWeight"],即剔除净重列
  2846. });
  2847. },
  2848. getSummaries(param) {
  2849. const { columns } = param;
  2850. const sums = [];
  2851. columns.forEach((column, index) => {
  2852. if (index === 0) {
  2853. sums[index] = '合计';
  2854. return;
  2855. }
  2856. let sumDataList = this.dataList2.filter(item => item.qty>0);
  2857. const values = sumDataList.map(item => Number(item[column.property]));
  2858. if (!values.every(value => isNaN(value))) {
  2859. switch(column.property) {
  2860. case 'qty':
  2861. sums[index] = `${values.reduce((a, b) => a + b, 0)}`;
  2862. break;
  2863. case 'ttlAmount':
  2864. sums[index] = `${values.reduce((a, b) => a + b, 0).toFixed(2)}`;
  2865. break;
  2866. case 'sumPrice':
  2867. sums[index] = `${values.reduce((a, b) => a + b, 0).toFixed(2)}`;
  2868. break;
  2869. default:
  2870. sums[index] = '';
  2871. }
  2872. } else {
  2873. sums[index] = '';
  2874. }
  2875. });
  2876. this.$nextTick(() => this.$refs.detailTable.doLayout());// 强制刷新布局, 否则会被表格覆盖
  2877. return sums;
  2878. },
  2879. exportInvoiceList() {
  2880. if (!this.currentRow || !this.currentRow.buNo) {
  2881. this.$message.warning('请选择发货通知单!')
  2882. return
  2883. }
  2884. if (this.currentRow.notifyStatus==='订单取消') {
  2885. this.$message.warning('该发货通知单已取消!')
  2886. return
  2887. }
  2888. this.exportInvoice.templateName=''
  2889. this.exportInvoice.hsCodeDesc=this.currentRow.hsCodeDesc
  2890. this.exportInvoice.contractFlag=this.currentRow.contractFlag
  2891. this.exportInvoice.packaging=this.currentRow.packaging
  2892. this.exportInvoice.kgs=this.currentRow.kgs
  2893. this.exportInvoice.hsCode=this.currentRow.hsCode
  2894. this.exportInvoice.material=this.currentRow.material
  2895. this.exportInvoice.hsCodeDescType=this.currentRow.hsCodeDescType
  2896. this.exportInvoice.goodsLabel=this.currentRow.goodsLabel
  2897. this.exportInvoice.origin="made in china"
  2898. //this.exportInvoice = this.currentRow
  2899. if (!this.exportInvoice.origin) {
  2900. this.exportInvoice.origin = 'made in china'
  2901. }
  2902. if (!this.exportInvoice.itemNo) {
  2903. this.exportInvoice.itemNo = 'Y'
  2904. }
  2905. this.notifyPartDetailList = [];
  2906. this.customerData=''
  2907. this.customerAddData = ''
  2908. this.exportInvoiceFlag = true
  2909. if (this.currentRow.buNo==='03-RFID') {
  2910. getNotifyPartDetail(this.currentRow).then(({data}) => {
  2911. //区分请求成功和失败的状况
  2912. if (data && data.code == 0) {
  2913. this.notifyPartDetailList = data.rows
  2914. this.notifyPartDetailList.forEach(o => {
  2915. if (!o.lossratio) {
  2916. o.lossratio = '1.2';
  2917. }
  2918. });
  2919. } else {
  2920. this.notifyPartDetailList = [];
  2921. }
  2922. });
  2923. }
  2924. this.templateData.type='发票'
  2925. this.searchTemplateOne();
  2926. },
  2927. searchTemplateOne() {
  2928. this.templateData.buNo = this.currentRow.buNo
  2929. this.templateData.customName = this.currentRow.customerName
  2930. this.templateData.shippingMode = this.currentRow.shippingMode
  2931. searchTemplateList(this.templateData).then(({data}) => {
  2932. if (data && data.code === 0){
  2933. if (data.rows && data.rows.length > 0) {
  2934. this.templateRowDblclick(data.rows[0]);
  2935. }
  2936. }
  2937. })
  2938. },
  2939. exportGoodsList() {
  2940. if (!this.currentRow || !this.currentRow.buNo) {
  2941. this.$message.warning('请选择发货通知单!')
  2942. return
  2943. }
  2944. this.exportGoods.hsCodeDescType = 'N'
  2945. this.exportGoods.salesMethod = 'EXW'
  2946. this.exportGoods.currency = this.currentRow.currency?this.currentRow.currency:this.dataList2.length>0?this.dataList2[0].currency:'USD'
  2947. this.exportGoods.madeArea = 'Nantong, China'
  2948. this.exportGoods.sendPort = 'Shanghai, China'
  2949. this.exportGoods.deliveryGoodsDate = ''
  2950. this.exportGoods.voyage = this.currentRow.buNo==='01-Label' || this.currentRow.buNo==='03-RFID'?this.currentRow.cmcInvoice:''
  2951. this.exportGoods.shippingDate = ''
  2952. this.exportGoodsFlag = true
  2953. },
  2954. /**
  2955. * 打开客户信息编辑对话框
  2956. */
  2957. openCustomerInfoDialog() {
  2958. if (!this.currentRow || !this.currentRow.cmcInvoice) {
  2959. this.$message.warning('请选择发货通知单!')
  2960. return
  2961. }
  2962. if (this.currentRow.notifyStatus === '订单取消') {
  2963. this.$message.warning('该发货通知单已取消!')
  2964. return
  2965. }
  2966. // 初始化客户信息数据
  2967. this.customerInfoModel = {
  2968. customerName: this.currentRow.customerName || '',
  2969. localShipAddress: this.currentRow.localShipAddress || '',
  2970. overseasShipper: this.currentRow.overseasShipper || '',
  2971. overseasAddress: this.currentRow.overseasAddress || '',
  2972. salesArea: this.currentRow.salesArea || '',
  2973. cnative: this.currentRow.cnative || '',
  2974. templateNo: this.currentRow.templateNo || '',
  2975. templateName: ''
  2976. }
  2977. this.customerInfoDialogFlag = true
  2978. },
  2979. /**
  2980. * 更新客户信息
  2981. */
  2982. updateCustomerInfo(templateNo) {
  2983. // 验证必填字段
  2984. if (!this.customerInfoModel.customerName) {
  2985. this.$message.warning('请填写客户名称')
  2986. return
  2987. }
  2988. // 准备更新数据
  2989. const updateData = {
  2990. site: this.currentRow.site,
  2991. delNo: this.currentRow.delNo,
  2992. templateNo : templateNo,
  2993. customerName: this.customerInfoModel.customerName,
  2994. localShipAddress: this.customerInfoModel.localShipAddress,
  2995. overseasShipper: this.customerInfoModel.overseasShipper,
  2996. overseasAddress: this.customerInfoModel.overseasAddress,
  2997. salesArea: this.customerInfoModel.salesArea,
  2998. cnative: this.customerInfoModel.cnative
  2999. }
  3000. // 调用专门的客户信息更新接口
  3001. updateCustomerInfo(updateData).then(({data}) => {
  3002. if (data && data.code === 0) {
  3003. this.$message.success('客户信息更新成功')
  3004. this.customerInfoDialogFlag = false
  3005. // 刷新列表
  3006. this.searchTable()
  3007. } else {
  3008. this.$message.error(data.msg || '更新失败')
  3009. }
  3010. }).catch(error => {
  3011. this.$message.error('更新失败:' + (error.message || '网络异常'))
  3012. })
  3013. },
  3014. /**
  3015. * 另存为模板
  3016. */
  3017. async saveAsTemplate() {
  3018. // 验证必填字段
  3019. if (!this.customerInfoModel.templateName) {
  3020. this.$message.warning('请输入模板名称')
  3021. return
  3022. }
  3023. if (!this.customerInfoModel.customerName) {
  3024. this.$message.warning('请填写客户名称')
  3025. return
  3026. }
  3027. // 准备模板数据
  3028. const templateData = {
  3029. templateName: this.customerInfoModel.templateName,
  3030. originalTemplateName: '', // 空字符串表示新增模板
  3031. ccuscode: '', // 客户编码,可以为空
  3032. ccusname: this.customerInfoModel.customerName,
  3033. localShipAddress: this.customerInfoModel.localShipAddress || '',
  3034. overseasShipper: this.customerInfoModel.overseasShipper || '',
  3035. overseasAddress: this.customerInfoModel.overseasAddress || '',
  3036. cnative: this.customerInfoModel.cnative || '',
  3037. salesArea: this.customerInfoModel.salesArea || ''
  3038. }
  3039. try {
  3040. const {data} = await updateCustomerTemplate(templateData)
  3041. if (data && data.code === 0) {
  3042. this.$message.success(`模板"${this.customerInfoModel.templateName}"保存成功!`)
  3043. // 清空模板名称
  3044. this.customerInfoModel.templateName = ''
  3045. } else {
  3046. this.$message.error(data.msg || '保存模板失败')
  3047. }
  3048. } catch (error) {
  3049. console.error('保存模板失败:', error)
  3050. this.$message.error('保存模板失败:' + (error.message || '网络异常'))
  3051. }
  3052. },
  3053. // 导出
  3054. downloadInvoice() {
  3055. if (!this.currentRow || !this.currentRow.buNo) {
  3056. this.$message.warning('请选择报关单!')
  3057. return
  3058. }
  3059. let exportParam=this.exportInvoice
  3060. exportParam.declarationNo = this.currentRow.declarationNo
  3061. exportParam.site = this.currentRow.site
  3062. exportParam.delNo = this.currentRow.delNo
  3063. exportParam.notifyPartDetailList = this.notifyPartDetailList
  3064. ExportUtil.export(
  3065. "/ecss/coDel/downloadInvoice",
  3066. exportParam, "CI "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx"
  3067. );
  3068. this.exportInvoiceFlag=false
  3069. this.searchTable()
  3070. },
  3071. downloadExportGoods() {
  3072. if (!this.currentRow || !this.currentRow.buNo) {
  3073. this.$message.warning('请选择报关单!')
  3074. return
  3075. }
  3076. let exportParam=this.exportGoods
  3077. exportParam.declarationNo = this.currentRow.declarationNo
  3078. exportParam.site = this.currentRow.site
  3079. exportParam.delNo = this.currentRow.delNo
  3080. ExportUtil.export(
  3081. "/ecss/coDel/downloadExportGoods",
  3082. exportParam, "Booking "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx"
  3083. );
  3084. this.exportGoodsFlag = false;
  3085. this.searchTable()
  3086. },
  3087. openTemplate (type) {
  3088. this.templateData.type=type;
  3089. this.templateFlag = true;
  3090. },
  3091. openTemplateDialog () {
  3092. //请求
  3093. this.searchTemplateList();
  3094. },
  3095. closeTemplateDialog () {
  3096. this.templateList = []
  3097. this.templateFlag = false
  3098. },
  3099. searchTemplateList () {
  3100. this.templateData.buNo = this.currentRow.buNo
  3101. this.templateData.customName = ''
  3102. searchTemplateList(this.templateData).then(({data}) => {
  3103. if (data && data.code === 0){
  3104. this.templateList = data.rows;
  3105. }
  3106. })
  3107. },
  3108. templateRowDblclick (row) {
  3109. if (this.templateData.type=='发票') {
  3110. this.exportInvoice.templateName=row.name
  3111. this.exportInvoice.hsCodeDesc=row.hsCodeDesc
  3112. this.exportInvoice.contractFlag=row.contractFlag
  3113. this.exportInvoice.origin=this.currentRow.origin?this.currentRow.origin:row.origin
  3114. this.exportInvoice.packaging=this.currentRow.packaging?this.currentRow.packaging:row.packaging
  3115. this.exportInvoice.kgs=this.currentRow.kgs?this.currentRow.kgs:row.kgs
  3116. this.exportInvoice.hsCode=this.currentRow.hsCode?this.currentRow.hsCode:row.hsCode
  3117. this.exportInvoice.material=this.currentRow.material?this.currentRow.material:row.material
  3118. this.exportInvoice.hsCodeDescType=this.currentRow.hsCodeDescType?this.currentRow.hsCodeDescType:row.hsCodeDescType
  3119. this.exportInvoice.goodsLabel=this.currentRow.goodsLabel?this.currentRow.goodsLabel:row.goodsLabel
  3120. this.exportInvoice.fpremark=row.remark
  3121. this.exportInvoice.showWeight = row.showWeight
  3122. } else if (this.templateData.type=='出口货物委托书'){
  3123. this.exportGoods.salesMethod = row.salesMethod
  3124. this.exportGoods.currency = row.currency
  3125. this.exportGoods.madeArea = row.madeArea
  3126. this.exportGoods.sendPort = row.sendPort
  3127. this.exportGoods.deliveryGoodsDate = row.deliveryGoodsDate
  3128. this.exportGoods.voyage = this.currentRow.buNo==='01-Label' || this.currentRow.buNo==='03-RFID'?this.currentRow.cmcInvoice:row.voyage
  3129. this.exportGoods.shippingDate = row.shippingDate;
  3130. this.exportGoods.shipper=row.shipper
  3131. this.exportGoods.remark=row.remark
  3132. }
  3133. if (this.templateData.type!=='出口货物委托书') {
  3134. this.notifyPartDetailList.forEach(o => {
  3135. // 开启fsc损耗则给默认值
  3136. if (o.lossratio) {
  3137. if (row.fscWeight) {
  3138. o.lossratio = o.lossratio;
  3139. } else {
  3140. o.lossratio = '';
  3141. }
  3142. } else {
  3143. if (row.fscWeight) {
  3144. o.lossratio = '1.2';
  3145. } else {
  3146. o.lossratio = '';
  3147. }
  3148. }
  3149. });
  3150. }
  3151. this.templateFlag = false
  3152. },
  3153. /**
  3154. * 保存选中行到本地存储
  3155. * 使用页面路径和用户名作为存储键的一部分确保不同页面和用户的选择互不影响
  3156. */
  3157. saveSelectedRowToStorage() {
  3158. try {
  3159. const storageKey = `codelnotify_selected_row_${this.$store.state.user.name}`;
  3160. localStorage.setItem(storageKey, this.selectedRowKey);
  3161. console.log(`[行选择持久化] 已保存选中行: ${this.selectedRowKey}`);
  3162. } catch (error) {
  3163. console.warn('保存选中行状态失败:', error);
  3164. }
  3165. },
  3166. /**
  3167. * 从本地存储恢复选中行
  3168. * @returns {Object|null} 返回匹配的行数据如果没有找到则返回null
  3169. */
  3170. restoreSelectedRow() {
  3171. try {
  3172. const storageKey = `codelnotify_selected_row_${this.$store.state.user.name}`;
  3173. const savedRowKey = localStorage.getItem(storageKey);
  3174. // 检查必要的条件
  3175. if (!savedRowKey) {
  3176. console.log('[行选择持久化] 没有保存的选中行');
  3177. return null;
  3178. }
  3179. if (!this.dataList || this.dataList.length === 0) {
  3180. console.log('[行选择持久化] 数据列表为空,无法恢复选中行');
  3181. return null;
  3182. }
  3183. // 在当前数据列表中查找匹配的行
  3184. const matchedRow = this.dataList.find(row => row && row.delNo === savedRowKey);
  3185. if (matchedRow) {
  3186. this.selectedRowKey = savedRowKey;
  3187. console.log(`[行选择持久化] 已恢复选中行: ${savedRowKey}`);
  3188. return matchedRow;
  3189. } else {
  3190. console.log(`[行选择持久化] 未找到匹配的行: ${savedRowKey},当前数据列表长度: ${this.dataList.length}`);
  3191. }
  3192. return null;
  3193. } catch (error) {
  3194. console.warn('恢复选中行状态失败:', error);
  3195. return null;
  3196. }
  3197. },
  3198. /**
  3199. * 清除本地存储的选中行状态
  3200. */
  3201. clearSelectedRowStorage() {
  3202. try {
  3203. const storageKey = `codelnotify_selected_row_${this.$store.state.user.name}`;
  3204. localStorage.removeItem(storageKey);
  3205. this.selectedRowKey = null;
  3206. } catch (error) {
  3207. console.warn('清除选中行状态失败:', error);
  3208. }
  3209. },
  3210. },
  3211. activated() {
  3212. this.searchTable()
  3213. },
  3214. created() {
  3215. this.getBu ()
  3216. // 动态列
  3217. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  3218. // 初始化时从本地存储加载选中行状态
  3219. try {
  3220. const storageKey = `codelnotify_selected_row_${this.$store.state.user.name}`;
  3221. const savedRowKey = localStorage.getItem(storageKey);
  3222. if (savedRowKey) {
  3223. this.selectedRowKey = savedRowKey;
  3224. }
  3225. } catch (error) {
  3226. console.warn('初始化选中行状态失败:', error);
  3227. }
  3228. }
  3229. }
  3230. </script>
  3231. <style lang="scss" >
  3232. .warning-row td{
  3233. color: darkred !important;
  3234. }
  3235. /deep/ .zxClass .cell {
  3236. line-height: 24px;
  3237. font-size: 12px;
  3238. height: 24px;
  3239. }
  3240. /* 可点击的PN样式 */
  3241. .clickable-pn {
  3242. cursor: pointer;
  3243. text-decoration: underline;
  3244. }
  3245. .clickable-pn:hover {
  3246. opacity: 0.8;
  3247. }
  3248. .fake-disabled {
  3249. opacity: 0.5;
  3250. cursor: not-allowed;
  3251. }
  3252. </style>