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.

2339 lines
82 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
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
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
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
12 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
1 year ago
1 year ago
12 months ago
1 year 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
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
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
12 months ago
1 year ago
1 year 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
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
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="60px" style="margin-top: 0px;">
  4. <el-form-item :label="'BU:'">
  5. <el-select v-model="searchData.buNo" placeholder="请选择" style="width: 80px">
  6. <el-option label="全部" value=""></el-option>
  7. <el-option
  8. v-for = "i in buList"
  9. :key = "i.buNo"
  10. :label = "i.buDesc"
  11. :value = "i.buNo">
  12. </el-option>
  13. </el-select>
  14. </el-form-item>
  15. <el-form-item :label="'发货通知单:'">
  16. <el-input v-model="searchData.delNo" style="width: 120px"></el-input>
  17. </el-form-item>
  18. <el-form-item :label="'CMC Invoice:'">
  19. <el-input v-model="searchData.cmcInvoice" style="width: 120px"></el-input>
  20. </el-form-item>
  21. <el-form-item :label="'通知单状态:'">
  22. <el-select filterable v-model="searchData.notifyStatus" style="width: 120px">
  23. <el-option label="全部" value=""></el-option>
  24. <el-option label="已计划" value="已计划"></el-option>
  25. <el-option label="已下达" value="已下达"></el-option>
  26. <el-option label="仓库已确认" value="仓库已确认"></el-option>
  27. <el-option label="已报关" value="已报关"></el-option>
  28. <el-option label="订单取消" value="订单取消"></el-option>
  29. </el-select>
  30. </el-form-item>
  31. <el-form-item :label="'ReadyDate'" >
  32. <el-date-picker
  33. style="width: 120px"
  34. v-model="searchData.startDate"
  35. type="date"
  36. format="yyyy-MM-dd"
  37. value-format="yyyy-MM-dd"
  38. placeholder="选择日期">
  39. </el-date-picker>
  40. </el-form-item>
  41. <el-form-item :label="'To'" >
  42. <el-date-picker
  43. style="width: 120px"
  44. v-model="searchData.endDate"
  45. type="date"
  46. format="yyyy-MM-dd"
  47. value-format="yyyy-MM-dd"
  48. placeholder="选择日期">
  49. </el-date-picker>
  50. </el-form-item>
  51. <el-form-item label="改单">
  52. <el-checkbox v-model="searchData.modifyData" true-label="true" false-label="false" @change="searchTable()"></el-checkbox>
  53. </el-form-item>
  54. <el-form-item :label="' '" >
  55. <el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'查询'}}</el-button>
  56. </el-form-item>
  57. <el-form-item :label="' '" >
  58. <el-button @click="importModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导入'}}</el-button>
  59. <el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button>
  60. </el-form-item><br>
  61. <el-form-item label=" ">
  62. <el-button @click="exportInvoiceList()" type="primary" style="margin-left: 2px">{{'导出发票'}}</el-button>
  63. </el-form-item>
  64. <el-form-item label=" ">
  65. <el-button @click="exportGoodsList()" type="primary" style="margin-left: 2px">{{'导出出口货物委托书'}}</el-button>
  66. </el-form-item>
  67. </el-form>
  68. <el-table
  69. @row-click="changeData"
  70. highlight-current-row
  71. :height="height"
  72. :data="dataList"
  73. ref="mainTable" :cell-style="cellStyle"
  74. border :row-class-name="tableRowClassName"
  75. v-loading="dataListLoading"
  76. style="width: 100%;">
  77. <el-table-column
  78. header-align="center"
  79. align="center"
  80. width="140"
  81. fixed="left"
  82. label="操作">
  83. <template slot-scope="scope">
  84. <a type="text" size="small" @click="updateHeaderModelDo(scope.row)">修改</a>
  85. <a type="text" style="color: green" size="small" v-if="scope.row.notifyStatus==='已计划' && scope.row.notifyStatus!=='订单取消'" @click="xiadaChoose()">下达</a>
  86. <a type="text" style="color: orange" size="small" v-if="scope.row.notifyStatus==='已下达'&& scope.row.notifyStatus!=='订单取消'" @click="jihuaEcssDel(scope.row)">取消下达</a>
  87. <a type="text" style="color: green" size="small" v-if="scope.row.notifyStatus==='已下达' && scope.row.walMartOrderFlag==='Y'" @click="declarationCompleted(scope.row)">一键结单</a>
  88. <a type="text" style="color: red" size="small" v-if="scope.row.notifyStatus!=='订单取消'" @click="cancelDelHeader(scope.row)">废弃</a>
  89. <a type="text" style="color: red" size="small" v-if="scope.row.notifyStatus==='已计划'&& scope.row.notifyStatus!=='订单取消'" @click="deleteDelHeader(scope.row)">删除</a>
  90. </template>
  91. </el-table-column>
  92. <el-table-column
  93. v-for="(item,index) in columnList1" :key="index"
  94. :sortable="item.columnSortable"
  95. :prop="item.columnProp"
  96. :header-align="item.headerAlign"
  97. :show-overflow-tooltip="item.showOverflowTooltip"
  98. :align="item.align"
  99. :fixed="item.fixed==''?false:item.fixed"
  100. :min-width="item.columnWidth"
  101. :label="item.columnLabel">
  102. <template slot-scope="scope">
  103. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  104. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  105. style="width: 100px; height: 80px"/></span>
  106. </template>
  107. </el-table-column>
  108. </el-table>
  109. <el-pagination
  110. @size-change="sizeChangeHandle"
  111. @current-change="currentChangeHandle"
  112. :current-page="pageIndex"
  113. :page-sizes="[20, 50, 100, 1000]"
  114. :page-size="pageSize"
  115. :total="totalPage"
  116. layout="total, sizes, prev, pager, next, jumper">
  117. </el-pagination>
  118. <el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick" >
  119. <el-tab-pane label="明细" name="detail">
  120. <el-button v-show="currentRow.notifyStatus!=='订单取消'" @click="openCreateDetailModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button>
  121. <el-button v-show="currentRow.notifyStatus!=='订单取消'" @click="importDetailModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'改单导入'}}</el-button>
  122. <el-table ref="detailTable"
  123. :height="height"
  124. :data="dataList2" :cell-style="cellStyleDetail"
  125. border show-summary :summary-method="getSummaries"
  126. style="width: 100%;">
  127. <el-table-column
  128. v-for="(item,index) in columnList2" :key="index"
  129. :sortable="item.columnSortable"
  130. :prop="item.columnProp"
  131. :header-align="item.headerAlign"
  132. :show-overflow-tooltip="item.showOverflowTooltip"
  133. :align="item.align"
  134. :fixed="item.fixed==''?false:item.fixed"
  135. :min-width="item.columnWidth"
  136. :label="item.columnLabel">
  137. <template slot-scope="scope">
  138. <template v-if="item.columnProp === 'ttlAmount' || item.columnProp === 'sumPrice'">
  139. <span>{{!!scope.row[item.columnProp]?scope.row[item.columnProp].toFixed(2):''}}</span>
  140. </template>
  141. <template v-else>
  142. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  143. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  144. </template>
  145. </template>
  146. </el-table-column>
  147. <el-table-column
  148. fixed="left"
  149. header-align="center"
  150. align="center"
  151. width="100" v-if="currentRow.notifyStatus!=='订单取消'"
  152. label="操作">
  153. <template slot-scope="scope">
  154. <a v-if="currentRow.notifyStatus!=='订单取消'&& scope.row.qty!==0" type="text" size="small" @click="openUpdateDetailModel(scope.row)">修改</a>
  155. <a v-if="currentRow.notifyStatus!=='订单取消' && scope.row.qty!==0" style="color: red" type="text" size="small" @click="deleteDelDetail(scope.row)">取消</a>
  156. </template>
  157. </el-table-column>
  158. </el-table>
  159. </el-tab-pane>
  160. <el-tab-pane label="装箱明细" name="pallet">
  161. <packing-detail-tab
  162. ref="packingDetailTab"
  163. :current-row="currentRow"
  164. :height="height">
  165. </packing-detail-tab>
  166. </el-tab-pane>
  167. <el-tab-pane label="相关文档" name="codelnotifyDocument">
  168. <oss-components label="申请单号" style="margin-top: 5px" height="44vh" :columns="ossColumns"
  169. :order-ref1="currentRow.site" :order-ref2="currentRow.delNo" :codelnotifyFlag="'1'"
  170. :rfq-no="currentRow.delNo">
  171. </oss-components>
  172. </el-tab-pane>
  173. </el-tabs>
  174. <el-dialog title="编辑发货通知单" :close-on-click-modal="false" v-drag :visible.sync="updateHeaderModelFlag" width="672px">
  175. <el-form label-position="top" style="margin-left: 5px;margin-top: -5px;">
  176. <el-row :gutter="20">
  177. <el-col :span="6">
  178. <el-form-item :label="'BU'" >
  179. <el-input v-model="updateHeaderModel.buDesc" disabled ></el-input>
  180. </el-form-item>
  181. </el-col>
  182. <el-col :span="6">
  183. <el-form-item :label="'CMC Invoice'" >
  184. <el-input v-model="updateHeaderModel.cmcInvoice" disabled ></el-input>
  185. </el-form-item>
  186. </el-col>
  187. <el-col :span="6">
  188. <el-form-item :label="'发货通知单号'" >
  189. <el-input v-model="updateHeaderModel.delNo" disabled ></el-input>
  190. </el-form-item>
  191. </el-col>
  192. <el-col :span="6">
  193. <el-form-item :label="'ReadyDate'" >
  194. <el-date-picker
  195. style="width: 145px"
  196. v-model="updateHeaderModel.readyDate"
  197. type="date"
  198. format="yyyy-MM-dd"
  199. value-format="yyyy-MM-dd"
  200. placeholder="选择日期">
  201. </el-date-picker>
  202. </el-form-item>
  203. </el-col>
  204. </el-row>
  205. <el-row :gutter="20">
  206. <el-col :span="6">
  207. <el-form-item :label="'ShippingMode'" >
  208. <el-input v-model="updateHeaderModel.shippingMode" ></el-input>
  209. </el-form-item>
  210. </el-col>
  211. <el-col :span="12">
  212. <el-form-item :label="'Destination'" >
  213. <el-input v-model="updateHeaderModel.destination" ></el-input>
  214. </el-form-item>
  215. </el-col>
  216. <el-col :span="6">
  217. <el-form-item :label="'发货日期'" >
  218. <el-date-picker
  219. style="width: 145px"
  220. v-model="updateHeaderModel.notifyDate"
  221. disabled
  222. type="date"
  223. format="yyyy-MM-dd"
  224. value-format="yyyy-MM-dd"
  225. placeholder="选择日期">
  226. </el-date-picker>
  227. </el-form-item>
  228. </el-col>
  229. </el-row>
  230. <el-row :gutter="20">
  231. <el-col :span="24">
  232. <el-form-item :label="'Remark'" >
  233. <el-input v-model="updateHeaderModel.remark" ></el-input>
  234. </el-form-item>
  235. </el-col>
  236. </el-row>
  237. </el-form>
  238. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  239. <el-button type="primary" @click="doUpdateHeader()">保存</el-button>
  240. <el-button type="primary" @click="updateHeaderModelFlag=false">关闭</el-button>
  241. </el-footer>
  242. </el-dialog>
  243. <el-dialog title="编辑发货通知单明细" :close-on-click-modal="false" v-drag :visible.sync="updateDetailModelFlag" width="750px">
  244. <el-form label-position="top" style="margin-left: 7px;margin-top: -5px;">
  245. <el-row :gutter="20">
  246. <el-col :span="6">
  247. <el-form-item :label="'行号'" >
  248. <el-input v-model="updateDetailModel.itemNo" style="text-align: right" disabled ></el-input>
  249. </el-form-item>
  250. </el-col>
  251. <el-col :span="6">
  252. <el-form-item :label="'PN'">
  253. <span slot="label" @click="queryComponentPartModal"><a herf="#">PN</a></span>
  254. <el-input v-model="updateDetailModel.pn" ></el-input>
  255. </el-form-item>
  256. </el-col>
  257. <el-col :span="12">
  258. <el-form-item :label="'Description'" >
  259. <el-input v-model="updateDetailModel.partDescription" ></el-input>
  260. </el-form-item>
  261. </el-col>
  262. <el-col :span="6">
  263. <el-form-item :label="'Qty (pcs)'" >
  264. <el-input v-model="updateDetailModel.qty" type="number" ></el-input>
  265. </el-form-item>
  266. </el-col>
  267. <el-col :span="6">
  268. <el-form-item :label="'销售订单号'" >
  269. <el-input v-model="updateDetailModel.salesOrder" ></el-input>
  270. </el-form-item>
  271. </el-col>
  272. <el-col :span="6">
  273. <el-form-item :label="'客户采购单号'" >
  274. <el-input v-model="updateDetailModel.customerPO" ></el-input>
  275. </el-form-item>
  276. </el-col>
  277. <el-col :span="6">
  278. <el-form-item :label="'Version'" >
  279. <el-input v-model="updateDetailModel.version" ></el-input>
  280. </el-form-item>
  281. </el-col>
  282. <el-col :span="6">
  283. <el-form-item :label="'Status'" >
  284. <el-input v-model="updateDetailModel.status" ></el-input>
  285. </el-form-item>
  286. </el-col>
  287. <el-col :span="6">
  288. <el-form-item :label="'Family'" >
  289. <el-input v-model="updateDetailModel.family" ></el-input>
  290. </el-form-item>
  291. </el-col>
  292. <el-col :span="6">
  293. <el-form-item :label="'LT (wks)'" >
  294. <el-input v-model="updateDetailModel.lt" type="number" ></el-input>
  295. </el-form-item>
  296. </el-col>
  297. <el-col :span="6">
  298. <el-form-item :label="'CMC Comment'" >
  299. <el-input v-model="updateDetailModel.cmcComment" ></el-input>
  300. </el-form-item>
  301. </el-col>
  302. <el-col :span="6">
  303. <el-form-item :label="'内外销方式'" >
  304. <el-input v-model="updateDetailModel.saleType" ></el-input>
  305. </el-form-item>
  306. </el-col>
  307. <el-col :span="6">
  308. <el-form-item :label="'AWB/ BL#'" >
  309. <el-input v-model="updateDetailModel.awbBl" ></el-input>
  310. </el-form-item>
  311. </el-col>
  312. <el-col :span="6">
  313. <el-form-item :label="'ShippingNumber'" >
  314. <el-input v-model="updateDetailModel.shippingNumber" ></el-input>
  315. </el-form-item>
  316. </el-col>
  317. <el-col :span="6">
  318. <el-form-item :label="'Forwarder Info'" >
  319. <el-input v-model="updateDetailModel.forwarderInfo" ></el-input>
  320. </el-form-item>
  321. </el-col>
  322. <el-col :span="6">
  323. <el-form-item :label="'Currency'" >
  324. <el-input v-model="updateDetailModel.currency" ></el-input>
  325. </el-form-item>
  326. </el-col>
  327. <el-col :span="6">
  328. <el-form-item :label="'TP'" >
  329. <el-input v-model="updateDetailModel.tp" type="number" ></el-input>
  330. </el-form-item>
  331. </el-col>
  332. <el-col :span="6">
  333. <el-form-item :label="'TTL Amount'" >
  334. <el-input v-model="updateDetailModel.ttlAmount" type="number" ></el-input>
  335. </el-form-item>
  336. </el-col>
  337. <el-col :span="6">
  338. <el-form-item :label="'价税合计'" >
  339. <el-input v-model="updateDetailModel.sumPrice" type="number" ></el-input>
  340. </el-form-item>
  341. </el-col>
  342. <el-col :span="6">
  343. <el-form-item :label="'SO'" >
  344. <el-input v-model="updateDetailModel.so" ></el-input>
  345. </el-form-item>
  346. </el-col>
  347. <el-col :span="6">
  348. <el-form-item :label="'UPC'" >
  349. <el-input v-model="updateDetailModel.upc" ></el-input>
  350. </el-form-item>
  351. </el-col>
  352. <el-col :span="12">
  353. <el-form-item :label="'Remark'" >
  354. <el-input v-model="updateDetailModel.remark" ></el-input>
  355. </el-form-item>
  356. </el-col>
  357. </el-row>
  358. </el-form>
  359. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  360. <el-button type="primary" @click="doUpdateDetail()">保存</el-button>
  361. <el-button type="primary" @click="updateDetailModelFlag=false">关闭</el-button>
  362. </el-footer>
  363. </el-dialog>
  364. <el-dialog title="沃尔玛订单" :close-on-click-modal="false" v-drag :visible.sync="walMartOrderDialog" width="200px">
  365. <el-form label-position="top" style="margin-left: 36px;margin-top: 10px;">
  366. <el-row :gutter="20">
  367. <el-col :span="24">
  368. <el-form-item :label="''" >
  369. <el-radio v-model="walMartOrderFlag" label="Y"></el-radio>
  370. <el-radio v-model="walMartOrderFlag" label="N"></el-radio>
  371. </el-form-item>
  372. </el-col>
  373. </el-row>
  374. </el-form>
  375. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  376. <el-button type="primary" @click="xiadaEcssDel">确定</el-button>
  377. <el-button type="primary" @click="walMartOrderDialog=false">关闭</el-button>
  378. </el-footer>
  379. </el-dialog>
  380. <!-- 导入 -->
  381. <del-upload-excel ref="delUploadExcel" @refreshTable="searchTable" v-drag></del-upload-excel>
  382. <!-- 导入 -->
  383. <del-detail-upload-excel ref="delDetailUploadExcel" @refreshTable="searchTable" v-drag></del-detail-upload-excel>
  384. <!--列表的组件-->
  385. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  386. <el-dialog title="物料清单" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="componentPartModelFlag" width="700px">
  387. <el-form :inline="true" label-position="top" :model="componentPartData">
  388. <el-form-item :label="'PN'">
  389. <el-input v-model="componentPartData.sku" clearable style="width: 120px"></el-input>
  390. </el-form-item>
  391. <el-form-item :label="'物料编码'">
  392. <el-input v-model="componentPartData.partNo" clearable style="width: 120px"></el-input>
  393. </el-form-item>
  394. <el-form-item :label="'物料描述'">
  395. <el-input v-model="componentPartData.partDesc" clearable style="width: 120px"></el-input>
  396. </el-form-item>
  397. <el-form-item :label="' '">
  398. <el-button type="primary" @click="queryComponentPartList">查询</el-button>
  399. </el-form-item>
  400. </el-form>
  401. <el-table
  402. :height="250"
  403. :data="componentPartList"
  404. @row-dblclick="getComponentRowData"
  405. border
  406. style="width: 100%;">
  407. <el-table-column
  408. v-for="(item,index) in componentPartColumnList" :key="index"
  409. :sortable="item.columnSortable"
  410. :prop="item.columnProp"
  411. :header-align="item.headerAlign"
  412. :show-overflow-tooltip="item.showOverflowTooltip"
  413. :align="item.align"
  414. :fixed="item.fixed==''?false:item.fixed"
  415. :min-width="item.columnWidth"
  416. :label="item.columnLabel">
  417. <template slot-scope="scope">
  418. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  419. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  420. </template>
  421. </el-table-column>
  422. </el-table>
  423. <!-- 分页插件 -->
  424. <el-pagination
  425. @size-change="sizeChangeHandle3"
  426. @current-change="currentChangeHandle3"
  427. :current-page="pageIndex3"
  428. :page-sizes="[20, 50, 100, 200, 500]"
  429. :page-size="pageSize3"
  430. :total="totalPage3"
  431. layout="total, sizes, prev, pager, next, jumper">
  432. </el-pagination>
  433. <el-footer style="height:35px;margin-top:10px;text-align:center">
  434. <el-button type="primary" @click="componentPartModelFlag = false">关闭</el-button>
  435. </el-footer>
  436. </el-dialog>
  437. <el-dialog title="导出发票" :close-on-click-modal="false" v-drag :visible.sync="exportInvoiceFlag" width="450px">
  438. <el-form label-position="top" style="margin-left: 2px;margin-top: 10px;">
  439. <el-row :gutter="20">
  440. <el-col :span="24">
  441. <el-form-item :label="''" >
  442. <template #label>
  443. <span slot="label" style="" class="big-label">
  444. <a href="#" @click="openTemplate('发票')">发票模版</a>
  445. </span>
  446. </template>
  447. <el-input v-model="exportInvoice.templateName" disabled ></el-input>
  448. </el-form-item>
  449. </el-col>
  450. <el-col :span="12" >
  451. <el-form-item :label="''" >
  452. <el-checkbox v-model="exportInvoice.hsCodeDesc">品名</el-checkbox>
  453. </el-form-item>
  454. </el-col>
  455. <el-col :span="12" >
  456. <el-form-item :label="''" >
  457. <el-checkbox v-model="exportInvoice.hsCodeFlag">Hs Code</el-checkbox>
  458. </el-form-item>
  459. </el-col>
  460. <el-col :span="12" >
  461. <el-form-item :label="''" >
  462. <el-checkbox v-model="exportInvoice.contractFlag">合同</el-checkbox>
  463. </el-form-item>
  464. </el-col>
  465. <el-col :span="12" >
  466. <el-form-item :label="''" >
  467. <el-checkbox v-model="exportInvoice.goodsLabel">货物明细</el-checkbox>
  468. </el-form-item>
  469. </el-col>
  470. <el-col :span="12">
  471. <el-form-item :label="'品名类型'" >
  472. <el-radio v-model="exportInvoice.hsCodeDescType" label="Y">中文</el-radio>
  473. <el-radio v-model="exportInvoice.hsCodeDescType" label="N">英文</el-radio>
  474. </el-form-item>
  475. </el-col>
  476. <el-col :span="12" v-show="currentRow.buNo==='01-Label' || currentRow.buNo==='03-RFID'">
  477. <el-form-item :label="'制造地'" >
  478. <el-input v-model="exportInvoice.origin"></el-input>
  479. </el-form-item>
  480. </el-col>
  481. <el-col :span="12">
  482. <el-form-item :label="'RFID Base Material'" >
  483. <el-checkbox v-model="exportInvoice.material"></el-checkbox>
  484. </el-form-item>
  485. </el-col>
  486. <el-col :span="12">
  487. <el-form-item :label="'HS Code'" >
  488. <el-input :disabled="!exportInvoice.material" v-model="exportInvoice.hsCode"></el-input>
  489. </el-form-item>
  490. </el-col>
  491. <el-col :span="12">
  492. <el-form-item :label="'Non-reusable plastic packaging'" >
  493. <el-checkbox v-model="exportInvoice.packaging"></el-checkbox>
  494. </el-form-item>
  495. </el-col>
  496. <el-col :span="12">
  497. <el-form-item :label="'plastic packaging'" >
  498. <el-input :disabled="!exportInvoice.packaging" v-model="exportInvoice.kgs"></el-input>
  499. </el-form-item>
  500. </el-col>
  501. <el-col :span="24" style="">
  502. <el-form-item :label="'备注'" >
  503. <el-input type="textarea" :rows="3" v-model="exportInvoice.fpremark"></el-input>
  504. </el-form-item>
  505. </el-col>
  506. </el-row>
  507. </el-form>
  508. <el-table v-show="currentRow.buNo==='03-RFID'"
  509. :height="240"
  510. :data="notifyPartDetailList"
  511. stripe
  512. highlight-current-row
  513. border :row-style="{ height: '30px' }"
  514. style="width: 100%;margin-top: 60px">
  515. <el-table-column
  516. prop="pn"
  517. header-align="center"
  518. align="center"
  519. label="PN">
  520. </el-table-column>
  521. <el-table-column
  522. prop="ehundred"
  523. header-align="center"
  524. align="center"
  525. label="E100">
  526. <template slot-scope="scope">
  527. <el-input v-model="scope.row.ehundred" style="width: 100px;"></el-input>
  528. </template>
  529. </el-table-column>
  530. <el-table-column
  531. prop="lossratio"
  532. header-align="center"
  533. align="center"
  534. label="纯FSC纸重量损耗">
  535. <template slot-scope="scope">
  536. <el-input v-model="scope.row.lossratio" style="width: 100px;"></el-input>
  537. </template>
  538. </el-table-column>
  539. </el-table>
  540. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  541. <el-button type="primary" @click="downloadInvoice()">确定</el-button>
  542. <el-button type="primary" @click="exportInvoiceFlag=false">关闭</el-button>
  543. </el-footer>
  544. </el-dialog>
  545. <el-dialog title="导出出口货物委托书" :close-on-click-modal="false" v-drag :visible.sync="exportGoodsFlag" width="500px">
  546. <el-form label-position="top" style="margin-left: 7px;margin-top: 10px;">
  547. <el-row :gutter="20">
  548. <el-col :span="12">
  549. <el-form-item :label="'品名类型'" >
  550. <el-radio v-model="exportGoods.hsCodeDescType" label="Y">中文</el-radio>
  551. <el-radio v-model="exportGoods.hsCodeDescType" label="N">英文</el-radio>
  552. </el-form-item>
  553. </el-col>
  554. <el-col :span="12">
  555. <el-form-item :label="'贸易方式'" >
  556. <el-input v-model="exportGoods.salesMethod"></el-input>
  557. </el-form-item>
  558. </el-col>
  559. <el-col :span="12">
  560. <el-form-item :label="'币制'" >
  561. <el-input v-model="exportGoods.currency"></el-input>
  562. </el-form-item>
  563. </el-col>
  564. <el-col :span="12">
  565. <el-form-item :label="'货物产地'" >
  566. <el-input v-model="exportGoods.madeArea"></el-input>
  567. </el-form-item>
  568. </el-col>
  569. <el-col :span="12">
  570. <el-form-item :label="'发货港'" >
  571. <el-input v-model="exportGoods.sendPort"></el-input>
  572. </el-form-item>
  573. </el-col>
  574. <el-col :span="12">
  575. <el-form-item :label="'唛头'" >
  576. <el-input v-model="exportGoods.voyage"></el-input>
  577. </el-form-item>
  578. </el-col>
  579. <el-col :span="12">
  580. <el-form-item :label="'提/送货日期'" >
  581. <el-input v-model="exportGoods.deliveryGoodsDate"></el-input>
  582. </el-form-item>
  583. </el-col>
  584. <el-col :span="12">
  585. <el-form-item :label="'船期'" >
  586. <el-input v-model="exportGoods.shippingDate"></el-input>
  587. </el-form-item>
  588. </el-col>
  589. <el-col :span="24">
  590. <el-form-item :label="'发货人'" >
  591. <el-input type="textarea"
  592. :rows="4" v-model="exportGoods.shipper"></el-input>
  593. </el-form-item>
  594. </el-col>
  595. </el-row>
  596. </el-form>
  597. <el-footer style="height:40px;margin-top: 80px;text-align:center">
  598. <el-button type="primary" @click="downloadExportGoods()">确定</el-button>
  599. <el-button type="primary" @click="exportGoodsFlag=false">关闭</el-button>
  600. </el-footer>
  601. </el-dialog>
  602. <el-dialog title="模版" @close="closeTemplateDialog" @open="openTemplateDialog" :visible.sync="templateFlag" width="559px" v-drag>
  603. <el-form inline="inline" label-position="top" :model="templateData" style="margin-left: 7px;margin-top: -5px;">
  604. <el-form-item label="模版名称">
  605. <el-input v-model="templateData.name" clearable style="width: 110px"></el-input>
  606. </el-form-item>
  607. <el-form-item label=" ">
  608. <el-button type="primary" style="padding: 3px 12px" @click="searchTemplateList()">查询</el-button>
  609. </el-form-item>
  610. </el-form>
  611. <el-table
  612. :height="height + 110"
  613. :data="templateList"
  614. stripe
  615. highlight-current-row
  616. border
  617. @row-dblclick="templateRowDblclick"
  618. style="width: 100%;">
  619. <el-table-column
  620. prop="buNo"
  621. header-align="center"
  622. align="center"
  623. label="BuNo">
  624. </el-table-column>
  625. <el-table-column
  626. prop="name"
  627. header-align="center"
  628. align="center"
  629. label="模版名称">
  630. </el-table-column>
  631. <el-table-column
  632. prop="shippingMode"
  633. header-align="center"
  634. align="center"
  635. label="运输方式">
  636. </el-table-column>
  637. </el-table>
  638. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  639. <el-button @click="templateFlag = false">关闭</el-button>
  640. </el-footer>
  641. </el-dialog>
  642. </div>
  643. </template>
  644. <script>
  645. import Chooselist from '@/views/modules/common/Chooselist_eam'
  646. import delUploadExcel from "./del_upload_excel.vue";
  647. import delDetailUploadExcel from "./del_detail_upload_excel.vue";
  648. import PackingDetailTab from "./components/PackingDetailTab.vue";
  649. import {} from "@/api/sysLanguage.js"
  650. import excel from "@/utils/excel-util.js";
  651. import {
  652. searchEcssCoDelNotifyHeader,
  653. searchEcssCoDelNotifyDetail,
  654. updateEcssDelHeader,
  655. deleteEcssDelHeader,
  656. cancelEcssDelHeader,
  657. changeEcssDelStatus,
  658. updateEcssDelDetail,
  659. deleteEcssDelDetail,
  660. searchCoDelPalletDataNew,
  661. queryPartListAll,
  662. searchTemplateList,
  663. getCustomers,
  664. getCustomerAdd,
  665. getNotifyPartDetail
  666. }from "@/api/ecss/ecss.js"
  667. import {getBuList}from '@/api/factory/site.js'
  668. import ExportUtil from "@/utils/export";
  669. import OssComponents from '../oss/ossComponents.vue'
  670. export default {
  671. name: "null",
  672. components:{
  673. OssComponents,
  674. delUploadExcel,
  675. delDetailUploadExcel,
  676. Chooselist,
  677. PackingDetailTab,
  678. },
  679. data() {
  680. return {
  681. pageIndex: 1,
  682. pageSize: 100,
  683. totalPage: 0,
  684. height: 200,
  685. componentPartModelFlag: false,
  686. componentPartData: {
  687. site: '',
  688. buNo: '',
  689. sku: '',
  690. partNo: '',
  691. partDesc: '',
  692. page: 1,
  693. limit: 10
  694. },
  695. pageIndex3: 1,
  696. pageSize3: 20,
  697. totalPage3: 0,
  698. componentPartList: [],
  699. componentPartColumnList: [
  700. {
  701. columnProp: 'sku',
  702. headerAlign: "center",
  703. align: "center",
  704. columnLabel: 'PN',
  705. columnHidden: false,
  706. columnImage: false,
  707. status: true,
  708. fixed: '',
  709. columnWidth: 120
  710. },
  711. {
  712. columnProp: 'partNo',
  713. headerAlign: "center",
  714. align: "center",
  715. columnLabel: '物料编码',
  716. columnHidden: false,
  717. columnImage: false,
  718. status: true,
  719. fixed: '',
  720. columnWidth: 120
  721. },
  722. {
  723. columnProp: 'partDesc',
  724. headerAlign: "center",
  725. align: "center",
  726. columnLabel: '物料描述',
  727. columnHidden: false,
  728. columnImage: false,
  729. status: true,
  730. fixed: '',
  731. columnWidth: 300
  732. },
  733. ],
  734. walMartOrderFlag: 'N',
  735. walMartOrderDialog:false,
  736. buList:[],
  737. dataList:[],
  738. dataList2:[],
  739. dataListLoading: false,
  740. searchData: {
  741. page: 1,
  742. limit: 100,
  743. buNo:'',
  744. delNo:'',
  745. cmcInvoice:'',
  746. notifyStatus:'',
  747. startDate:'',
  748. endDate:'',
  749. username:this.$store.state.user.name,
  750. },
  751. buttons:{
  752. search:'查询',
  753. },
  754. updateHeaderModelFlag:false,
  755. updateHeaderModel:{
  756. site:'',
  757. buDesc:'',
  758. cmcInvoice:'',
  759. delNo:'',
  760. readyDate:'',
  761. shippingMode:'',
  762. destination:'',
  763. notifyDate:'',
  764. remark:'',
  765. },
  766. updateDetailModelFlag:false,
  767. updateDetailModel:{
  768. site:'',
  769. buNo:'',
  770. delNo:'',
  771. itemNo:'',
  772. partNo:'',
  773. partDescription:'',
  774. qty:'',
  775. salesOrder:'',
  776. line:'',
  777. customerPO:'',
  778. version:'',
  779. status:'',
  780. family:'',
  781. lt:'',
  782. cmcComment:'',
  783. saleType:'',
  784. awbBl:'',
  785. shippingNumber:'',
  786. forwarderInfo:'',
  787. currency:'',
  788. tp:'',
  789. ttlAmount:'',
  790. sumPrice:'',
  791. so:'',
  792. upc:'',
  793. remark:'',
  794. pn:'',
  795. addFlag:''
  796. },
  797. activeName:'detail',
  798. columnList1: [
  799. {
  800. userId: this.$store.state.user.name,
  801. functionId: 801001,
  802. serialNumber: '801001Table1BuDesc',
  803. tableId: "801001Table1",
  804. tableName: "关务系统发货通知单",
  805. columnProp: "buDesc",
  806. headerAlign: "center",
  807. align: "left",
  808. columnLabel: "BU",
  809. columnHidden: false,
  810. columnImage: false,
  811. columnSortable: false,
  812. sortLv: 0,
  813. status: true,
  814. fixed: '',
  815. columnWidth: 60
  816. },
  817. {
  818. userId: this.$store.state.user.name,
  819. functionId: 801001,
  820. serialNumber: '801001Table1CmcInvoice',
  821. tableId: "801001Table1",
  822. tableName: "关务系统发货通知单",
  823. columnProp: "cmcInvoice",
  824. headerAlign: "center",
  825. align: "left",
  826. columnLabel: "CMC Invoice",
  827. columnHidden: false,
  828. columnImage: false,
  829. columnSortable: false,
  830. sortLv: 0,
  831. status: true,
  832. fixed: '',
  833. columnWidth: 100
  834. },
  835. {
  836. userId: this.$store.state.user.name,
  837. functionId: 801001,
  838. serialNumber: '801001Table1DelNo',
  839. tableId: "801001Table1",
  840. tableName: "关务系统发货通知单",
  841. columnProp: "delNo",
  842. headerAlign: "center",
  843. align: "center",
  844. columnLabel: "发货通知单号",
  845. columnHidden: false,
  846. columnImage: false,
  847. columnSortable: false,
  848. sortLv: 0,
  849. status: true,
  850. fixed: '',
  851. columnWidth: 110
  852. },
  853. {
  854. userId: this.$store.state.user.name,
  855. functionId: 801001,
  856. serialNumber: '801001Table1ReadyDate',
  857. tableId: "801001Table1",
  858. tableName: "关务系统发货通知单",
  859. columnProp: "readyDate",
  860. headerAlign: "center",
  861. align: "center",
  862. columnLabel: "ReadyDate",
  863. columnHidden: false,
  864. columnImage: false,
  865. columnSortable: false,
  866. sortLv: 0,
  867. status: true,
  868. fixed: '',
  869. columnWidth: 100
  870. },
  871. {
  872. userId: this.$store.state.user.name,
  873. functionId: 801001,
  874. serialNumber: '801001Table1CustomerName',
  875. tableId: "801001Table1",
  876. tableName: "关务系统发货通知单",
  877. columnProp: "customerName",
  878. headerAlign: "center",
  879. align: "left",
  880. columnLabel: "客户名称",
  881. columnHidden: false,
  882. columnImage: false,
  883. columnSortable: false,
  884. sortLv: 0,
  885. status: true,
  886. fixed: '',
  887. columnWidth: 220
  888. },
  889. {
  890. userId: this.$store.state.user.name,
  891. functionId: 801001,
  892. serialNumber: '801001Table1ShippingMode',
  893. tableId: "801001Table1",
  894. tableName: "关务系统发货通知单",
  895. columnProp: "shippingMode",
  896. headerAlign: "center",
  897. align: "left",
  898. columnLabel: "ShippingMode",
  899. columnHidden: false,
  900. columnImage: false,
  901. columnSortable: false,
  902. sortLv: 0,
  903. status: true,
  904. fixed: '',
  905. columnWidth: 100
  906. },
  907. {
  908. userId: this.$store.state.user.name,
  909. functionId: 801001,
  910. serialNumber: '801001Table1Destination',
  911. tableId: "801001Table1",
  912. tableName: "关务系统发货通知单",
  913. columnProp: "destination",
  914. headerAlign: "center",
  915. align: "left",
  916. columnLabel: "Destination",
  917. columnHidden: false,
  918. columnImage: false,
  919. columnSortable: false,
  920. sortLv: 0,
  921. status: true,
  922. fixed: '',
  923. columnWidth: 100
  924. },
  925. {
  926. userId: this.$store.state.user.name,
  927. functionId: 801001,
  928. serialNumber: '801001Table1NotifyStatus',
  929. tableId: "801001Table1",
  930. tableName: "关务系统发货通知单",
  931. columnProp: "notifyStatus",
  932. headerAlign: "center",
  933. align: "left",
  934. columnLabel: "通知单状态",
  935. columnHidden: false,
  936. columnImage: false,
  937. columnSortable: false,
  938. sortLv: 0,
  939. status: true,
  940. fixed: '',
  941. columnWidth: 100
  942. },
  943. {
  944. userId: this.$store.state.user.name,
  945. functionId: 801001,
  946. serialNumber: '801001Table1NotifyStatus',
  947. tableId: "801001Table1",
  948. tableName: "关务系统发货通知单",
  949. columnProp: "modifyLabel",
  950. headerAlign: "center",
  951. align: "left",
  952. columnLabel: "改单",
  953. columnHidden: false,
  954. columnImage: false,
  955. columnSortable: false,
  956. sortLv: 0,
  957. status: true,
  958. fixed: '',
  959. columnWidth: 50
  960. },
  961. {
  962. userId: this.$store.state.user.name,
  963. functionId: 801001,
  964. serialNumber: '801001Table1NotifyDate',
  965. tableId: "801001Table1",
  966. tableName: "关务系统发货通知单",
  967. columnProp: "notifyDate",
  968. headerAlign: "center",
  969. align: "center",
  970. columnLabel: "发货日期",
  971. columnHidden: false,
  972. columnImage: false,
  973. columnSortable: false,
  974. sortLv: 0,
  975. status: true,
  976. fixed: '',
  977. columnWidth: 120
  978. },
  979. {
  980. userId: this.$store.state.user.name,
  981. functionId: 801001,
  982. serialNumber: '801001Table1ErpDelNo',
  983. tableId: "801001Table1",
  984. tableName: "关务系统发货通知单",
  985. columnProp: "erpDelNo",
  986. headerAlign: "center",
  987. align: "left",
  988. columnLabel: "ERP发货单号",
  989. columnHidden: false,
  990. columnImage: false,
  991. columnSortable: false,
  992. sortLv: 0,
  993. status: true,
  994. fixed: '',
  995. columnWidth: 100
  996. },
  997. {
  998. userId: this.$store.state.user.name,
  999. functionId: 801001,
  1000. serialNumber: '801001Table1CreateBy',
  1001. tableId: "801001Table1",
  1002. tableName: "关务系统发货通知单",
  1003. columnProp: "createBy",
  1004. headerAlign: "center",
  1005. align: "left",
  1006. columnLabel: "创建人",
  1007. columnHidden: false,
  1008. columnImage: false,
  1009. columnSortable: false,
  1010. sortLv: 0,
  1011. status: true,
  1012. fixed: '',
  1013. columnWidth: 80
  1014. },
  1015. {
  1016. userId: this.$store.state.user.name,
  1017. functionId: 801001,
  1018. serialNumber: '801001Table1CreateDate',
  1019. tableId: "801001Table1",
  1020. tableName: "关务系统发货通知单",
  1021. columnProp: "createDate",
  1022. headerAlign: "center",
  1023. align: "center",
  1024. columnLabel: "创建时间",
  1025. columnHidden: false,
  1026. columnImage: false,
  1027. columnSortable: false,
  1028. sortLv: 0,
  1029. status: true,
  1030. fixed: '',
  1031. columnWidth: 130
  1032. },
  1033. {
  1034. userId: this.$store.state.user.name,
  1035. functionId: 801001,
  1036. serialNumber: '801001Table1UpdateBy',
  1037. tableId: "801001Table1",
  1038. tableName: "关务系统发货通知单",
  1039. columnProp: "updateBy",
  1040. headerAlign: "center",
  1041. align: "left",
  1042. columnLabel: "修改人",
  1043. columnHidden: false,
  1044. columnImage: false,
  1045. columnSortable: false,
  1046. sortLv: 0,
  1047. status: true,
  1048. fixed: '',
  1049. columnWidth: 80
  1050. },
  1051. {
  1052. userId: this.$store.state.user.name,
  1053. functionId: 801001,
  1054. serialNumber: '801001Table1UpdateDate',
  1055. tableId: "801001Table1",
  1056. tableName: "关务系统发货通知单",
  1057. columnProp: "updateDate",
  1058. headerAlign: "center",
  1059. align: "center",
  1060. columnLabel: "修改时间",
  1061. columnHidden: false,
  1062. columnImage: false,
  1063. columnSortable: false,
  1064. sortLv: 0,
  1065. status: true,
  1066. fixed: '',
  1067. columnWidth: 130
  1068. },
  1069. {
  1070. userId: this.$store.state.user.name,
  1071. functionId: 801001,
  1072. serialNumber: '801001Table1Remark',
  1073. tableId: "801001Table1",
  1074. tableName: "关务系统发货通知单",
  1075. columnProp: "remark",
  1076. headerAlign: "center",
  1077. align: "left",
  1078. columnLabel: "Remark",
  1079. columnHidden: false,
  1080. columnImage: false,
  1081. columnSortable: false,
  1082. sortLv: 0,
  1083. status: true,
  1084. fixed: '',
  1085. columnWidth: 300
  1086. },
  1087. ],
  1088. columnList2: [
  1089. {
  1090. userId: this.$store.state.user.name,
  1091. functionId: 801001,
  1092. serialNumber: '801001Table2ItemNo',
  1093. tableId: "801001Table2",
  1094. tableName: "关务系统发货通知单明细",
  1095. columnProp: "itemNo",
  1096. headerAlign: "center",
  1097. align: "left",
  1098. columnLabel: "行号",
  1099. columnHidden: false,
  1100. columnImage: false,
  1101. columnSortable: false,
  1102. sortLv: 0,
  1103. status: true,
  1104. fixed: '',
  1105. columnWidth: 80
  1106. },
  1107. {
  1108. userId: this.$store.state.user.name,
  1109. functionId: 801001,
  1110. serialNumber: '801001Table2PartNo',
  1111. tableId: "801001Table2",
  1112. tableName: "关务系统发货通知单明细",
  1113. columnProp: "pn",
  1114. headerAlign: "center",
  1115. align: "left",
  1116. columnLabel: "PN",
  1117. columnHidden: false,
  1118. columnImage: false,
  1119. columnSortable: false,
  1120. sortLv: 0,
  1121. status: true,
  1122. fixed: '',
  1123. columnWidth: 100
  1124. },
  1125. {
  1126. userId: this.$store.state.user.name,
  1127. functionId: 801001,
  1128. serialNumber: '801001Table2PartDescription',
  1129. tableId: "801001Table2",
  1130. tableName: "关务系统发货通知单明细",
  1131. columnProp: "partDescription",
  1132. headerAlign: "center",
  1133. align: "left",
  1134. columnLabel: "Description",
  1135. columnHidden: false,
  1136. columnImage: false,
  1137. columnSortable: false,
  1138. sortLv: 0,
  1139. status: true,
  1140. fixed: '',
  1141. columnWidth: 300
  1142. },
  1143. {
  1144. userId: this.$store.state.user.name,
  1145. functionId: 801001,
  1146. serialNumber: '801001Table2Qty',
  1147. tableId: "801001Table2",
  1148. tableName: "关务系统发货通知单明细",
  1149. columnProp: "qty",
  1150. headerAlign: "center",
  1151. align: "right",
  1152. columnLabel: "Qty (pcs)",
  1153. columnHidden: false,
  1154. columnImage: false,
  1155. columnSortable: false,
  1156. sortLv: 0,
  1157. status: true,
  1158. fixed: '',
  1159. columnWidth: 100
  1160. },
  1161. {
  1162. userId: this.$store.state.user.name,
  1163. functionId: 801001,
  1164. serialNumber: '801001Table2SalesOrder',
  1165. tableId: "801001Table2",
  1166. tableName: "关务系统发货通知单明细",
  1167. columnProp: "salesOrder",
  1168. headerAlign: "center",
  1169. align: "left",
  1170. columnLabel: "销售订单号",
  1171. columnHidden: false,
  1172. columnImage: false,
  1173. columnSortable: false,
  1174. sortLv: 0,
  1175. status: true,
  1176. fixed: '',
  1177. columnWidth: 100
  1178. },
  1179. {
  1180. userId: this.$store.state.user.name,
  1181. functionId: 801001,
  1182. serialNumber: '801001Table2CustomerPO',
  1183. tableId: "801001Table2",
  1184. tableName: "关务系统发货通知单明细",
  1185. columnProp: "customerPO",
  1186. headerAlign: "center",
  1187. align: "left",
  1188. columnLabel: "客户采购单号",
  1189. columnHidden: false,
  1190. columnImage: false,
  1191. columnSortable: false,
  1192. sortLv: 0,
  1193. status: true,
  1194. fixed: '',
  1195. columnWidth: 100
  1196. },
  1197. {
  1198. userId: this.$store.state.user.name,
  1199. functionId: 801001,
  1200. serialNumber: '801001Table2Version',
  1201. tableId: "801001Table2",
  1202. tableName: "关务系统发货通知单明细",
  1203. columnProp: "version",
  1204. headerAlign: "center",
  1205. align: "left",
  1206. columnLabel: "Version",
  1207. columnHidden: false,
  1208. columnImage: false,
  1209. columnSortable: false,
  1210. sortLv: 0,
  1211. status: true,
  1212. fixed: '',
  1213. columnWidth: 100
  1214. },
  1215. {
  1216. userId: this.$store.state.user.name,
  1217. functionId: 801001,
  1218. serialNumber: '801001Table2Status',
  1219. tableId: "801001Table2",
  1220. tableName: "关务系统发货通知单明细",
  1221. columnProp: "status",
  1222. headerAlign: "center",
  1223. align: "left",
  1224. columnLabel: "Status",
  1225. columnHidden: false,
  1226. columnImage: false,
  1227. columnSortable: false,
  1228. sortLv: 0,
  1229. status: true,
  1230. fixed: '',
  1231. columnWidth: 100
  1232. },
  1233. {
  1234. userId: this.$store.state.user.name,
  1235. functionId: 801001,
  1236. serialNumber: '801001Table2Family',
  1237. tableId: "801001Table2",
  1238. tableName: "关务系统发货通知单明细",
  1239. columnProp: "family",
  1240. headerAlign: "center",
  1241. align: "left",
  1242. columnLabel: "Family",
  1243. columnHidden: false,
  1244. columnImage: false,
  1245. columnSortable: false,
  1246. sortLv: 0,
  1247. status: true,
  1248. fixed: '',
  1249. columnWidth: 100
  1250. },
  1251. {
  1252. userId: this.$store.state.user.name,
  1253. functionId: 801001,
  1254. serialNumber: '801001Table2Lt',
  1255. tableId: "801001Table2",
  1256. tableName: "关务系统发货通知单明细",
  1257. columnProp: "lt",
  1258. headerAlign: "center",
  1259. align: "right",
  1260. columnLabel: "LT (wks)",
  1261. columnHidden: false,
  1262. columnImage: false,
  1263. columnSortable: false,
  1264. sortLv: 0,
  1265. status: true,
  1266. fixed: '',
  1267. columnWidth: 100
  1268. },
  1269. {
  1270. userId: this.$store.state.user.name,
  1271. functionId: 801001,
  1272. serialNumber: '801001Table2CmcComment',
  1273. tableId: "801001Table2",
  1274. tableName: "关务系统发货通知单明细",
  1275. columnProp: "cmcComment",
  1276. headerAlign: "center",
  1277. align: "left",
  1278. columnLabel: "CMC Comment",
  1279. columnHidden: false,
  1280. columnImage: false,
  1281. columnSortable: false,
  1282. sortLv: 0,
  1283. status: true,
  1284. fixed: '',
  1285. columnWidth: 100
  1286. },
  1287. {
  1288. userId: this.$store.state.user.name,
  1289. functionId: 801001,
  1290. serialNumber: '801001Table2SaleType',
  1291. tableId: "801001Table2",
  1292. tableName: "关务系统发货通知单明细",
  1293. columnProp: "saleType",
  1294. headerAlign: "center",
  1295. align: "left",
  1296. columnLabel: "内外销方式",
  1297. columnHidden: false,
  1298. columnImage: false,
  1299. columnSortable: false,
  1300. sortLv: 0,
  1301. status: true,
  1302. fixed: '',
  1303. columnWidth: 100
  1304. },
  1305. {
  1306. userId: this.$store.state.user.name,
  1307. functionId: 801001,
  1308. serialNumber: '801001Table2AwbBl',
  1309. tableId: "801001Table2",
  1310. tableName: "关务系统发货通知单明细",
  1311. columnProp: "awbBl",
  1312. headerAlign: "center",
  1313. align: "left",
  1314. columnLabel: "AWB/ BL#",
  1315. columnHidden: false,
  1316. columnImage: false,
  1317. columnSortable: false,
  1318. sortLv: 0,
  1319. status: true,
  1320. fixed: '',
  1321. columnWidth: 100
  1322. },
  1323. {
  1324. userId: this.$store.state.user.name,
  1325. functionId: 801001,
  1326. serialNumber: '801001Table2ShippingNumber',
  1327. tableId: "801001Table2",
  1328. tableName: "关务系统发货通知单明细",
  1329. columnProp: "shippingNumber",
  1330. headerAlign: "center",
  1331. align: "left",
  1332. columnLabel: "ShippingNumber",
  1333. columnHidden: false,
  1334. columnImage: false,
  1335. columnSortable: false,
  1336. sortLv: 0,
  1337. status: true,
  1338. fixed: '',
  1339. columnWidth: 100
  1340. },
  1341. {
  1342. userId: this.$store.state.user.name,
  1343. functionId: 801001,
  1344. serialNumber: '801001Table2ForwarderInfo',
  1345. tableId: "801001Table2",
  1346. tableName: "关务系统发货通知单明细",
  1347. columnProp: "forwarderInfo",
  1348. headerAlign: "center",
  1349. align: "left",
  1350. columnLabel: "Forwarder Info",
  1351. columnHidden: false,
  1352. columnImage: false,
  1353. columnSortable: false,
  1354. sortLv: 0,
  1355. status: true,
  1356. fixed: '',
  1357. columnWidth: 100
  1358. },
  1359. {
  1360. userId: this.$store.state.user.name,
  1361. functionId: 801001,
  1362. serialNumber: '801001Table2Currency',
  1363. tableId: "801001Table2",
  1364. tableName: "关务系统发货通知单明细",
  1365. columnProp: "currency",
  1366. headerAlign: "center",
  1367. align: "left",
  1368. columnLabel: "Currency",
  1369. columnHidden: false,
  1370. columnImage: false,
  1371. columnSortable: false,
  1372. sortLv: 0,
  1373. status: true,
  1374. fixed: '',
  1375. columnWidth: 100
  1376. },
  1377. {
  1378. userId: this.$store.state.user.name,
  1379. functionId: 801001,
  1380. serialNumber: '801001Table2Tp',
  1381. tableId: "801001Table2",
  1382. tableName: "关务系统发货通知单明细",
  1383. columnProp: "tp",
  1384. headerAlign: "center",
  1385. align: "right",
  1386. columnLabel: "TP",
  1387. columnHidden: false,
  1388. columnImage: false,
  1389. columnSortable: false,
  1390. sortLv: 0,
  1391. status: true,
  1392. fixed: '',
  1393. columnWidth: 80
  1394. },
  1395. {
  1396. userId: this.$store.state.user.name,
  1397. functionId: 801001,
  1398. serialNumber: '801001Table2TtlAmount',
  1399. tableId: "801001Table2",
  1400. tableName: "关务系统发货通知单明细",
  1401. columnProp: "ttlAmount",
  1402. headerAlign: "center",
  1403. align: "right",
  1404. columnLabel: "TTL Amount",
  1405. columnHidden: false,
  1406. columnImage: false,
  1407. columnSortable: false,
  1408. sortLv: 0,
  1409. status: true,
  1410. fixed: '',
  1411. columnWidth: 80
  1412. },
  1413. {
  1414. userId: this.$store.state.user.name,
  1415. functionId: 801001,
  1416. serialNumber: '801001Table2SumPrice',
  1417. tableId: "801001Table2",
  1418. tableName: "关务系统发货通知单明细",
  1419. columnProp: "sumPrice",
  1420. headerAlign: "center",
  1421. align: "right",
  1422. columnLabel: "价税合计",
  1423. columnHidden: false,
  1424. columnImage: false,
  1425. columnSortable: false,
  1426. sortLv: 0,
  1427. status: true,
  1428. fixed: '',
  1429. columnWidth: 80
  1430. },
  1431. {
  1432. userId: this.$store.state.user.name,
  1433. functionId: 801001,
  1434. serialNumber: '801001Table2So',
  1435. tableId: "801001Table2",
  1436. tableName: "关务系统发货通知单明细",
  1437. columnProp: "so",
  1438. headerAlign: "center",
  1439. align: "left",
  1440. columnLabel: "SO",
  1441. columnHidden: false,
  1442. columnImage: false,
  1443. columnSortable: false,
  1444. sortLv: 0,
  1445. status: true,
  1446. fixed: '',
  1447. columnWidth: 100
  1448. },
  1449. {
  1450. userId: this.$store.state.user.name,
  1451. functionId: 801001,
  1452. serialNumber: '801001Table2Upc',
  1453. tableId: "801001Table2",
  1454. tableName: "关务系统发货通知单明细",
  1455. columnProp: "upc",
  1456. headerAlign: "center",
  1457. align: "left",
  1458. columnLabel: "UPC",
  1459. columnHidden: false,
  1460. columnImage: false,
  1461. columnSortable: false,
  1462. sortLv: 0,
  1463. status: true,
  1464. fixed: '',
  1465. columnWidth: 100
  1466. },
  1467. // {
  1468. // userId: this.$store.state.user.name,
  1469. // functionId: 801001,
  1470. // serialNumber: '801001Table2ErpDelItemNo',
  1471. // tableId: "801001Table2",
  1472. // tableName: "关务系统发货通知单明细",
  1473. // columnProp: "erpDelItemNo",
  1474. // headerAlign: "center",
  1475. // align: "right",
  1476. // columnLabel: "ERP发货单行号",
  1477. // columnHidden: false,
  1478. // columnImage: false,
  1479. // columnSortable: false,
  1480. // sortLv: 0,
  1481. // status: true,
  1482. // fixed: '',
  1483. // columnWidth: 60
  1484. // },
  1485. {
  1486. userId: this.$store.state.user.name,
  1487. functionId: 801001,
  1488. serialNumber: '801001Table2Remark',
  1489. tableId: "801001Table2",
  1490. tableName: "关务系统发货通知单明细",
  1491. columnProp: "remark",
  1492. headerAlign: "center",
  1493. align: "left",
  1494. columnLabel: "Remark",
  1495. columnHidden: false,
  1496. columnImage: false,
  1497. columnSortable: false,
  1498. sortLv: 0,
  1499. status: true,
  1500. fixed: '',
  1501. columnWidth: 300
  1502. },
  1503. ],
  1504. ossColumns:[
  1505. {
  1506. userId: this.$store.state.user.name,
  1507. functionId: 103001,
  1508. serialNumber: '103001Table2FileName',
  1509. tableId: '103001Table2',
  1510. tableName: '文件信息表',
  1511. columnProp: 'fileName',
  1512. headerAlign: 'center',
  1513. align: 'center',
  1514. columnLabel: '文件名称',
  1515. columnHidden: false,
  1516. columnImage: false,
  1517. columnSortable: false,
  1518. sortLv: 0,
  1519. status: true,
  1520. fixed: '',
  1521. columnWidth: 140
  1522. },
  1523. {
  1524. userId: this.$store.state.user.name,
  1525. functionId: 103001,
  1526. serialNumber: '103001Table2FileRemark',
  1527. tableId: '103001Table2',
  1528. tableName: '文件信息表',
  1529. columnProp: 'fileRemark',
  1530. headerAlign: 'center',
  1531. align: 'center',
  1532. columnLabel: '备注',
  1533. columnHidden: false,
  1534. columnImage: false,
  1535. columnSortable: false,
  1536. sortLv: 0,
  1537. status: true,
  1538. fixed: '',
  1539. columnWidth: 240
  1540. },
  1541. {
  1542. userId: this.$store.state.user.name,
  1543. functionId: 103001,
  1544. serialNumber: '103001Table2CreateDate',
  1545. tableId: '103001Table2',
  1546. tableName: '文件信息表',
  1547. columnProp: 'createDate',
  1548. headerAlign: 'center',
  1549. align: 'center',
  1550. columnLabel: '上传时间',
  1551. columnHidden: false,
  1552. columnImage: false,
  1553. columnSortable: false,
  1554. sortLv: 0,
  1555. status: true,
  1556. fixed: '',
  1557. columnWidth: 140
  1558. },
  1559. {
  1560. userId: this.$store.state.user.name,
  1561. functionId: 103001,
  1562. serialNumber: '103001Table2CreatedBy',
  1563. tableId: '103001Table2',
  1564. tableName: '文件信息表',
  1565. columnProp: 'createdBy',
  1566. headerAlign: 'center',
  1567. align: 'center',
  1568. columnLabel: '上传人',
  1569. columnHidden: false,
  1570. columnImage: false,
  1571. columnSortable: false,
  1572. sortLv: 0,
  1573. status: true,
  1574. fixed: '',
  1575. columnWidth: 140
  1576. }
  1577. ],
  1578. currentRow:{},
  1579. // 导出 start
  1580. exportData: [],
  1581. exportName: '发货通知单'+this.dayjs().format('YYYYMMDDHHmmss'),
  1582. exportHeader: ["发货通知单"],
  1583. exportFooter: [],
  1584. // 导出 end
  1585. exportInvoiceFlag:false,
  1586. exportInvoice:{
  1587. origin:"made in china",
  1588. templateName:'',
  1589. hsCodeDesc:'',
  1590. contractFlag:'',
  1591. packaging:'',
  1592. kgs:'',
  1593. hsCode:'',
  1594. material:'',
  1595. hsCodeDescType:'',
  1596. goodsLabel:true,
  1597. hsCodeFlag:true,
  1598. overseasShipper:'',
  1599. overseasAddress:'',
  1600. fpremark:'',
  1601. },
  1602. exportGoodsFlag:false,
  1603. exportGoods:{
  1604. salesMethod:'EXW',
  1605. currency: 'USD',
  1606. madeArea: 'Shanghai, China',
  1607. sendPort:'Shanghai, China',
  1608. deliveryGoodsDate:'',
  1609. voyage :'',
  1610. shippingDate:'',
  1611. hsCodeDescType:'Y',
  1612. shipper:'Checkpoint Commercial (Shanghai) Co., Ltd. 保点贸易(上海)有限公司\t\t\t\t\t\t\n' +
  1613. 'Room 1411, No. 31, Lane 2419, Hunan Road, Pudong New Area, Shanghai\t\t\t\t\t\t\n' +
  1614. '电话/Tel: (86-21)38112888 传真/Fax: (86-21)38112990\t\t\t\t\t\t\n' +
  1615. '上海市浦东新区沪南路2419弄31号1411室\t\t\t\t\t\t\n'
  1616. },
  1617. notifyPartDetailList:[],
  1618. templateFlag:false,
  1619. templateData:{},
  1620. templateList:[],
  1621. customerData:{},
  1622. customerAddData:{},
  1623. }
  1624. },
  1625. mounted() {
  1626. this.$nextTick(() => {
  1627. this.height = (window.innerHeight - 240)/2;
  1628. })
  1629. },
  1630. methods: {
  1631. // 获取基础数据列表S
  1632. getBaseList(val, type) {
  1633. this.tagNo = val
  1634. this.$nextTick(() => {
  1635. let strVal = ''
  1636. if (val === 507) {
  1637. strVal = this.updateDetailModel.partNo
  1638. }
  1639. this.$refs.baseList.init(val, strVal)
  1640. })
  1641. },
  1642. /* 列表方法的回调 */
  1643. getBaseData(val) {
  1644. if (this.tagNo === 507) {
  1645. this.updateDetailModel.partNo = val.part_no
  1646. }
  1647. },
  1648. // 每页数
  1649. sizeChangeHandle (val) {
  1650. this.pageSize = val
  1651. this.pageIndex = 1
  1652. this.searchTable()
  1653. },
  1654. // 当前页
  1655. currentChangeHandle (val) {
  1656. this.pageIndex = val
  1657. this.searchTable()
  1658. },
  1659. searchTable(){
  1660. this.searchData.limit = this.pageSize
  1661. this.searchData.page = this.pageIndex
  1662. searchEcssCoDelNotifyHeader(this.searchData).then(({data}) => {
  1663. //区分请求成功和失败的状况
  1664. if (data && data.code == 0) {
  1665. this.dataList = data.page.list
  1666. this.pageIndex = data.page.currPage
  1667. this.pageSize = data.page.pageSize
  1668. this.totalPage = data.page.totalCount
  1669. if(this.dataList.length>0){
  1670. this.$refs.mainTable.setCurrentRow(this.dataList[0]);
  1671. this.changeData(this.dataList[0])
  1672. this.dataList.forEach(o => {
  1673. o.modifyLabel = !!o.modifyFlag?'是':'';
  1674. });
  1675. }else {
  1676. this.changeData(null)
  1677. }
  1678. } else {
  1679. this.dataList = [];
  1680. }
  1681. });
  1682. },
  1683. changeData(row){
  1684. this.currentRow = JSON.parse(JSON.stringify(row));
  1685. this.headerData=row;
  1686. this.refreshCurrentTabTable ();
  1687. },
  1688. importModel(){
  1689. this.$nextTick(() => {
  1690. this.$refs.delUploadExcel.init()
  1691. })
  1692. },
  1693. importDetailModel(){
  1694. this.$nextTick(() => {
  1695. this.$refs.delDetailUploadExcel.init(this.currentRow)
  1696. })
  1697. },
  1698. refreshCurrentTabTable(){
  1699. if(this.currentRow===''||this.currentRow===null){
  1700. this.currentRow={site:'',delNo:''}
  1701. }
  1702. if(this.activeName==='detail'){
  1703. searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => {
  1704. //区分请求成功和失败的状况
  1705. if (data && data.code == 0) {
  1706. this.dataList2 = data.rows
  1707. } else {
  1708. this.dataList2 = [];
  1709. }
  1710. });
  1711. }
  1712. if(this.activeName==='pallet'){
  1713. // 刷新装箱明细组件
  1714. if (this.$refs.packingDetailTab) {
  1715. this.$refs.packingDetailTab.refresh();
  1716. }
  1717. }
  1718. },
  1719. tabClick (tab, event) {
  1720. // 刷新列表数据
  1721. this.refreshCurrentTabTable()
  1722. },
  1723. updateHeaderModelDo(row){
  1724. this.updateHeaderModel=JSON.parse(JSON.stringify(row));
  1725. this.updateHeaderModelFlag=true
  1726. },
  1727. doUpdateHeader(){
  1728. if(this.updateHeaderModel.readyDate==null||this.updateHeaderModel.readyDate==''){
  1729. this.$alert('请选择ReadyDate!', '错误', {
  1730. confirmButtonText: '确定'
  1731. })
  1732. return false
  1733. }
  1734. updateEcssDelHeader(this.updateHeaderModel).then(({data}) => {
  1735. if (data && data.code === 0) {
  1736. this.searchTable()
  1737. this.updateHeaderModelFlag = false
  1738. this.$message({
  1739. message: '操作成功',
  1740. type: 'success',
  1741. duration: 1500,
  1742. onClose: () => {}
  1743. })
  1744. } else {
  1745. this.$alert(data.msg, '错误', {
  1746. confirmButtonText: '确定'
  1747. })
  1748. }
  1749. })
  1750. },
  1751. deleteDelHeader(row){
  1752. this.$confirm('确认删除吗?', '提示').then(() => {
  1753. deleteEcssDelHeader(row).then(({data}) => {
  1754. if (data && data.code === 0) {
  1755. this.searchTable()
  1756. this.$message({
  1757. message: '操作成功',
  1758. type: 'success',
  1759. duration: 1500,
  1760. onClose: () => {}
  1761. })
  1762. } else {
  1763. this.$alert(data.msg, '错误', {
  1764. confirmButtonText: '确定'
  1765. })
  1766. }
  1767. })
  1768. })
  1769. },
  1770. xiadaChoose(){
  1771. if (this.dataList2.length===0) {
  1772. this.$alert('该发货通知单下没有明细无法下达!', '错误', {
  1773. confirmButtonText: '确定'
  1774. })
  1775. return false
  1776. }
  1777. if (this.currentRow.buNo=='03-RFID') {
  1778. this.walMartOrderDialog=true;
  1779. this.walMartOrderFlag='N';
  1780. } else {
  1781. this.xiadaEcssDel()
  1782. }
  1783. },
  1784. cancelDelHeader(row){
  1785. this.$confirm('确认废弃吗?', '提示').then(() => {
  1786. cancelEcssDelHeader(row).then(({data}) => {
  1787. if (data && data.code === 0) {
  1788. this.searchTable()
  1789. this.$message({
  1790. message: '操作成功',
  1791. type: 'success',
  1792. duration: 1500,
  1793. onClose: () => {}
  1794. })
  1795. } else {
  1796. this.$alert(data.msg, '错误', {
  1797. confirmButtonText: '确定'
  1798. })
  1799. }
  1800. })
  1801. })
  1802. },
  1803. tableRowClassName({row}) {
  1804. if (row.notifyStatus==='订单取消') {
  1805. return 'warning-row';
  1806. }
  1807. },
  1808. cellStyle({row, column }) {
  1809. if (column.property === 'modifyLabel' && row.modifyLabel==='是') { // 根据列属性判断
  1810. return { color: '#ff5d03' };
  1811. }
  1812. return {};
  1813. },
  1814. cellStyleDetail({row, column }) {
  1815. if ((column.property === 'pn' || column.property === 'qty') && row.modifyFlag===true) { // 根据列属性判断
  1816. return { color: '#ff5d03' };
  1817. }
  1818. return {};
  1819. },
  1820. xiadaEcssDel(){
  1821. let inData={
  1822. site:this.currentRow.site,
  1823. buNo:this.currentRow.buNo,
  1824. createBy:this.currentRow.createBy,
  1825. delNo:this.currentRow.delNo,
  1826. cmcInvoice:this.currentRow.cmcInvoice,
  1827. notifyStatus:'已下达',
  1828. walMartOrderFlag:this.walMartOrderFlag
  1829. }
  1830. this.$confirm('确认下达吗?', '提示').then(() => {
  1831. changeEcssDelStatus(inData).then(({data}) => {
  1832. if (data && data.code === 0) {
  1833. this.searchTable()
  1834. this.$message({
  1835. message: '操作成功',
  1836. type: 'success',
  1837. duration: 1500,
  1838. onClose: () => {}
  1839. })
  1840. } else {
  1841. this.$alert(data.msg, '错误', {
  1842. confirmButtonText: '确定'
  1843. })
  1844. }
  1845. })
  1846. })
  1847. this.walMartOrderDialog=false;
  1848. },
  1849. jihuaEcssDel(row){
  1850. let inData={
  1851. site:row.site,
  1852. delNo:row.delNo,
  1853. notifyStatus:'已计划'
  1854. }
  1855. this.$confirm('确认取消下达吗?', '提示').then(() => {
  1856. changeEcssDelStatus(inData).then(({data}) => {
  1857. if (data && data.code === 0) {
  1858. this.searchTable()
  1859. this.$message({
  1860. message: '操作成功',
  1861. type: 'success',
  1862. duration: 1500,
  1863. onClose: () => {}
  1864. })
  1865. } else {
  1866. this.$alert(data.msg, '错误', {
  1867. confirmButtonText: '确定'
  1868. })
  1869. }
  1870. })
  1871. })
  1872. },
  1873. declarationCompleted(row){
  1874. let inData={
  1875. site:row.site,
  1876. delNo:row.delNo,
  1877. walMartOrderFlag:row.walMartOrderFlag,
  1878. notifyStatus:'已报关'
  1879. }
  1880. this.$confirm('确认一键结单吗?', '提示').then(() => {
  1881. changeEcssDelStatus(inData).then(({data}) => {
  1882. if (data && data.code === 0) {
  1883. this.searchTable()
  1884. this.$message({
  1885. message: '操作成功',
  1886. type: 'success',
  1887. duration: 1500,
  1888. onClose: () => {}
  1889. })
  1890. } else {
  1891. this.$alert(data.msg, '错误', {
  1892. confirmButtonText: '确定'
  1893. })
  1894. }
  1895. })
  1896. })
  1897. },
  1898. // 每页数
  1899. sizeChangeHandle3 (val) {
  1900. this.pageSize3 = val
  1901. this.pageIndex3 = 1
  1902. this.queryComponentPartModal()
  1903. },
  1904. // 当前页
  1905. currentChangeHandle3 (val) {
  1906. this.pageIndex3 = val
  1907. this.queryComponentPartModal()
  1908. },
  1909. // 子物料列表
  1910. queryComponentPartModal () {
  1911. this.componentPartData.limit = this.pageSize3
  1912. this.componentPartData.page = this.pageIndex3
  1913. this.componentPartData.site = this.currentRow.site
  1914. this.componentPartData.buNo = this.currentRow.buNo
  1915. // 查询所有物料
  1916. queryPartListAll(this.componentPartData).then(({data}) => {
  1917. if (data && data.code === 0) {
  1918. this.componentPartList = data.page.list
  1919. this.pageIndex3 = data.page.currPage
  1920. this.pageSize3 = data.page.pageSize
  1921. this.totalPage3 = data.page.totalCount
  1922. this.componentPartModelFlag = true
  1923. } else {
  1924. this.componentPartList = []
  1925. }
  1926. })
  1927. },
  1928. // 物料查询列表
  1929. queryComponentPartList () {
  1930. this.componentPartData.limit = this.pageSize3
  1931. this.componentPartData.page = this.pageIndex3
  1932. // 查询所有物料
  1933. queryPartListAll(this.componentPartData).then(({data}) => {
  1934. if (data && data.code === 0) {
  1935. this.componentPartList = data.page.list
  1936. this.pageIndex3 = data.page.currPage
  1937. this.pageSize3 = data.page.pageSize
  1938. this.totalPage3 = data.page.totalCount
  1939. } else {
  1940. this.componentPartList = []
  1941. }
  1942. })
  1943. },
  1944. // 双击选中子物料
  1945. getComponentRowData (row) {
  1946. this.updateDetailModel.partDescription = row.partDesc
  1947. this.updateDetailModel.pn = row.sku
  1948. this.updateDetailModel.partNo = row.partNo
  1949. this.componentPartModelFlag = false
  1950. },
  1951. doUpdateDetail(){
  1952. if(this.updateDetailModel.partNo==null||this.updateDetailModel.partNo==''){
  1953. this.$alert('请输入PN!', '错误', {
  1954. confirmButtonText: '确定'
  1955. })
  1956. return false
  1957. }
  1958. if(this.updateDetailModel.qty==null||this.updateDetailModel.qty==''){
  1959. this.$alert('请输入QTY!', '错误', {
  1960. confirmButtonText: '确定'
  1961. })
  1962. return false
  1963. }
  1964. if(this.updateDetailModel.qty<=0){
  1965. this.$alert('QTY必须大于0!', '错误', {
  1966. confirmButtonText: '确定'
  1967. })
  1968. return false
  1969. }
  1970. updateEcssDelDetail(this.updateDetailModel).then(({data}) => {
  1971. if (data && data.code === 0) {
  1972. this.refreshCurrentTabTable()
  1973. this.updateDetailModelFlag=false
  1974. this.$message({
  1975. message: '操作成功',
  1976. type: 'success',
  1977. duration: 1500,
  1978. onClose: () => {}
  1979. })
  1980. } else {
  1981. this.$alert(data.msg, '错误', {
  1982. confirmButtonText: '确定'
  1983. })
  1984. }
  1985. })
  1986. },
  1987. openCreateDetailModel(){
  1988. this.updateDetailModel.site=this.currentRow.site;
  1989. this.updateDetailModel.buNo=this.currentRow.buNo;
  1990. this.updateDetailModel.delNo=this.currentRow.delNo;
  1991. this.updateDetailModel.partNo=''
  1992. this.updateDetailModel.qty=''
  1993. this.updateDetailModel.partDescription=''
  1994. this.updateDetailModel.itemNo=''
  1995. this.updateDetailModel.salesOrder=''
  1996. this.updateDetailModel.line=''
  1997. this.updateDetailModel.customerPO=''
  1998. this.updateDetailModel.version=''
  1999. this.updateDetailModel.status=''
  2000. this.updateDetailModel.family=''
  2001. this.updateDetailModel.lt=''
  2002. this.updateDetailModel.cmcComment=''
  2003. this.updateDetailModel.saleType=''
  2004. this.updateDetailModel.awbBl=''
  2005. this.updateDetailModel.shippingNumber=''
  2006. this.updateDetailModel.forwarderInfo=''
  2007. this.updateDetailModel.currency=''
  2008. this.updateDetailModel.tp=''
  2009. this.updateDetailModel.ttlAmount=''
  2010. this.updateDetailModel.sumPrice=''
  2011. this.updateDetailModel.so=''
  2012. this.updateDetailModel.upc=''
  2013. this.updateDetailModel.remark=''
  2014. this.updateDetailModel.pn=''
  2015. this.updateDetailModel.addFlag=0
  2016. this.updateDetailModelFlag=true
  2017. },
  2018. openUpdateDetailModel(row){
  2019. this.updateDetailModel=JSON.parse(JSON.stringify(row));
  2020. this.updateDetailModel.addFlag=1
  2021. this.updateDetailModelFlag=true
  2022. },
  2023. deleteDelDetail(row){
  2024. this.$confirm('确认取消此明细?', '提示').then(() => {
  2025. deleteEcssDelDetail(row).then(({data}) => {
  2026. if (data && data.code === 0) {
  2027. this.refreshCurrentTabTable()
  2028. this.$message({
  2029. message: '操作成功',
  2030. type: 'success',
  2031. duration: 1500,
  2032. onClose: () => {}
  2033. })
  2034. } else {
  2035. this.$alert(data.msg, '错误', {
  2036. confirmButtonText: '确定'
  2037. })
  2038. }
  2039. })
  2040. })
  2041. },
  2042. getBu () {
  2043. let tempData = {
  2044. username: this.$store.state.user.name,
  2045. }
  2046. getBuList(tempData).then(({data}) => {
  2047. if (data.code === 0) {
  2048. this.buList = data.row2
  2049. if (this.buList.length===1) {
  2050. this.searchData.buNo = this.buList[0].buNo;
  2051. }
  2052. }
  2053. })
  2054. },
  2055. //导出excel
  2056. async createExportData() {
  2057. this.searchData.limit = -1
  2058. this.searchData.page = 1
  2059. await searchEcssCoDelNotifyHeader(this.searchData).then(({data}) => {
  2060. this.exportList= data.page.list;
  2061. })
  2062. return this.exportList;
  2063. },
  2064. startDownload() {
  2065. // this.exportData = this.dataList
  2066. },
  2067. finishDownload() {
  2068. },
  2069. fields() {
  2070. let json = "{"
  2071. this.columnList1.forEach((item, index) => {
  2072. if (index == this.columnList1.length - 1) {
  2073. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  2074. } else {
  2075. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  2076. }
  2077. })
  2078. json += "}"
  2079. let s = eval("(" + json + ")")
  2080. return s
  2081. },
  2082. async exportExcel() {
  2083. this.searchData.limit = -1
  2084. this.searchData.page = 1
  2085. excel.exportTable({
  2086. url: "/ecss/coDel/searchEcssCoDelNotifyHeader",
  2087. columnMapping: this.columnList1,//可以直接用table,不需要的列就剔除
  2088. mergeSetting: [],//需要合并的列
  2089. params: this.searchData,
  2090. fileName: this.exportName+".xlsx",
  2091. rowFetcher: res => res.data,
  2092. columnFormatter: [],
  2093. dropColumns: [],//需要剔除的列,例如dropColumns: ["netWeight"],即剔除净重列
  2094. });
  2095. },
  2096. getSummaries(param) {
  2097. const { columns } = param;
  2098. const sums = [];
  2099. columns.forEach((column, index) => {
  2100. if (index === 0) {
  2101. sums[index] = '合计';
  2102. return;
  2103. }
  2104. let sumDataList = this.dataList2.filter(item => item.qty>0);
  2105. const values = sumDataList.map(item => Number(item[column.property]));
  2106. if (!values.every(value => isNaN(value))) {
  2107. switch(column.property) {
  2108. case 'qty':
  2109. sums[index] = `${values.reduce((a, b) => a + b, 0)}`;
  2110. break;
  2111. case 'ttlAmount':
  2112. sums[index] = `${values.reduce((a, b) => a + b, 0).toFixed(2)}`;
  2113. break;
  2114. case 'sumPrice':
  2115. sums[index] = `${values.reduce((a, b) => a + b, 0).toFixed(2)}`;
  2116. break;
  2117. default:
  2118. sums[index] = '';
  2119. }
  2120. } else {
  2121. sums[index] = '';
  2122. }
  2123. });
  2124. this.$nextTick(() => this.$refs.detailTable.doLayout());// 强制刷新布局, 否则会被表格覆盖
  2125. return sums;
  2126. },
  2127. exportInvoiceList() {
  2128. if (!this.currentRow || !this.currentRow.buNo) {
  2129. this.$message.warning('请选择发货通知单!')
  2130. return
  2131. }
  2132. if (this.currentRow.notifyStatus==='订单取消') {
  2133. this.$message.warning('该发货通知单已取消!')
  2134. return
  2135. }
  2136. this.exportInvoice.templateName=''
  2137. this.exportInvoice.hsCodeDesc=this.currentRow.hsCodeDesc
  2138. this.exportInvoice.contractFlag=this.currentRow.contractFlag
  2139. this.exportInvoice.packaging=this.currentRow.packaging
  2140. this.exportInvoice.kgs=this.currentRow.kgs
  2141. this.exportInvoice.hsCode=this.currentRow.hsCode
  2142. this.exportInvoice.material=this.currentRow.material
  2143. this.exportInvoice.hsCodeDescType=this.currentRow.hsCodeDescType
  2144. this.exportInvoice.goodsLabel=this.currentRow.goodsLabel
  2145. this.exportInvoice.origin="made in china"
  2146. //this.exportInvoice = this.currentRow
  2147. if (!this.exportInvoice.origin) {
  2148. this.exportInvoice.origin = 'made in china'
  2149. }
  2150. if (!this.exportInvoice.itemNo) {
  2151. this.exportInvoice.itemNo = 'Y'
  2152. }
  2153. this.notifyPartDetailList = [];
  2154. this.customerData=''
  2155. this.customerAddData = ''
  2156. this.exportInvoiceFlag = true
  2157. if (this.currentRow.buNo==='03-RFID') {
  2158. getNotifyPartDetail(this.currentRow).then(({data}) => {
  2159. //区分请求成功和失败的状况
  2160. if (data && data.code == 0) {
  2161. this.notifyPartDetailList = data.rows
  2162. this.notifyPartDetailList.forEach(o => {
  2163. if (!o.lossratio) {
  2164. o.lossratio = '1.2';
  2165. }
  2166. });
  2167. } else {
  2168. this.notifyPartDetailList = [];
  2169. }
  2170. });
  2171. }
  2172. this.templateData.type='发票'
  2173. this.searchTemplateOne();
  2174. },
  2175. searchTemplateOne() {
  2176. this.templateData.buNo = this.currentRow.buNo
  2177. this.templateData.customName = this.currentRow.customerName
  2178. this.templateData.shippingMode = this.currentRow.shippingMode
  2179. searchTemplateList(this.templateData).then(({data}) => {
  2180. if (data && data.code === 0){
  2181. if (data.rows && data.rows.length > 0) {
  2182. this.templateRowDblclick(data.rows[0]);
  2183. }
  2184. }
  2185. })
  2186. },
  2187. exportGoodsList() {
  2188. if (!this.currentRow || !this.currentRow.buNo) {
  2189. this.$message.warning('请选择发货通知单!')
  2190. return
  2191. }
  2192. this.exportGoods.hsCodeDescType = 'N'
  2193. this.exportGoods.salesMethod = 'EXW'
  2194. this.exportGoods.currency = 'USD'
  2195. this.exportGoods.madeArea = 'Shanghai, China'
  2196. this.exportGoods.sendPort = 'Shanghai, China'
  2197. this.exportGoods.deliveryGoodsDate = ''
  2198. this.exportGoods.voyage = this.currentRow.buNo==='01-Label' || this.currentRow.buNo==='03-RFID'?this.currentRow.cmcInvoice:''
  2199. this.exportGoods.shippingDate = ''
  2200. this.exportGoodsFlag = true
  2201. },
  2202. // 导出
  2203. downloadInvoice() {
  2204. if (!this.currentRow || !this.currentRow.buNo) {
  2205. this.$message.warning('请选择报关单!')
  2206. return
  2207. }
  2208. let exportParam=this.exportInvoice
  2209. exportParam.declarationNo = this.currentRow.declarationNo
  2210. exportParam.site = this.currentRow.site
  2211. exportParam.delNo = this.currentRow.delNo
  2212. exportParam.notifyPartDetailList = this.notifyPartDetailList
  2213. ExportUtil.export(
  2214. "/ecss/coDel/downloadInvoice",
  2215. exportParam, this.currentRow.cmcInvoice+"发票.xlsx"
  2216. );
  2217. this.exportInvoiceFlag=false
  2218. this.searchTable()
  2219. },
  2220. downloadExportGoods() {
  2221. if (!this.currentRow || !this.currentRow.buNo) {
  2222. this.$message.warning('请选择报关单!')
  2223. return
  2224. }
  2225. let exportParam=this.exportGoods
  2226. exportParam.declarationNo = this.currentRow.declarationNo
  2227. exportParam.site = this.currentRow.site
  2228. exportParam.delNo = this.currentRow.delNo
  2229. ExportUtil.export(
  2230. "/ecss/coDel/downloadExportGoods",
  2231. exportParam, this.currentRow.cmcInvoice+"出口货物委托书.xlsx"
  2232. );
  2233. this.exportGoodsFlag = false;
  2234. this.searchTable()
  2235. },
  2236. openTemplate (type) {
  2237. this.templateData.type=type;
  2238. this.templateFlag = true;
  2239. },
  2240. openTemplateDialog () {
  2241. //请求
  2242. this.searchTemplateList();
  2243. },
  2244. closeTemplateDialog () {
  2245. this.templateList = []
  2246. this.templateFlag = false
  2247. },
  2248. searchTemplateList () {
  2249. this.templateData.buNo = this.currentRow.buNo
  2250. this.templateData.customName = ''
  2251. searchTemplateList(this.templateData).then(({data}) => {
  2252. if (data && data.code === 0){
  2253. this.templateList = data.rows;
  2254. }
  2255. })
  2256. },
  2257. templateRowDblclick (row) {
  2258. if (this.templateData.type=='发票') {
  2259. this.exportInvoice.templateName=row.name
  2260. this.exportInvoice.hsCodeDesc=row.hsCodeDesc
  2261. this.exportInvoice.contractFlag=row.contractFlag
  2262. this.exportInvoice.origin=this.currentRow.origin?this.currentRow.origin:row.origin
  2263. this.exportInvoice.packaging=this.currentRow.packaging?this.currentRow.packaging:row.packaging
  2264. this.exportInvoice.kgs=this.currentRow.kgs?this.currentRow.kgs:row.kgs
  2265. this.exportInvoice.hsCode=this.currentRow.hsCode?this.currentRow.hsCode:row.hsCode
  2266. this.exportInvoice.material=this.currentRow.material?this.currentRow.material:row.material
  2267. this.exportInvoice.hsCodeDescType=this.currentRow.hsCodeDescType?this.currentRow.hsCodeDescType:row.hsCodeDescType
  2268. this.exportInvoice.goodsLabel=this.currentRow.goodsLabel?this.currentRow.goodsLabel:row.goodsLabel
  2269. this.exportInvoice.fpremark=row.remark
  2270. } else if (this.templateData.type=='出口货物委托书'){
  2271. this.exportGoods.salesMethod = row.salesMethod
  2272. this.exportGoods.currency = row.currency
  2273. this.exportGoods.madeArea = row.madeArea
  2274. this.exportGoods.sendPort = row.sendPort
  2275. this.exportGoods.deliveryGoodsDate = row.deliveryGoodsDate
  2276. this.exportGoods.voyage = this.currentRow.buNo==='01-Label' || this.currentRow.buNo==='03-RFID'?this.currentRow.cmcInvoice:row.voyage
  2277. this.exportGoods.shippingDate = row.shippingDate;
  2278. this.exportGoods.shipper=row.shipper
  2279. this.exportGoods.remark=row.remark
  2280. }
  2281. if (this.templateData.type!=='出口货物委托书') {
  2282. this.notifyPartDetailList.forEach(o => {
  2283. // 开启fsc损耗则给默认值
  2284. if (o.lossratio) {
  2285. if (row.fscWeight) {
  2286. o.lossratio = o.lossratio;
  2287. } else {
  2288. o.lossratio = '';
  2289. }
  2290. } else {
  2291. if (row.fscWeight) {
  2292. o.lossratio = '1.2';
  2293. } else {
  2294. o.lossratio = '';
  2295. }
  2296. }
  2297. });
  2298. }
  2299. this.templateFlag = false
  2300. },
  2301. },
  2302. activated() {
  2303. this.searchTable()
  2304. },
  2305. created() {
  2306. this.getBu ()
  2307. }
  2308. }
  2309. </script>
  2310. <style lang="scss" >
  2311. .warning-row td{
  2312. color: darkred !important;
  2313. }
  2314. .el-table .cell {
  2315. line-height: 24px;
  2316. font-size: 12px;
  2317. height: 24px;
  2318. }
  2319. </style>