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.

2308 lines
81 KiB

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