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.

3336 lines
118 KiB

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