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.

2551 lines
84 KiB

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
10 months ago
5 months ago
5 months ago
10 months ago
11 months ago
5 months ago
11 months ago
10 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
5 months ago
11 months ago
11 months ago
9 months ago
9 months ago
9 months ago
9 months ago
11 months ago
5 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
5 months ago
10 months ago
10 months ago
10 months ago
9 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
11 months ago
11 months ago
9 months ago
11 months ago
11 months ago
10 months ago
10 months ago
11 months ago
10 months ago
11 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
10 months ago
11 months ago
5 months ago
11 months ago
9 months ago
11 months ago
11 months ago
9 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
5 months ago
11 months ago
5 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
5 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
5 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
5 months ago
11 months ago
10 months ago
9 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
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
9 months ago
9 months ago
11 months ago
11 months ago
11 months ago
11 months ago
9 months ago
11 months ago
5 months ago
11 months ago
10 months ago
11 months ago
5 months ago
5 months ago
5 months ago
11 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
11 months ago
5 months ago
11 months ago
5 months ago
11 months ago
5 months ago
11 months ago
5 months ago
11 months ago
5 months ago
11 months ago
11 months ago
11 months ago
9 months ago
11 months ago
11 months ago
11 months ago
10 months ago
10 months ago
7 months ago
10 months ago
10 months ago
10 months ago
5 months ago
11 months ago
8 months ago
11 months ago
7 months ago
10 months ago
5 months ago
11 months ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  4. <el-form-item :label="'BU:'">
  5. <el-select v-model="searchData.buNo" placeholder="请选择" >
  6. <el-option label="全部" value=""></el-option>
  7. <el-option
  8. v-for = "i in buList"
  9. :key = "i.buNo"
  10. :label = "i.buDesc"
  11. :value = "i.buNo">
  12. </el-option>
  13. </el-select>
  14. </el-form-item>
  15. <el-form-item :label="'发货通知单:'">
  16. <el-input v-model="searchData.delNo" style="width: 120px"></el-input>
  17. </el-form-item>
  18. <el-form-item :label="'CMC Invoice:'">
  19. <el-input v-model="searchData.cmcInvoice" style="width: 120px"></el-input>
  20. </el-form-item>
  21. <el-form-item :label="'通知单状态:'">
  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-select>
  28. </el-form-item>
  29. <el-form-item :label="'ReadyDate'" >
  30. <el-date-picker
  31. style="width: 120px"
  32. v-model="searchData.startDate"
  33. type="date"
  34. format="yyyy-MM-dd"
  35. value-format="yyyy-MM-dd"
  36. placeholder="选择日期">
  37. </el-date-picker>
  38. </el-form-item>
  39. <el-form-item :label="'To'" >
  40. <el-date-picker
  41. style="width: 120px"
  42. v-model="searchData.endDate"
  43. type="date"
  44. format="yyyy-MM-dd"
  45. value-format="yyyy-MM-dd"
  46. placeholder="选择日期">
  47. </el-date-picker>
  48. </el-form-item>
  49. <el-form-item :label="'是否导出:'">
  50. <el-select v-model="searchData.exportFlag" style="width: 120px">
  51. <el-option label="全部" value=""></el-option>
  52. <el-option label="已导出" value="Y"></el-option>
  53. <el-option label="未导出" value="N"></el-option>
  54. </el-select>
  55. </el-form-item>
  56. <el-form-item label="改单">
  57. <el-checkbox v-model="searchData.modifyData" true-label="true" false-label="false" @change="searchTable()"></el-checkbox>
  58. </el-form-item>
  59. <el-form-item :label="' '" >
  60. <el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'查询'}}</el-button>
  61. </el-form-item>
  62. </el-form>
  63. <el-table
  64. @row-click="changeData"
  65. highlight-current-row
  66. :height="height"
  67. :data="dataList"
  68. ref="mainTable"
  69. border :cell-style="cellStyle"
  70. v-loading="dataListLoading"
  71. style="width: 100%;">
  72. <el-table-column
  73. header-align="center"
  74. align="center"
  75. width="100"
  76. fixed="left"
  77. label="操作">
  78. <template slot-scope="scope">
  79. <a type="text" size="small" v-if="scope.row.notifyStatus==='已报关'" @click="updateModelOpen(scope.row)">修改</a>
  80. <a type="text" size="small" v-if="scope.row.notifyStatus==='已下达'" @click="confirmModelOpen(scope.row)">仓库确认</a>
  81. <a type="text" size="small" v-if="scope.row.notifyStatus==='仓库已确认'" @click="cancerConfirm(scope.row)">取消确认</a>
  82. </template>
  83. </el-table-column>
  84. <el-table-column
  85. v-for="(item,index) in columnList1" :key="index"
  86. :sortable="item.columnSortable"
  87. :prop="item.columnProp"
  88. :header-align="item.headerAlign"
  89. :show-overflow-tooltip="item.showOverflowTooltip"
  90. :align="item.align"
  91. :fixed="item.fixed==''?false:item.fixed"
  92. :min-width="item.columnWidth"
  93. :label="item.columnLabel">
  94. <template slot-scope="scope">
  95. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  96. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  97. style="width: 100px; height: 80px"/></span>
  98. </template>
  99. </el-table-column>
  100. </el-table>
  101. <el-pagination
  102. @size-change="sizeChangeHandle"
  103. @current-change="currentChangeHandle"
  104. :current-page="pageIndex"
  105. :page-sizes="[20, 50, 100, 1000]"
  106. :page-size="pageSize"
  107. :total="totalPage"
  108. layout="total, sizes, prev, pager, next, jumper">
  109. </el-pagination>
  110. <el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick" >
  111. <el-tab-pane :label="currentRow.cmcInvoice+'明细'" name="detail">
  112. <el-table
  113. :height="height"
  114. :data="dataList2"
  115. border :cell-style="cellStyleDetail"
  116. style="width: 100%;">
  117. <el-table-column
  118. v-for="(item,index) in columnList2" :key="index"
  119. :sortable="item.columnSortable"
  120. :prop="item.columnProp"
  121. :header-align="item.headerAlign"
  122. :show-overflow-tooltip="item.showOverflowTooltip"
  123. :align="item.align"
  124. :fixed="item.fixed==''?false:item.fixed"
  125. :min-width="item.columnWidth"
  126. :label="item.columnLabel">
  127. <template slot-scope="scope">
  128. <!-- 金额字段特殊处理 -->
  129. <span v-if="item.columnProp === 'ttlAmount' || item.columnProp === 'sumPrice'">
  130. {{!!scope.row[item.columnProp]?scope.row[item.columnProp].toFixed(2):''}}
  131. </span>
  132. <!-- PN字段特殊处理添加提示信息 -->
  133. <template v-else-if="item.columnProp === 'pn'">
  134. <el-tooltip
  135. v-if="isPnDataIncomplete(scope.row)"
  136. content="基本信息(每卷数量、每箱卷数、箱重量)未维护,点击跳转到维护页面"
  137. placement="top">
  138. <span
  139. v-if="!item.columnHidden"
  140. class="clickable-pn"
  141. @click="navigateToPartHsCode(scope.row.pn)">
  142. {{ scope.row[item.columnProp] }}
  143. </span>
  144. </el-tooltip>
  145. <span v-else-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  146. </template>
  147. <!-- 其他字段正常处理 -->
  148. <template v-else>
  149. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  150. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  151. </template>
  152. </template>
  153. </el-table-column>
  154. </el-table>
  155. </el-tab-pane>
  156. <el-tab-pane label="手工装箱" name="box">
  157. <el-button @click="oneClickPacking()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'一键装箱'}}</el-button>
  158. <el-button @click="upLoadPallet()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导入装箱单'}}</el-button>
  159. <el-button @click="newPalletModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'装箱'}}</el-button>
  160. <el-button @click="palletMaintenance()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'栈板维护'}}</el-button>
  161. <el-button @click="exportExcel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导出模版'}}</el-button>
  162. <el-table ref="detailTable"
  163. :data="dataList4"
  164. :height="height"
  165. border show-summary :summary-method="getSummaries"
  166. v-loading="dataListLoading"
  167. style="width: 100%; ">
  168. <el-table-column
  169. header-align="center"
  170. align="center"
  171. width="150"
  172. fixed="left"
  173. label="操作">
  174. <template slot-scope="scope">
  175. <a type="text" size="small" @click="updatePalletModel(scope.row)">修改</a>
  176. <a type="text" size="small" @click="deletePallet(scope.row)">删除</a>
  177. </template>
  178. </el-table-column>
  179. <el-table-column
  180. v-for="(item,index) in columnList4" :key="index"
  181. :sortable="item.columnSortable"
  182. :prop="item.columnProp"
  183. :header-align="item.headerAlign"
  184. :show-overflow-tooltip="item.showOverflowTooltip"
  185. :align="item.align"
  186. :fixed="item.fixed==''?false:item.fixed"
  187. :min-width="item.columnWidth"
  188. :label="item.columnLabel">
  189. <template slot-scope="scope">
  190. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  191. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  192. style="width: 100px; height: 80px"/></span>
  193. </template>
  194. </el-table-column>
  195. </el-table>
  196. </el-tab-pane>
  197. <el-tab-pane label="装箱明细" name="pallet">
  198. <packing-detail-tab
  199. ref="packingDetailTab"
  200. :current-row="currentRow"
  201. :height="height"
  202. :show-actions="true">
  203. </packing-detail-tab>
  204. </el-tab-pane>
  205. </el-tabs>
  206. <el-dialog title="仓库确认" :close-on-click-modal="false" v-drag :visible.sync="confirmModelFlag" width="400px">
  207. <el-form label-position="top" style="margin-left: 7px;margin-top: -5px;">
  208. <el-row :gutter="20">
  209. <el-col :span="12">
  210. <el-form-item :label="'CMC Invoice'" >
  211. <el-input v-model="confirmModel.cmcInvoice" disabled ></el-input>
  212. </el-form-item>
  213. </el-col>
  214. <el-col :span="12">
  215. <el-form-item :label="'ReadyDate'" >
  216. <el-input v-model="confirmModel.readyDate" disabled ></el-input>
  217. </el-form-item>
  218. </el-col>
  219. <el-col :span="12">
  220. <el-form-item :label="'预计发货日期'" >
  221. <el-date-picker
  222. style="width: 100%"
  223. v-model="confirmModel.notifyDate"
  224. type="date"
  225. format="yyyy-MM-dd"
  226. value-format="yyyy-MM-dd"
  227. placeholder="选择日期">
  228. </el-date-picker>
  229. </el-form-item>
  230. </el-col>
  231. </el-row>
  232. </el-form>
  233. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  234. <el-button type="primary" @click="confirmDo()">保存</el-button>
  235. <el-button type="primary" @click="confirmModelFlag=false">关闭</el-button>
  236. </el-footer>
  237. </el-dialog>
  238. <el-dialog title="修改" :close-on-click-modal="false" v-drag :visible.sync="updateModelFlag" width="350px">
  239. <el-form label-position="top" style="margin-left: 7px;margin-top: -5px;">
  240. <el-row :gutter="20">
  241. <el-col :span="12">
  242. <el-form-item :label="'ReadyDate'" >
  243. <el-date-picker
  244. style="width: 100%"
  245. v-model="confirmModel.readyDate"
  246. type="date"
  247. format="yyyy-MM-dd"
  248. value-format="yyyy-MM-dd"
  249. placeholder="选择日期">
  250. </el-date-picker>
  251. </el-form-item>
  252. </el-col>
  253. <el-col :span="12">
  254. <el-form-item :label="'预计发货日期'" >
  255. <el-date-picker
  256. style="width: 100%"
  257. v-model="confirmModel.notifyDate"
  258. type="date"
  259. format="yyyy-MM-dd"
  260. value-format="yyyy-MM-dd"
  261. placeholder="选择日期">
  262. </el-date-picker>
  263. </el-form-item>
  264. </el-col>
  265. </el-row>
  266. </el-form>
  267. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  268. <el-button type="primary" @click="updateDo()">保存</el-button>
  269. <el-button type="primary" @click="updateModelFlag=false">关闭</el-button>
  270. </el-footer>
  271. </el-dialog>
  272. <el-dialog title="维护箱" :close-on-click-modal="false" v-drag :visible.sync="boxModelFlag" width="500px">
  273. <el-form label-position="top" style="margin-left: 7px;margin-top: -5px;">
  274. <el-row :gutter="20">
  275. <el-col :span="12">
  276. <el-form-item :label="boxModelData.type===1?'物料编码':''">
  277. <span v-if="boxModelData.type===0" slot="label" @click="openPartDialog()"><a herf="#">物料编码</a></span>
  278. <el-input v-model="boxModelData.pn" :disabled="boxModelData.type===1" ></el-input>
  279. </el-form-item>
  280. </el-col>
  281. <el-col :span="12">
  282. <el-form-item :label="'数量'" >
  283. <el-input v-model="boxModelData.qty" type="number" ></el-input>
  284. </el-form-item>
  285. </el-col>
  286. <el-col :span="12" v-if="boxModelData.type===0">
  287. <el-form-item :label="'PO'" >
  288. <el-input v-model="boxModelData.poNo" ></el-input>
  289. </el-form-item>
  290. </el-col>
  291. <el-col :span="12">
  292. <el-form-item :label="'箱数'" >
  293. <el-input v-model="boxModelData.boxQty"></el-input>
  294. </el-form-item>
  295. </el-col>
  296. <el-col :span="12">
  297. <el-form-item :label="'ROLLS'" >
  298. <el-input v-model="boxModelData.rolls" ></el-input>
  299. </el-form-item>
  300. </el-col>
  301. <el-col :span="12">
  302. <el-form-item :label="'毛重'" >
  303. <el-input v-model="boxModelData.grossWeight"></el-input>
  304. </el-form-item>
  305. </el-col>
  306. <el-col :span="12">
  307. <el-form-item :label="'净重'" >
  308. <el-input v-model="boxModelData.netWeight" ></el-input>
  309. </el-form-item>
  310. </el-col>
  311. </el-row>
  312. </el-form>
  313. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  314. <el-button type="primary" @click="saveBoxHeader()">保存</el-button>
  315. <el-button type="primary" @click="boxModelFlag=false">关闭</el-button>
  316. </el-footer>
  317. </el-dialog>
  318. <!-- 装箱新增/修改栈板 -->
  319. <el-dialog
  320. :title="palletModelData.addFlag===1 ? '修改栈板' : '手工装箱'"
  321. :close-on-click-modal="false"
  322. v-drag
  323. :visible.sync="palletModelFlag"
  324. width="780px"
  325. class="pallet-dialog">
  326. <!-- 区域 1箱信息 -->
  327. <div class="section section-header">
  328. <h4 class="section-title">箱信息</h4>
  329. <el-divider></el-divider>
  330. <el-form label-position="top" class="box-info-form">
  331. <el-row :gutter="20">
  332. <el-col :span="8">
  333. <el-form-item label="毛重">
  334. <el-input v-model="palletModelData.grossWeight" type="number" placeholder="请输入毛重"></el-input>
  335. </el-form-item>
  336. </el-col>
  337. <el-col :span="8">
  338. <el-form-item label="净重">
  339. <el-input v-model="palletModelData.netWeight" type="number" placeholder="请输入净重"></el-input>
  340. </el-form-item>
  341. </el-col>
  342. <el-col :span="8">
  343. <el-form-item label="箱数">
  344. <el-input v-model="palletModelData.boxQty" type="number" placeholder="请输入箱数"></el-input>
  345. </el-form-item>
  346. </el-col>
  347. </el-row>
  348. </el-form>
  349. </div>
  350. <!-- 区域 2箱明细 -->
  351. <div class="section section-detail">
  352. <h4 class="section-title">箱明细</h4>
  353. <el-divider></el-divider>
  354. <div class="table-wrapper">
  355. <el-table
  356. ref="partTableRef"
  357. :data="dataList8"
  358. height="100%"
  359. stripe
  360. border
  361. class="zxClass"
  362. style="width: 100%;">
  363. <el-table-column prop="pn" label="PN" min-width="120"></el-table-column>
  364. <el-table-column prop="partDescription" label="Description" min-width="220"></el-table-column>
  365. <el-table-column prop="qty" label="原数量" align="right" width="70"></el-table-column>
  366. <el-table-column prop="surplusQty" label="可装箱数量" align="right" width="80"></el-table-column>
  367. <el-table-column label="装箱数量" align="center" width="80">
  368. <template slot-scope="scope">
  369. <el-input v-model.number="scope.row.useQty" type="number" :min="0" :max="999999" size="mini"></el-input>
  370. </template>
  371. </el-table-column>
  372. <el-table-column label="Rolls" align="center" width="80">
  373. <template slot-scope="scope">
  374. <el-input v-model.number="scope.row.rolls" type="number" :min="0" :max="999999" size="mini"></el-input>
  375. </template>
  376. </el-table-column>
  377. <el-table-column label="操作" align="center" width="70">
  378. <template slot-scope="scope">
  379. <a type="text" size="small" @click="fillUseQty(scope.row)">全数装箱</a>
  380. </template>
  381. </el-table-column>
  382. </el-table>
  383. </div>
  384. </div>
  385. <!-- 底部操作按钮 -->
  386. <div slot="footer" class="dialog-footer">
  387. <el-button type="primary" @click="savePalletHeader(0)">保存</el-button>
  388. <el-button type="primary" @click="savePalletHeader(1)">保存并关闭</el-button>
  389. <el-button @click="palletModelFlag=false">关闭</el-button>
  390. </div>
  391. </el-dialog>
  392. <el-dialog title="一键装箱" :close-on-click-modal="false" v-drag :visible.sync="oneClickPackingModelFlag" width="170px">
  393. <el-form label-position="top" style="margin-left: 7px;margin-top: 10px;">
  394. <el-row :gutter="20">
  395. <el-col :span="12">
  396. <el-form-item :label="''" >
  397. <el-checkbox v-model="oneClickPackingModelData.boxRemnant">是否显示零数箱</el-checkbox>
  398. </el-form-item>
  399. </el-col>
  400. </el-row>
  401. </el-form>
  402. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  403. <el-button type="primary" @click="saveOneClickPacking()">保存</el-button>
  404. <el-button type="primary" @click="oneClickPackingModelFlag=false">关闭</el-button>
  405. </el-footer>
  406. </el-dialog>
  407. <el-dialog :close-on-click-modal="false" v-drag :visible.sync="palletMaintenanceModelFlag" width="450px">
  408. <div slot="title" class="dialog-title">
  409. <span>栈板维护</span>
  410. <el-tooltip effect="dark" placement="top">
  411. <div slot="content">
  412. <div>栈板维护功能说明</div>
  413. <div> 系统会自动加载当前BU下的所有栈板</div>
  414. <div> 栈板高度单位为米(M)请输入准确数值</div>
  415. <div> 只有托数大于0的栈板记录才会被保存</div>
  416. </div>
  417. <i class="el-icon-question" style="color: #17b3a3; margin-left: 8px; cursor: pointer; font-size: 16px;"></i>
  418. </el-tooltip>
  419. </div>
  420. <!-- 栈板记录列表 -->
  421. <div style="margin: 15px 0;">
  422. <el-table :data="palletMaintenanceRecords" border style="width: 100%; margin-bottom: 15px;" class="zxClass"
  423. max-height="200" v-if="palletMaintenanceRecords.length > 0">
  424. <el-table-column label="栈板类型" min-width="100">
  425. <template slot-scope="scope">
  426. <el-input v-model="scope.row.palletType" disabled style="width: 100%;"></el-input>
  427. </template>
  428. </el-table-column>
  429. <el-table-column width="120">
  430. <template slot="header">
  431. <span>栈板高度(M)</span>
  432. </template>
  433. <template slot-scope="scope">
  434. <el-input v-model="scope.row.height" type="text" placeholder="请输入高度" style="width: 100%;"></el-input>
  435. </template>
  436. </el-table-column>
  437. <el-table-column width="100">
  438. <template slot="header">
  439. <span>托数</span>
  440. </template>
  441. <template slot-scope="scope">
  442. <el-input v-model="scope.row.palletQty" type="text" placeholder="请输入托数" style="width: 100%;"></el-input>
  443. </template>
  444. </el-table-column>
  445. </el-table>
  446. <div v-if="palletMaintenanceRecords.length === 0" style="text-align: center; color: #999; padding: 20px; border: 1px dashed #ddd;">
  447. 正在加载栈板记录...
  448. </div>
  449. <!-- 操作提示 -->
  450. <div v-if="palletMaintenanceRecords.length > 0" style="margin-top: 10px; padding: 8px 12px; background: #f0f9ff; border: 1px solid #b3d8ff; border-radius: 4px; font-size: 12px; color: #409EFF;">
  451. <i class="el-icon-info" style="margin-right: 4px;"></i>
  452. <span>提示托数大于0的记录才会被保存</span>
  453. </div>
  454. </div>
  455. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  456. <el-button type="primary" @click="savePalletMaintenance()">确定</el-button>
  457. <el-button type="primary" @click="palletMaintenanceModelFlag=false">关闭</el-button>
  458. </el-footer>
  459. </el-dialog>
  460. <el-dialog title="物料信息" @close="closePartDialog" @open="openPartDialog" :visible.sync="partFlag" width="559px" v-drag>
  461. <el-form inline="inline" label-position="top" :model="partData" style="margin-left: 7px;margin-top: -5px;">
  462. </el-form>
  463. <el-table
  464. :height="height + 110"
  465. :data="partList"
  466. stripe
  467. highlight-current-row
  468. border
  469. @row-dblclick="partRowDblclick"
  470. style="width: 100%;">
  471. <el-table-column
  472. prop="pn"
  473. header-align="center"
  474. align="center"
  475. label="物料编码">
  476. </el-table-column>
  477. <el-table-column
  478. prop="part_desc"
  479. header-align="center"
  480. align="center"
  481. label="物料名称">
  482. </el-table-column>
  483. </el-table>
  484. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  485. <el-button @click="partFlag = false">关闭</el-button>
  486. </el-footer>
  487. </el-dialog>
  488. <el-dialog title="栈板" @close="closePalletDialog" @open="openPalletDialog" :visible.sync="palletFlag" width="559px" v-drag>
  489. <el-form inline="inline" label-position="top" :model="palletData" style="margin-left: 7px;margin-top: -5px;">
  490. <el-form-item label="栈板类型">
  491. <el-input v-model="palletData.palletType" clearable style="width: 110px"></el-input>
  492. </el-form-item>
  493. <el-form-item label=" ">
  494. <el-button type="primary" style="padding: 3px 12px" @click="searchPalletList()">查询</el-button>
  495. </el-form-item>
  496. </el-form>
  497. <el-table
  498. :height="height + 110"
  499. :data="palletList"
  500. stripe
  501. highlight-current-row
  502. border
  503. @row-dblclick="palletRowDblclick"
  504. style="width: 100%;">
  505. <el-table-column
  506. prop="palletNo"
  507. header-align="center"
  508. align="center"
  509. width="120"
  510. label="栈板编码">
  511. </el-table-column>
  512. <el-table-column
  513. prop="palletType"
  514. header-align="center"
  515. align="center"
  516. label="栈板类型">
  517. </el-table-column>
  518. <el-table-column
  519. prop="applicationArea"
  520. header-align="center"
  521. align="center"
  522. label="应用环境">
  523. </el-table-column>
  524. <el-table-column
  525. prop="length"
  526. header-align="center"
  527. align="center"
  528. label="长(M)">
  529. </el-table-column>
  530. <el-table-column
  531. prop="width"
  532. header-align="center"
  533. align="center"
  534. label="宽(M)">
  535. </el-table-column>
  536. <el-table-column
  537. prop="height"
  538. header-align="center"
  539. align="center"
  540. label="栈板高(M)">
  541. </el-table-column>
  542. </el-table>
  543. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  544. <el-button @click="palletFlag = false">关闭</el-button>
  545. </el-footer>
  546. </el-dialog>
  547. <!-- 导入 -->
  548. <pallet-upload-excel ref="palletUploadExcel" @refreshTable="searchPalletTable" v-drag></pallet-upload-excel>
  549. <!--列表的组件-->
  550. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  551. </div>
  552. </template>
  553. <script>
  554. import Chooselist from '@/views/modules/common/Chooselist_eam'
  555. import {} from "@/api/sysLanguage.js"
  556. import palletUploadExcel from "./pallet_upload_excel.vue";
  557. import PackingDetailTab from "./components/PackingDetailTab.vue";
  558. import {
  559. searchEcssCoDelNotifyHeaderForCK,
  560. searchEcssCoDelNotifyDetail,
  561. confirmEcssDel,
  562. updateEcssDel,
  563. cancerConfirmEcssDel,
  564. searchCoDelPalletDataNew,
  565. searchEcssCoDelPalletHeaderData,
  566. searchEcssCoDelPalletDetailData,
  567. savePalletHeader,
  568. deletePalletHeader,
  569. savePalletDetail,
  570. deletePalletDetail,
  571. saveOneClickPacking,
  572. savePalletMaintenance,
  573. getNotifyPartDetail,
  574. searchPalletList,
  575. updateExportFlag
  576. }from "@/api/ecss/ecss.js"
  577. import {getBuList}from '@/api/factory/site.js'
  578. import excel from "@/utils/excel-util.js";
  579. import excelOpts from '@/utils/export-options.js'
  580. export default {
  581. name: "null",
  582. components:{
  583. palletUploadExcel,
  584. Chooselist,
  585. PackingDetailTab,
  586. },
  587. data() {
  588. return {
  589. multipleSelection: [],
  590. palletFlag:false,
  591. palletList:[],
  592. palletData:{},
  593. partFlag:false,
  594. partData:{},
  595. partList:[],
  596. pageIndex: 1,
  597. pageSize: 100,
  598. totalPage: 0,
  599. height: 200,
  600. buList:[],
  601. dataList:[],
  602. dataList2:[],
  603. dataList3:[],
  604. dataList4:[],
  605. dataList5:[],
  606. dataList8:[],
  607. notifyDetailMap: new Map(),
  608. boxDetailData:{
  609. site:'',
  610. buNo:'',
  611. delNo:'',
  612. seqNo:'',
  613. },
  614. dataListLoading: false,
  615. boxDetailModelFlag: false,
  616. searchData: {
  617. page: 1,
  618. limit: 100,
  619. buNo:'',
  620. delNo:'',
  621. cmcInvoice:'',
  622. notifyStatus:'',
  623. startDate:'',
  624. endDate:'',
  625. exportFlag:'',
  626. username:this.$store.state.user.name,
  627. },
  628. oneClickPackingModelFlag:false,
  629. oneClickPackingModelData:{
  630. boxRemnant: false,
  631. },
  632. // 栈板维护相关
  633. palletMaintenanceModelFlag: false,
  634. palletMaintenanceRecords: [],
  635. palletModelFlag:false,
  636. palletModelData:{
  637. addFlag:0,
  638. site:'',
  639. buNo:'',
  640. delNo:'',
  641. seqNo:'',
  642. palletNo:'',
  643. palletQty:'',
  644. length:'',
  645. width:'',
  646. height:'',
  647. boxQty:'',
  648. grossWeight:'',
  649. netWeight:'',
  650. palletRemark:'',
  651. },
  652. boxModelFlag:false,
  653. boxModelData:{
  654. addFlag:0,
  655. site:'',
  656. buNo:'',
  657. delNo:'',
  658. seqNo:'',
  659. itemNo:'',
  660. partNo:'',
  661. pn:'',
  662. qty:'',
  663. poNo:'',
  664. boxQty:'',
  665. rolls:'',
  666. },
  667. buttons:{
  668. search:'查询',
  669. },
  670. confirmModelFlag:false,
  671. updateModelFlag:false,
  672. confirmModel:{
  673. site:'',
  674. buDesc:'',
  675. cmcInvoice:'',
  676. delNo:'',
  677. readyDate:'',
  678. shippingMode:'',
  679. destination:'',
  680. notifyDate:'',
  681. remark:'',
  682. },
  683. activeName:'detail',
  684. columnList1: [
  685. {
  686. userId: this.$store.state.user.name,
  687. functionId: 801002,
  688. serialNumber: '801002Table1BuDesc',
  689. tableId: "801002Table1",
  690. tableName: "关务系统发货通知单",
  691. columnProp: "buDesc",
  692. headerAlign: "center",
  693. align: "left",
  694. columnLabel: "BU",
  695. columnHidden: false,
  696. columnImage: false,
  697. columnSortable: false,
  698. sortLv: 0,
  699. status: true,
  700. fixed: '',
  701. columnWidth: 60
  702. },
  703. {
  704. userId: this.$store.state.user.name,
  705. functionId: 801002,
  706. serialNumber: '801002Table1CmcInvoice',
  707. tableId: "801002Table1",
  708. tableName: "关务系统发货通知单",
  709. columnProp: "cmcInvoice",
  710. headerAlign: "center",
  711. align: "left",
  712. columnLabel: "CMC Invoice",
  713. columnHidden: false,
  714. columnImage: false,
  715. columnSortable: false,
  716. sortLv: 0,
  717. status: true,
  718. fixed: '',
  719. columnWidth: 100
  720. },
  721. {
  722. userId: this.$store.state.user.name,
  723. functionId: 801002,
  724. serialNumber: '801002Table1DelNo',
  725. tableId: "801002Table1",
  726. tableName: "关务系统发货通知单",
  727. columnProp: "delNo",
  728. headerAlign: "center",
  729. align: "center",
  730. columnLabel: "发货通知单号",
  731. columnHidden: false,
  732. columnImage: false,
  733. columnSortable: false,
  734. sortLv: 0,
  735. status: true,
  736. fixed: '',
  737. columnWidth: 110
  738. },
  739. {
  740. userId: this.$store.state.user.name,
  741. functionId: 801002,
  742. serialNumber: '801002Table1ReadyDate',
  743. tableId: "801002Table1",
  744. tableName: "关务系统发货通知单",
  745. columnProp: "readyDate",
  746. headerAlign: "center",
  747. align: "center",
  748. columnLabel: "ReadyDate",
  749. columnHidden: false,
  750. columnImage: false,
  751. columnSortable: false,
  752. sortLv: 0,
  753. status: true,
  754. fixed: '',
  755. columnWidth: 100
  756. },
  757. {
  758. userId: this.$store.state.user.name,
  759. functionId: 801002,
  760. serialNumber: '801002Table1CustomerName',
  761. tableId: "801002Table1",
  762. tableName: "关务系统发货通知单",
  763. columnProp: "customerName",
  764. headerAlign: "center",
  765. align: "left",
  766. columnLabel: "客户名称",
  767. columnHidden: false,
  768. columnImage: false,
  769. columnSortable: false,
  770. sortLv: 0,
  771. status: true,
  772. fixed: '',
  773. columnWidth: 220
  774. },
  775. {
  776. userId: this.$store.state.user.name,
  777. functionId: 801002,
  778. serialNumber: '801002Table1ShippingMode',
  779. tableId: "801002Table1",
  780. tableName: "关务系统发货通知单",
  781. columnProp: "shippingMode",
  782. headerAlign: "center",
  783. align: "left",
  784. columnLabel: "ShippingMode",
  785. columnHidden: false,
  786. columnImage: false,
  787. columnSortable: false,
  788. sortLv: 0,
  789. status: true,
  790. fixed: '',
  791. columnWidth: 100
  792. },
  793. {
  794. userId: this.$store.state.user.name,
  795. functionId: 801002,
  796. serialNumber: '801002Table1Destination',
  797. tableId: "801002Table1",
  798. tableName: "关务系统发货通知单",
  799. columnProp: "destination",
  800. headerAlign: "center",
  801. align: "left",
  802. columnLabel: "Destination",
  803. columnHidden: false,
  804. columnImage: false,
  805. columnSortable: false,
  806. sortLv: 0,
  807. status: true,
  808. fixed: '',
  809. columnWidth: 100
  810. },
  811. {
  812. userId: this.$store.state.user.name,
  813. functionId: 801002,
  814. serialNumber: '801002Table1NotifyStatus',
  815. tableId: "801002Table1",
  816. tableName: "关务系统发货通知单",
  817. columnProp: "notifyStatus",
  818. headerAlign: "center",
  819. align: "left",
  820. columnLabel: "通知单状态",
  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: '801001Table1NotifyStatus',
  833. tableId: "801001Table1",
  834. tableName: "关务系统发货通知单",
  835. columnProp: "modifyLabel",
  836. headerAlign: "center",
  837. align: "left",
  838. columnLabel: "改单",
  839. columnHidden: false,
  840. columnImage: false,
  841. columnSortable: false,
  842. sortLv: 0,
  843. status: true,
  844. fixed: '',
  845. columnWidth: 50
  846. },
  847. {
  848. userId: this.$store.state.user.name,
  849. functionId: 801002,
  850. serialNumber: '801002Table1ExportFlag',
  851. tableId: "801002Table1",
  852. tableName: "关务系统发货通知单",
  853. columnProp: "exportFlag",
  854. headerAlign: "center",
  855. align: "center",
  856. columnLabel: "是否导出",
  857. columnHidden: false,
  858. columnImage: false,
  859. columnSortable: false,
  860. sortLv: 0,
  861. status: true,
  862. fixed: '',
  863. columnWidth: 80
  864. },
  865. {
  866. userId: this.$store.state.user.name,
  867. functionId: 801002,
  868. serialNumber: '801002Table1NotifyDate',
  869. tableId: "801002Table1",
  870. tableName: "关务系统发货通知单",
  871. columnProp: "notifyDate",
  872. headerAlign: "center",
  873. align: "center",
  874. columnLabel: "发货日期",
  875. columnHidden: false,
  876. columnImage: false,
  877. columnSortable: false,
  878. sortLv: 0,
  879. status: true,
  880. fixed: '',
  881. columnWidth: 120
  882. },
  883. {
  884. userId: this.$store.state.user.name,
  885. functionId: 801002,
  886. serialNumber: '801002Table1ErpDelNo',
  887. tableId: "801002Table1",
  888. tableName: "关务系统发货通知单",
  889. columnProp: "walMartOrderFlag",
  890. headerAlign: "center",
  891. align: "left",
  892. columnLabel: "沃尔玛订单",
  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: 801002,
  904. serialNumber: '801002Table1CreateBy',
  905. tableId: "801002Table1",
  906. tableName: "关务系统发货通知单",
  907. columnProp: "createBy",
  908. headerAlign: "center",
  909. align: "left",
  910. columnLabel: "创建人",
  911. columnHidden: false,
  912. columnImage: false,
  913. columnSortable: false,
  914. sortLv: 0,
  915. status: true,
  916. fixed: '',
  917. columnWidth: 80
  918. },
  919. {
  920. userId: this.$store.state.user.name,
  921. functionId: 801002,
  922. serialNumber: '801002Table1CreateDate',
  923. tableId: "801002Table1",
  924. tableName: "关务系统发货通知单",
  925. columnProp: "createDate",
  926. headerAlign: "center",
  927. align: "center",
  928. columnLabel: "创建时间",
  929. columnHidden: false,
  930. columnImage: false,
  931. columnSortable: false,
  932. sortLv: 0,
  933. status: true,
  934. fixed: '',
  935. columnWidth: 130
  936. },
  937. {
  938. userId: this.$store.state.user.name,
  939. functionId: 801002,
  940. serialNumber: '801002Table1UpdateBy',
  941. tableId: "801002Table1",
  942. tableName: "关务系统发货通知单",
  943. columnProp: "updateBy",
  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: 80
  954. },
  955. {
  956. userId: this.$store.state.user.name,
  957. functionId: 801002,
  958. serialNumber: '801002Table1UpdateDate',
  959. tableId: "801002Table1",
  960. tableName: "关务系统发货通知单",
  961. columnProp: "updateDate",
  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: 130
  972. },
  973. {
  974. userId: this.$store.state.user.name,
  975. functionId: 801002,
  976. serialNumber: '801002Table1Remark',
  977. tableId: "801002Table1",
  978. tableName: "关务系统发货通知单",
  979. columnProp: "remark",
  980. headerAlign: "center",
  981. align: "left",
  982. columnLabel: "Remark",
  983. columnHidden: false,
  984. columnImage: false,
  985. columnSortable: false,
  986. sortLv: 0,
  987. status: true,
  988. fixed: '',
  989. columnWidth: 300
  990. },
  991. ],
  992. columnList2: [
  993. {
  994. userId: this.$store.state.user.name,
  995. functionId: 801002,
  996. serialNumber: '801002Table2ItemNo',
  997. tableId: "801002Table2",
  998. tableName: "关务系统发货通知单明细",
  999. columnProp: "itemNo",
  1000. headerAlign: "center",
  1001. align: "left",
  1002. columnLabel: "行号",
  1003. columnHidden: false,
  1004. columnImage: false,
  1005. columnSortable: false,
  1006. sortLv: 0,
  1007. status: true,
  1008. fixed: '',
  1009. columnWidth: 80
  1010. },
  1011. {
  1012. userId: this.$store.state.user.name,
  1013. functionId: 801002,
  1014. serialNumber: '801002Table2PartNo',
  1015. tableId: "801002Table2",
  1016. tableName: "关务系统发货通知单明细",
  1017. columnProp: "pn",
  1018. headerAlign: "center",
  1019. align: "left",
  1020. columnLabel: "PN",
  1021. columnHidden: false,
  1022. columnImage: false,
  1023. columnSortable: false,
  1024. sortLv: 0,
  1025. status: true,
  1026. fixed: '',
  1027. columnWidth: 100
  1028. },
  1029. {
  1030. userId: this.$store.state.user.name,
  1031. functionId: 801002,
  1032. serialNumber: '801002Table2PartDescription',
  1033. tableId: "801002Table2",
  1034. tableName: "关务系统发货通知单明细",
  1035. columnProp: "partDescription",
  1036. headerAlign: "center",
  1037. align: "left",
  1038. columnLabel: "Description",
  1039. columnHidden: false,
  1040. columnImage: false,
  1041. columnSortable: false,
  1042. sortLv: 0,
  1043. status: true,
  1044. fixed: '',
  1045. columnWidth: 300
  1046. },
  1047. {
  1048. userId: this.$store.state.user.name,
  1049. functionId: 801002,
  1050. serialNumber: '801002Table2Qty',
  1051. tableId: "801002Table2",
  1052. tableName: "关务系统发货通知单明细",
  1053. columnProp: "qty",
  1054. headerAlign: "center",
  1055. align: "right",
  1056. columnLabel: "Qty (pcs)",
  1057. columnHidden: false,
  1058. columnImage: false,
  1059. columnSortable: false,
  1060. sortLv: 0,
  1061. status: true,
  1062. fixed: '',
  1063. columnWidth: 100
  1064. },
  1065. {
  1066. userId: this.$store.state.user.name,
  1067. functionId: 801002,
  1068. serialNumber: '801002Table2SalesOrder',
  1069. tableId: "801002Table2",
  1070. tableName: "关务系统发货通知单明细",
  1071. columnProp: "salesOrder",
  1072. headerAlign: "center",
  1073. align: "left",
  1074. columnLabel: "销售订单号",
  1075. columnHidden: false,
  1076. columnImage: false,
  1077. columnSortable: false,
  1078. sortLv: 0,
  1079. status: true,
  1080. fixed: '',
  1081. columnWidth: 100
  1082. },
  1083. {
  1084. userId: this.$store.state.user.name,
  1085. functionId: 801002,
  1086. serialNumber: '801002Table2CustomerPO',
  1087. tableId: "801002Table2",
  1088. tableName: "关务系统发货通知单明细",
  1089. columnProp: "customerPO",
  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: 100
  1100. },
  1101. {
  1102. userId: this.$store.state.user.name,
  1103. functionId: 801002,
  1104. serialNumber: '801002Table2Version',
  1105. tableId: "801002Table2",
  1106. tableName: "关务系统发货通知单明细",
  1107. columnProp: "version",
  1108. headerAlign: "center",
  1109. align: "left",
  1110. columnLabel: "Version",
  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: 801002,
  1122. serialNumber: '801002Table2Status',
  1123. tableId: "801002Table2",
  1124. tableName: "关务系统发货通知单明细",
  1125. columnProp: "status",
  1126. headerAlign: "center",
  1127. align: "left",
  1128. columnLabel: "Status",
  1129. columnHidden: false,
  1130. columnImage: false,
  1131. columnSortable: false,
  1132. sortLv: 0,
  1133. status: true,
  1134. fixed: '',
  1135. columnWidth: 100
  1136. },
  1137. {
  1138. userId: this.$store.state.user.name,
  1139. functionId: 801002,
  1140. serialNumber: '801002Table2Family',
  1141. tableId: "801002Table2",
  1142. tableName: "关务系统发货通知单明细",
  1143. columnProp: "family",
  1144. headerAlign: "center",
  1145. align: "left",
  1146. columnLabel: "Family",
  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: 801002,
  1158. serialNumber: '801002Table2Lt',
  1159. tableId: "801002Table2",
  1160. tableName: "关务系统发货通知单明细",
  1161. columnProp: "lt",
  1162. headerAlign: "center",
  1163. align: "right",
  1164. columnLabel: "LT (wks)",
  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: 801002,
  1176. serialNumber: '801002Table2CmcComment',
  1177. tableId: "801002Table2",
  1178. tableName: "关务系统发货通知单明细",
  1179. columnProp: "cmcComment",
  1180. headerAlign: "center",
  1181. align: "left",
  1182. columnLabel: "CMC Comment",
  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: 801002,
  1194. serialNumber: '801002Table2SaleType',
  1195. tableId: "801002Table2",
  1196. tableName: "关务系统发货通知单明细",
  1197. columnProp: "saleType",
  1198. headerAlign: "center",
  1199. align: "left",
  1200. columnLabel: "内外销方式",
  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: 801002,
  1212. serialNumber: '801002Table2AwbBl',
  1213. tableId: "801002Table2",
  1214. tableName: "关务系统发货通知单明细",
  1215. columnProp: "awbBl",
  1216. headerAlign: "center",
  1217. align: "left",
  1218. columnLabel: "AWB/ BL#",
  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: 801002,
  1230. serialNumber: '801002Table2ShippingNumber',
  1231. tableId: "801002Table2",
  1232. tableName: "关务系统发货通知单明细",
  1233. columnProp: "shippingNumber",
  1234. headerAlign: "center",
  1235. align: "left",
  1236. columnLabel: "ShippingNumber",
  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: 801002,
  1248. serialNumber: '801002Table2ForwarderInfo',
  1249. tableId: "801002Table2",
  1250. tableName: "关务系统发货通知单明细",
  1251. columnProp: "forwarderInfo",
  1252. headerAlign: "center",
  1253. align: "left",
  1254. columnLabel: "Forwarder Info",
  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: 801002,
  1266. serialNumber: '801002Table2Currency',
  1267. tableId: "801002Table2",
  1268. tableName: "关务系统发货通知单明细",
  1269. columnProp: "currency",
  1270. headerAlign: "center",
  1271. align: "left",
  1272. columnLabel: "Currency",
  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: 801002,
  1284. serialNumber: '801002Table2Tp',
  1285. tableId: "801002Table2",
  1286. tableName: "关务系统发货通知单明细",
  1287. columnProp: "tp",
  1288. headerAlign: "center",
  1289. align: "right",
  1290. columnLabel: "TP",
  1291. columnHidden: false,
  1292. columnImage: false,
  1293. columnSortable: false,
  1294. sortLv: 0,
  1295. status: true,
  1296. fixed: '',
  1297. columnWidth: 80
  1298. },
  1299. {
  1300. userId: this.$store.state.user.name,
  1301. functionId: 801002,
  1302. serialNumber: '801002Table2TtlAmount',
  1303. tableId: "801002Table2",
  1304. tableName: "关务系统发货通知单明细",
  1305. columnProp: "ttlAmount",
  1306. headerAlign: "center",
  1307. align: "right",
  1308. columnLabel: "TTL Amount",
  1309. columnHidden: false,
  1310. columnImage: false,
  1311. columnSortable: false,
  1312. sortLv: 0,
  1313. status: true,
  1314. fixed: '',
  1315. columnWidth: 80
  1316. },
  1317. {
  1318. userId: this.$store.state.user.name,
  1319. functionId: 801001,
  1320. serialNumber: '801001Table2Remark',
  1321. tableId: "801001Table2",
  1322. tableName: "关务系统发货通知单明细",
  1323. columnProp: "vat",
  1324. headerAlign: "center",
  1325. align: "right",
  1326. columnLabel: "VAT",
  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: 801002,
  1338. serialNumber: '801002Table2SumPrice',
  1339. tableId: "801002Table2",
  1340. tableName: "关务系统发货通知单明细",
  1341. columnProp: "sumPrice",
  1342. headerAlign: "center",
  1343. align: "right",
  1344. columnLabel: "价税合计",
  1345. columnHidden: false,
  1346. columnImage: false,
  1347. columnSortable: false,
  1348. sortLv: 0,
  1349. status: true,
  1350. fixed: '',
  1351. columnWidth: 80
  1352. },
  1353. {
  1354. userId: this.$store.state.user.name,
  1355. functionId: 801002,
  1356. serialNumber: '801002Table2So',
  1357. tableId: "801002Table2",
  1358. tableName: "关务系统发货通知单明细",
  1359. columnProp: "so",
  1360. headerAlign: "center",
  1361. align: "left",
  1362. columnLabel: "SO",
  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: 801002,
  1374. serialNumber: '801002Table2Upc',
  1375. tableId: "801002Table2",
  1376. tableName: "关务系统发货通知单明细",
  1377. columnProp: "upc",
  1378. headerAlign: "center",
  1379. align: "left",
  1380. columnLabel: "UPC",
  1381. columnHidden: false,
  1382. columnImage: false,
  1383. columnSortable: false,
  1384. sortLv: 0,
  1385. status: true,
  1386. fixed: '',
  1387. columnWidth: 100
  1388. },
  1389. {
  1390. userId: this.$store.state.user.name,
  1391. functionId: 801002,
  1392. serialNumber: '801002Table2Remark',
  1393. tableId: "801002Table2",
  1394. tableName: "关务系统发货通知单明细",
  1395. columnProp: "remark",
  1396. headerAlign: "center",
  1397. align: "left",
  1398. columnLabel: "Remark",
  1399. columnHidden: false,
  1400. columnImage: false,
  1401. columnSortable: false,
  1402. sortLv: 0,
  1403. status: true,
  1404. fixed: '',
  1405. columnWidth: 300
  1406. },
  1407. {
  1408. userId: this.$store.state.user.name,
  1409. functionId: 801001,
  1410. serialNumber: '801001Table2Remark',
  1411. tableId: "801001Table2",
  1412. tableName: "关务系统发货通知单明细",
  1413. columnProp: "roll",
  1414. headerAlign: "center",
  1415. align: "right",
  1416. columnLabel: "Roll",
  1417. columnHidden: false,
  1418. columnImage: false,
  1419. columnSortable: false,
  1420. sortLv: 0,
  1421. status: true,
  1422. fixed: '',
  1423. columnWidth: 100
  1424. },
  1425. {
  1426. userId: this.$store.state.user.name,
  1427. functionId: 801001,
  1428. serialNumber: '801001Table2Remark',
  1429. tableId: "801001Table2",
  1430. tableName: "关务系统发货通知单明细",
  1431. columnProp: "carton",
  1432. headerAlign: "center",
  1433. align: "right",
  1434. columnLabel: "Carton",
  1435. columnHidden: false,
  1436. columnImage: false,
  1437. columnSortable: false,
  1438. sortLv: 0,
  1439. status: true,
  1440. fixed: '',
  1441. columnWidth: 100
  1442. },
  1443. ],
  1444. columnList3:[
  1445. {
  1446. userId: this.$store.state.user.name,
  1447. functionId: 801002,
  1448. serialNumber: '801002Table3ItemNo',
  1449. tableId: "801002Table3",
  1450. tableName: "装箱明细",
  1451. columnProp: "itemNo",
  1452. headerAlign: "center",
  1453. align: "right",
  1454. columnLabel: "序号",
  1455. columnHidden: false,
  1456. columnImage: false,
  1457. columnSortable: false,
  1458. sortLv: 0,
  1459. status: true,
  1460. fixed: '',
  1461. columnWidth: 40
  1462. },
  1463. {
  1464. userId: this.$store.state.user.name,
  1465. functionId: 801002,
  1466. serialNumber: '801002Table3PoNo',
  1467. tableId: "801002Table3",
  1468. tableName: "装箱明细",
  1469. columnProp: "poNo",
  1470. headerAlign: "center",
  1471. align: "left",
  1472. columnLabel: "PO",
  1473. columnHidden: false,
  1474. columnImage: false,
  1475. columnSortable: false,
  1476. sortLv: 0,
  1477. status: true,
  1478. fixed: '',
  1479. columnWidth: 100
  1480. },
  1481. {
  1482. userId: this.$store.state.user.name,
  1483. functionId: 801002,
  1484. serialNumber: '801002Table3PN',
  1485. tableId: "801002Table3",
  1486. tableName: "装箱明细",
  1487. columnProp: "pn",
  1488. headerAlign: "center",
  1489. align: "left",
  1490. columnLabel: "PN",
  1491. columnHidden: false,
  1492. columnImage: false,
  1493. columnSortable: false,
  1494. sortLv: 0,
  1495. status: true,
  1496. fixed: '',
  1497. columnWidth: 100
  1498. },
  1499. {
  1500. userId: this.$store.state.user.name,
  1501. functionId: 801002,
  1502. serialNumber: '801002Table3Qty',
  1503. tableId: "801002Table3",
  1504. tableName: "装箱明细",
  1505. columnProp: "qty",
  1506. headerAlign: "center",
  1507. align: "right",
  1508. columnLabel: "数量",
  1509. columnHidden: false,
  1510. columnImage: false,
  1511. columnSortable: false,
  1512. sortLv: 0,
  1513. status: true,
  1514. fixed: '',
  1515. columnWidth: 50
  1516. },
  1517. {
  1518. userId: this.$store.state.user.name,
  1519. functionId: 801002,
  1520. serialNumber: '801002Table3Rolls',
  1521. tableId: "801002Table3",
  1522. tableName: "装箱明细",
  1523. columnProp: "rolls",
  1524. headerAlign: "center",
  1525. align: "right",
  1526. columnLabel: "Rolls",
  1527. columnHidden: false,
  1528. columnImage: false,
  1529. columnSortable: false,
  1530. sortLv: 0,
  1531. status: true,
  1532. fixed: '',
  1533. columnWidth: 50
  1534. },
  1535. ],
  1536. columnList4:[
  1537. {
  1538. userId: this.$store.state.user.name,
  1539. functionId: 801002,
  1540. serialNumber: '801002Table4SeqNo',
  1541. tableId: "801002Table4",
  1542. tableName: "装箱栈板主表",
  1543. columnProp: "seqNo",
  1544. headerAlign: "center",
  1545. align: "right",
  1546. columnLabel: "序号",
  1547. columnHidden: false,
  1548. columnImage: false,
  1549. columnSortable: false,
  1550. sortLv: 0,
  1551. status: true,
  1552. fixed: '',
  1553. columnWidth: 40
  1554. },
  1555. {
  1556. userId: this.$store.state.user.name,
  1557. functionId: 801002,
  1558. serialNumber: '801002Table4PalletRemark',
  1559. tableId: "801002Table4",
  1560. tableName: "装箱栈板主表",
  1561. columnProp: "palletRemark",
  1562. headerAlign: "center",
  1563. align: "left",
  1564. columnLabel: "栈板码",
  1565. columnHidden: false,
  1566. columnImage: false,
  1567. columnSortable: false,
  1568. sortLv: 0,
  1569. status: true,
  1570. fixed: '',
  1571. columnWidth: 60
  1572. },
  1573. {
  1574. userId: this.$store.state.user.name,
  1575. functionId: 801002,
  1576. serialNumber: '801002Table4PalletQty',
  1577. tableId: "801002Table4",
  1578. tableName: "装箱栈板主表",
  1579. columnProp: "palletQty",
  1580. headerAlign: "center",
  1581. align: "right",
  1582. columnLabel: "数量",
  1583. columnHidden: false,
  1584. columnImage: false,
  1585. columnSortable: false,
  1586. sortLv: 0,
  1587. status: true,
  1588. fixed: '',
  1589. columnWidth: 50
  1590. },
  1591. {
  1592. userId: this.$store.state.user.name,
  1593. functionId: 801002,
  1594. serialNumber: '801002Table4Length',
  1595. tableId: "801002Table4",
  1596. tableName: "装箱栈板主表",
  1597. columnProp: "length",
  1598. headerAlign: "center",
  1599. align: "right",
  1600. columnLabel: "长(M)",
  1601. columnHidden: false,
  1602. columnImage: false,
  1603. columnSortable: false,
  1604. sortLv: 0,
  1605. status: true,
  1606. fixed: '',
  1607. columnWidth: 50
  1608. },
  1609. {
  1610. userId: this.$store.state.user.name,
  1611. functionId: 801002,
  1612. serialNumber: '801002Table4Width',
  1613. tableId: "801002Table4",
  1614. tableName: "装箱栈板主表",
  1615. columnProp: "width",
  1616. headerAlign: "center",
  1617. align: "right",
  1618. columnLabel: "宽(M)",
  1619. columnHidden: false,
  1620. columnImage: false,
  1621. columnSortable: false,
  1622. sortLv: 0,
  1623. status: true,
  1624. fixed: '',
  1625. columnWidth: 50
  1626. },
  1627. {
  1628. userId: this.$store.state.user.name,
  1629. functionId: 801002,
  1630. serialNumber: '801002Table4Height',
  1631. tableId: "801002Table4",
  1632. tableName: "装箱栈板主表",
  1633. columnProp: "height",
  1634. headerAlign: "center",
  1635. align: "right",
  1636. columnLabel: "高(M)",
  1637. columnHidden: false,
  1638. columnImage: false,
  1639. columnSortable: false,
  1640. sortLv: 0,
  1641. status: true,
  1642. fixed: '',
  1643. columnWidth: 50
  1644. },
  1645. ],
  1646. columnList5:[
  1647. {
  1648. userId: this.$store.state.user.name,
  1649. functionId: 801002,
  1650. serialNumber: '801002Table5PartNo',
  1651. tableId: "801002Table5",
  1652. tableName: "栈板装箱明细",
  1653. columnProp: "pn",
  1654. headerAlign: "center",
  1655. align: "left",
  1656. columnLabel: "物料编码",
  1657. columnHidden: false,
  1658. columnImage: false,
  1659. columnSortable: false,
  1660. sortLv: 0,
  1661. status: true,
  1662. fixed: '',
  1663. columnWidth: 70
  1664. },
  1665. {
  1666. userId: this.$store.state.user.name,
  1667. functionId: 801002,
  1668. serialNumber: '801002Table5Qty',
  1669. tableId: "801002Table5",
  1670. tableName: "栈板装箱明细",
  1671. columnProp: "qty",
  1672. headerAlign: "center",
  1673. align: "right",
  1674. columnLabel: "数量",
  1675. columnHidden: false,
  1676. columnImage: false,
  1677. columnSortable: false,
  1678. sortLv: 0,
  1679. status: true,
  1680. fixed: '',
  1681. columnWidth: 80
  1682. },
  1683. {
  1684. userId: this.$store.state.user.name,
  1685. functionId: 801002,
  1686. serialNumber: '801002Table5BoxQty',
  1687. tableId: "801002Table5",
  1688. tableName: "栈板装箱明细",
  1689. columnProp: "boxQty",
  1690. headerAlign: "center",
  1691. align: "right",
  1692. columnLabel: "箱数",
  1693. columnHidden: false,
  1694. columnImage: false,
  1695. columnSortable: false,
  1696. sortLv: 0,
  1697. status: true,
  1698. fixed: '',
  1699. columnWidth: 70
  1700. },
  1701. {
  1702. userId: this.$store.state.user.name,
  1703. functionId: 801002,
  1704. serialNumber: '801002Table5Rolls',
  1705. tableId: "801002Table5",
  1706. tableName: "栈板装箱明细",
  1707. columnProp: "rolls",
  1708. headerAlign: "center",
  1709. align: "right",
  1710. columnLabel: "Rolls",
  1711. columnHidden: false,
  1712. columnImage: false,
  1713. columnSortable: false,
  1714. sortLv: 0,
  1715. status: true,
  1716. fixed: '',
  1717. columnWidth: 70
  1718. },
  1719. ],
  1720. currentRow:{},
  1721. }
  1722. },
  1723. mounted() {
  1724. this.$nextTick(() => {
  1725. this.height = (window.innerHeight - 260)/2;
  1726. })
  1727. },
  1728. methods: {
  1729. isPnDataIncomplete(row) {
  1730. const hasBoxrolls = row.boxrolls !== null && row.boxrolls !== undefined && row.boxrolls !== '';
  1731. const hasRollqty = row.rollqty !== null && row.rollqty !== undefined && row.rollqty !== '';
  1732. const hasBoxweight = row.boxweight !== null && row.boxweight !== undefined && row.boxweight !== '';
  1733. return !hasBoxrolls || !hasRollqty || !hasBoxweight;
  1734. },
  1735. // 跳转到PN维护页面
  1736. navigateToPartHsCode(pn) {
  1737. if (!pn) {
  1738. this.$message.warning('PN不能为空');
  1739. return;
  1740. }
  1741. this.$router.push({
  1742. path: '/ecss-partHsCode',
  1743. query: {
  1744. sku: pn
  1745. }
  1746. });
  1747. },
  1748. openPartDialog () {
  1749. this.searchPartList();
  1750. this.partFlag = true
  1751. },
  1752. closePartDialog () {
  1753. this.partList = []
  1754. this.partFlag = false
  1755. },
  1756. searchPartList () {
  1757. this.partData.site = this.currentRow.site
  1758. this.partData.delNo = this.currentRow.delNo
  1759. getNotifyPartDetail(this.partData).then(({data}) => {
  1760. if (data && data.code === 0){
  1761. this.partList = data.rows;
  1762. }
  1763. })
  1764. },
  1765. partRowDblclick (row) {
  1766. this.boxModelData.partNo = row.partNo
  1767. this.boxModelData.pn = row.pn
  1768. this.partFlag = false
  1769. },
  1770. // 获取基础数据列表S
  1771. getBaseList(val, type) {
  1772. this.tagNo = val
  1773. this.$nextTick(() => {
  1774. let strVal = ''
  1775. if (val === 507) {
  1776. strVal = this.boxModelData.partNo
  1777. }
  1778. this.$refs.baseList.init(val, strVal)
  1779. })
  1780. },
  1781. /* 列表方法的回调 */
  1782. getBaseData(val) {
  1783. if (this.tagNo === 507) {
  1784. this.boxModelData.partNo = val.part_no
  1785. }
  1786. },
  1787. // 每页数
  1788. sizeChangeHandle (val) {
  1789. this.pageSize = val
  1790. this.pageIndex = 1
  1791. this.searchTable()
  1792. },
  1793. // 当前页
  1794. currentChangeHandle (val) {
  1795. this.pageIndex = val
  1796. this.searchTable()
  1797. },
  1798. searchTable(){
  1799. this.searchData.limit = this.pageSize
  1800. this.searchData.page = this.pageIndex
  1801. searchEcssCoDelNotifyHeaderForCK(this.searchData).then(({data}) => {
  1802. //区分请求成功和失败的状况
  1803. if (data && data.code == 0) {
  1804. this.dataList = data.page.list
  1805. this.pageIndex = data.page.currPage
  1806. this.pageSize = data.page.pageSize
  1807. this.totalPage = data.page.totalCount
  1808. if(this.dataList.length>0){
  1809. this.$refs.mainTable.setCurrentRow(this.dataList[0]);
  1810. this.changeData(this.dataList[0])
  1811. this.dataList.forEach(o => {
  1812. if (o.notifyStatus==='仓库已确认'&&!o.notifyDate) {
  1813. o.notifyDate='发货日期不确定'
  1814. }
  1815. this.dataList.forEach(o => {
  1816. o.modifyLabel = !!o.modifyFlag?'是':'';
  1817. });
  1818. });
  1819. }else {
  1820. this.changeData(null)
  1821. }
  1822. } else {
  1823. this.dataList = [];
  1824. }
  1825. });
  1826. },
  1827. cellStyle({row, column }) {
  1828. if (column.property === 'notifyDate' && row.notifyDate==='发货日期不确定') { // 根据列属性判断
  1829. return { color: '#ff5d03' };
  1830. }
  1831. if (column.property === 'modifyLabel' && row.modifyLabel==='是') { // 根据列属性判断
  1832. return { color: '#ff5d03' };
  1833. }
  1834. return {};
  1835. },
  1836. cellStyleDetail({row, column }) {
  1837. if ((column.property === 'pn' || column.property === 'qty') && row.modifyFlag===true) { // 根据列属性判断
  1838. return { color: '#ff5d03' };
  1839. }
  1840. // 检查 pn 列,当 boxrolls、rollqty、boxweight 其中任意一个没有值时,将 pn 颜色改成橙色
  1841. if (column.property === 'pn') {
  1842. const hasBoxrolls = row.boxrolls !== null && row.boxrolls !== undefined && row.boxrolls !== '';
  1843. const hasRollqty = row.rollqty !== null && row.rollqty !== undefined && row.rollqty !== '';
  1844. const hasBoxweight = row.boxweight !== null && row.boxweight !== undefined && row.boxweight !== '';
  1845. if (!hasBoxrolls || !hasRollqty || !hasBoxweight) {
  1846. return { color: '#ff8c00' }; // 橙色
  1847. }
  1848. }
  1849. return {};
  1850. },
  1851. changeData(row){
  1852. this.currentRow = JSON.parse(JSON.stringify(row));
  1853. if (this.currentRow.notifyDate==='发货日期不确定') {
  1854. this.currentRow.notifyDate=''
  1855. }
  1856. this.headerData=row;
  1857. this.refreshCurrentTabTable ();
  1858. },
  1859. refreshCurrentTabTable(){
  1860. if(this.currentRow===''||this.currentRow===null){
  1861. this.currentRow={site:'',delNo:'',notifyStatus:''}
  1862. }
  1863. if(this.activeName==='detail'){
  1864. searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => {
  1865. //区分请求成功和失败的状况
  1866. if (data && data.code == 0) {
  1867. this.dataList2 = data.rows
  1868. } else {
  1869. this.dataList2 = [];
  1870. }
  1871. });
  1872. }
  1873. if(this.activeName==='pallet'){
  1874. // 刷新装箱明细组件
  1875. if (this.$refs.packingDetailTab) {
  1876. this.$refs.packingDetailTab.refresh();
  1877. }
  1878. }
  1879. if(this.activeName==='box'){
  1880. searchEcssCoDelPalletHeaderData(this.currentRow).then(({data}) => {
  1881. //区分请求成功和失败的状况
  1882. if (data && data.code == 0) {
  1883. this.dataList4 = data.rows
  1884. } else {
  1885. this.dataList4 = [];
  1886. }
  1887. });
  1888. }
  1889. },
  1890. tabClick (tab, event) {
  1891. // 刷新列表数据
  1892. this.refreshCurrentTabTable()
  1893. },
  1894. confirmDo(){
  1895. confirmEcssDel(this.confirmModel).then(({data}) => {
  1896. if (data && data.code === 0) {
  1897. this.searchTable()
  1898. this.confirmModelFlag=false
  1899. this.$message({
  1900. message: '操作成功',
  1901. type: 'success',
  1902. duration: 1500,
  1903. onClose: () => {}
  1904. })
  1905. } else {
  1906. this.$alert(data.msg, '错误', {
  1907. confirmButtonText: '确定'
  1908. })
  1909. }
  1910. })
  1911. },
  1912. cancerConfirm(row){
  1913. let indata=JSON.parse(JSON.stringify(row));
  1914. if (row.notifyDate==='发货日期不确定') {
  1915. indata.notifyDate=''
  1916. }
  1917. this.$confirm('取消确认这条发货通知单?', '提示').then(() => {
  1918. cancerConfirmEcssDel(indata).then(({data}) => {
  1919. if (data && data.code === 0) {
  1920. this.searchTable()
  1921. this.$message({
  1922. message: '操作成功',
  1923. type: 'success',
  1924. duration: 1500,
  1925. onClose: () => {}
  1926. })
  1927. } else {
  1928. this.$alert(data.msg, '错误', {
  1929. confirmButtonText: '确定'
  1930. })
  1931. }
  1932. })
  1933. })
  1934. },
  1935. getBu () {
  1936. let tempData = {
  1937. username: this.$store.state.user.name,
  1938. }
  1939. getBuList(tempData).then(({data}) => {
  1940. if (data.code === 0) {
  1941. this.buList = data.row2
  1942. if (this.buList.length===1) {
  1943. this.searchData.buNo = this.buList[0].buNo;
  1944. }
  1945. }
  1946. })
  1947. },
  1948. confirmModelOpen(row){
  1949. this.confirmModel=JSON.parse(JSON.stringify(row));
  1950. this.confirmModelFlag=true
  1951. },
  1952. updateModelOpen(row){
  1953. this.confirmModel=JSON.parse(JSON.stringify(row));
  1954. if (this.confirmModel.notifyDate==='发货日期不确定') {
  1955. this.confirmModel.notifyDate=''
  1956. }
  1957. this.updateModelFlag=true
  1958. },
  1959. updateDo(){
  1960. if (!this.confirmModel.readyDate) {
  1961. this.$alert('请选择ReadyDate!', '错误', {
  1962. confirmButtonText: '确定'
  1963. })
  1964. return false
  1965. }
  1966. updateEcssDel(this.confirmModel).then(({data}) => {
  1967. if (data && data.code === 0) {
  1968. this.searchTable()
  1969. this.updateModelFlag=false
  1970. this.$message({
  1971. message: '操作成功',
  1972. type: 'success',
  1973. duration: 1500,
  1974. onClose: () => {}
  1975. })
  1976. } else {
  1977. this.$alert(data.msg, '错误', {
  1978. confirmButtonText: '确定'
  1979. })
  1980. }
  1981. })
  1982. },
  1983. upLoadPallet(){
  1984. if(this.currentRow.site===''||this.currentRow.site==null){
  1985. this.$alert('请先选择发货通知单!', '错误', {
  1986. confirmButtonText: '确定'
  1987. })
  1988. return false
  1989. }
  1990. let inData={
  1991. site:this.currentRow.site,
  1992. buNo:this.currentRow.buNo,
  1993. delNo:this.currentRow.delNo,
  1994. cmcInvoice:this.currentRow.cmcInvoice,
  1995. shippingMode: this.currentRow.shippingMode,
  1996. destination : this.currentRow.destination,
  1997. walMartOrderFlag:this.currentRow.walMartOrderFlag
  1998. }
  1999. this.$nextTick(() => {
  2000. this.$refs.palletUploadExcel.init(inData)
  2001. })
  2002. },
  2003. async exportExcel() {
  2004. let searchData={
  2005. site: this.currentRow.site,
  2006. buNo: this.currentRow.buNo,
  2007. delNo: this.currentRow.delNo,
  2008. cmcInvoice: this.currentRow.cmcInvoice,
  2009. shippingMode: this.currentRow.shippingMode,
  2010. destination : this.currentRow.destination,
  2011. createBy: this.$store.state.user.name,
  2012. }
  2013. try {
  2014. // 先导出Excel
  2015. await excel.exportTable({
  2016. url: "/ecss/coDel/searchCoDelPalletList",
  2017. columnMapping: excelOpts.PalletSku.columnMapping,//可以直接用table,不需要的列就剔除
  2018. mergeSetting: [],//需要合并的列
  2019. params: searchData,
  2020. fileName: "装箱数据导入模版.xlsx",
  2021. rowFetcher: res => res.data,
  2022. columnFormatter: [],
  2023. dropColumns: [],//需要剔除的列,例如dropColumns: ["netWeight"],即剔除净重列
  2024. });
  2025. // 导出成功后更新export_flag字段
  2026. let updateData = {
  2027. site: this.currentRow.site,
  2028. buNo: this.currentRow.buNo,
  2029. delNo: this.currentRow.delNo,
  2030. exportFlag: 'Y',
  2031. updateBy: this.$store.state.user.name
  2032. }
  2033. updateExportFlag(updateData).then(({data}) => {
  2034. if (data.code === 0) {
  2035. // 刷新当前行的导出状态
  2036. this.currentRow.exportFlag = 'Y';
  2037. // 刷新表格数据
  2038. this.searchTable();
  2039. } else {
  2040. this.$message.warning('导出成功,但更新导出状态失败:' + data.msg);
  2041. }
  2042. }).catch(error => {
  2043. this.$message.warning('导出成功,但更新导出状态失败');
  2044. console.error('更新导出状态失败:', error);
  2045. });
  2046. } catch (error) {
  2047. this.$message.error('导出失败');
  2048. console.error('导出失败:', error);
  2049. }
  2050. },
  2051. searchPalletTable(){
  2052. this.refreshCurrentTabTable();
  2053. },
  2054. boxDetailModel(row){
  2055. this.boxDetailData=row
  2056. searchEcssCoDelPalletDetailData(row).then(({data}) => {
  2057. if (data.code === 0) {
  2058. this.dataList5 = data.rows
  2059. }
  2060. })
  2061. this.boxDetailModelFlag=true
  2062. },
  2063. updatePalletModel(row){
  2064. this.palletModelData=JSON.parse(JSON.stringify(row))
  2065. this.palletModelData.palletRemark=row.palletRemark
  2066. this.palletModelData.addFlag=1
  2067. this.palletModelFlag=true
  2068. },
  2069. newPalletModel(){
  2070. if(this.currentRow.site===''||this.currentRow.site==null){
  2071. this.$alert('请先选择发货通知单!', '错误', {
  2072. confirmButtonText: '确定'
  2073. })
  2074. return false
  2075. }
  2076. this.palletModelData={
  2077. addFlag:0,
  2078. site:this.currentRow.site,
  2079. buNo:this.currentRow.buNo,
  2080. delNo:this.currentRow.delNo,
  2081. grossWeight:'',
  2082. netWeight:'',
  2083. boxQty:'',
  2084. }
  2085. searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => {
  2086. if (data && data.code == 0) {
  2087. this.dataList8 = data.rows
  2088. } else {
  2089. this.dataList8 = [];
  2090. }
  2091. });
  2092. this.palletModelFlag=true
  2093. },
  2094. fillUseQty(row) {
  2095. row.useQty = row.surplusQty || 0;
  2096. },
  2097. savePalletHeader(type) {
  2098. // 过滤出 useQty > 0 的行
  2099. const selectedRows = this.dataList8.filter(item => item.useQty && item.useQty > 0);
  2100. if (this.palletModelData.addFlag === 0 && selectedRows.length === 0) {
  2101. this.$alert('请至少输入一行装箱数量!', '错误', {
  2102. confirmButtonText: '确定'
  2103. });
  2104. return false;
  2105. }
  2106. // 校验:装箱数量不能大于可装箱数量 (item.qty)
  2107. const invalidRow = selectedRows.find(item => item.useQty > item.surplusQty);
  2108. if (invalidRow) {
  2109. this.$alert(`PN ${invalidRow.pn} 的装箱数量不能大于可装箱数量(${invalidRow.surplusQty})!`, '错误', {
  2110. confirmButtonText: '确定'
  2111. });
  2112. return false;
  2113. }
  2114. this.palletModelData.walMartOrderFlag = this.currentRow.walMartOrderFlag;
  2115. this.palletModelData.notifyDetailList = selectedRows;
  2116. savePalletHeader(this.palletModelData).then(({ data }) => {
  2117. if (data && data.code === 0) {
  2118. if (type===0) {
  2119. this.palletModelData={
  2120. addFlag:0,
  2121. site:this.currentRow.site,
  2122. buNo:this.currentRow.buNo,
  2123. delNo:this.currentRow.delNo,
  2124. grossWeight:'',
  2125. netWeight:'',
  2126. boxQty:'',
  2127. }
  2128. searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => {
  2129. if (data && data.code == 0) {
  2130. this.dataList8 = data.rows
  2131. } else {
  2132. this.dataList8 = [];
  2133. }
  2134. });
  2135. } else {
  2136. this.refreshCurrentTabTable()
  2137. this.palletModelFlag=false;
  2138. }
  2139. this.$message({
  2140. message: '操作成功',
  2141. type: 'success',
  2142. duration: 1500
  2143. });
  2144. } else {
  2145. this.$alert(data.msg, '错误', {
  2146. confirmButtonText: '确定'
  2147. });
  2148. }
  2149. });
  2150. },
  2151. deletePallet(row){
  2152. this.$confirm('确认删除此明细?', '提示').then(() => {
  2153. deletePalletHeader(row).then(({data}) => {
  2154. if (data && data.code === 0) {
  2155. this.refreshCurrentTabTable()
  2156. this.$message({
  2157. message: '操作成功',
  2158. type: 'success',
  2159. duration: 1500,
  2160. onClose: () => {}
  2161. })
  2162. } else {
  2163. this.$alert(data.msg, '错误', {
  2164. confirmButtonText: '确定'
  2165. })
  2166. }
  2167. })
  2168. })
  2169. },
  2170. updateBoxModel(row,type){
  2171. this.boxModelData=JSON.parse(JSON.stringify(row))
  2172. this.boxModelData.addFlag=1
  2173. this.boxModelData.type=type
  2174. this.boxModelFlag=true
  2175. },
  2176. newBoxModel(){
  2177. this.boxModelData={
  2178. addFlag:0,
  2179. site:this.boxDetailData.site,
  2180. buNo:this.boxDetailData.buNo,
  2181. delNo:this.boxDetailData.delNo,
  2182. seqNo:this.boxDetailData.seqNo,
  2183. itemNo:'',
  2184. partNo:'',
  2185. pn:'',
  2186. qty:'',
  2187. poNo:'',
  2188. boxQty:'',
  2189. rolls:'',
  2190. type:0
  2191. }
  2192. this.boxModelFlag=true
  2193. },
  2194. saveBoxHeader(){
  2195. if(this.boxModelData.partNo===''||this.boxModelData.partNo==null){
  2196. this.$alert('请输入物料!', '错误', {
  2197. confirmButtonText: '确定'
  2198. })
  2199. return false
  2200. }
  2201. if(this.boxModelData.qty<=0||this.boxModelData.qty==null){
  2202. this.$alert('请输入数量!', '错误', {
  2203. confirmButtonText: '确定'
  2204. })
  2205. return false
  2206. }
  2207. savePalletDetail(this.boxModelData).then(({data}) => {
  2208. if (data && data.code === 0) {
  2209. searchEcssCoDelPalletDetailData(this.boxDetailData).then(({data}) => {
  2210. if (data.code === 0) {
  2211. this.dataList5 = data.rows
  2212. }
  2213. })
  2214. searchCoDelPalletDataNew(this.currentRow).then(({data}) => {
  2215. if (data && data.code == 0) {
  2216. this.dataList3 = data.rows
  2217. } else {
  2218. this.dataList3 = [];
  2219. }
  2220. });
  2221. this.boxModelFlag=false;
  2222. this.$message({
  2223. message: '操作成功',
  2224. type: 'success',
  2225. duration: 1500,
  2226. onClose: () => {}
  2227. })
  2228. } else {
  2229. this.$alert(data.msg, '错误', {
  2230. confirmButtonText: '确定'
  2231. })
  2232. }
  2233. })
  2234. },
  2235. oneClickPacking(){
  2236. if(this.currentRow.site===''||this.currentRow.site==null){
  2237. this.$alert('请先选择发货通知单!', '错误', {
  2238. confirmButtonText: '确定'
  2239. })
  2240. return false
  2241. }
  2242. this.oneClickPackingModelData={
  2243. boxRemnant: false,
  2244. }
  2245. this.oneClickPackingModelFlag=true
  2246. },
  2247. saveOneClickPacking(){
  2248. let saveData = {
  2249. site: this.currentRow.site,
  2250. buNo: this.currentRow.buNo,
  2251. delNo: this.currentRow.delNo,
  2252. boxRemnant: this.oneClickPackingModelData.boxRemnant,
  2253. }
  2254. saveOneClickPacking(saveData).then(({data}) => {
  2255. if (data && data.code === 0) {
  2256. this.refreshCurrentTabTable()
  2257. this.oneClickPackingModelFlag=false;
  2258. this.$message({
  2259. message: '操作成功',
  2260. type: 'success',
  2261. duration: 1500,
  2262. onClose: () => {}
  2263. })
  2264. } else {
  2265. this.$alert(data.msg, '错误', {
  2266. confirmButtonText: '确定'
  2267. })
  2268. }
  2269. })
  2270. },
  2271. openPalletDialog () {
  2272. //请求
  2273. this.searchPalletList();
  2274. },
  2275. closePalletDialog () {
  2276. this.palletList = []
  2277. this.palletFlag = false
  2278. },
  2279. searchPalletList () {
  2280. this.palletData.buNo = this.palletModelData.buNo
  2281. searchPalletList(this.palletData).then(({data}) => {
  2282. if (data && data.code === 0){
  2283. this.palletList = data.rows;
  2284. }
  2285. })
  2286. },
  2287. palletRowDblclick (row) {
  2288. this.palletModelData.pallet = row.palletNo
  2289. this.palletFlag = false
  2290. },
  2291. // 栈板维护相关方法
  2292. palletMaintenance() {
  2293. if(this.currentRow.site===''||this.currentRow.site==null){
  2294. this.$alert('请先选择发货通知单!', '错误', {
  2295. confirmButtonText: '确定'
  2296. })
  2297. return false
  2298. }
  2299. // 重置栈板记录
  2300. this.palletMaintenanceRecords = []
  2301. // 默认根据buNo获取全部栈板
  2302. this.loadAllPalletsForMaintenance()
  2303. this.palletMaintenanceModelFlag = true
  2304. },
  2305. // 根据buNo加载全部栈板用于维护
  2306. loadAllPalletsForMaintenance() {
  2307. let searchData = {
  2308. palletType: '', // 不限制栈板类型,获取全部
  2309. buNo: this.currentRow.buNo
  2310. }
  2311. searchPalletList(searchData).then(({data}) => {
  2312. if (data.code === 0) {
  2313. const pallets = data.rows || []
  2314. // 为每个栈板创建一条记录
  2315. this.palletMaintenanceRecords = pallets.map(pallet => ({
  2316. pallet: pallet.palletNo,
  2317. palletType: pallet.palletType,
  2318. palletQty: '', // 默认为空,用户需要输入
  2319. height: '' // 使用栈板的默认高度
  2320. }))
  2321. }
  2322. }).catch(error => {
  2323. console.error('加载栈板列表失败:', error)
  2324. // 如果加载失败,至少添加一行空记录
  2325. this.palletMaintenanceRecords = [{
  2326. pallet: '',
  2327. palletType: '',
  2328. palletQty: '',
  2329. height: ''
  2330. }]
  2331. })
  2332. },
  2333. savePalletMaintenance() {
  2334. // 过滤出托数大于0的栈板记录
  2335. const validPalletRecords = this.palletMaintenanceRecords.filter(record => {
  2336. return record.palletQty && parseFloat(record.palletQty) > 0
  2337. })
  2338. if (validPalletRecords.length === 0) {
  2339. this.$alert('请至少输入一条有效的栈板记录!', '错误', {
  2340. confirmButtonText: '确定'
  2341. })
  2342. return false
  2343. }
  2344. // 验证有效的栈板记录
  2345. for (let i = 0; i < validPalletRecords.length; i++) {
  2346. const record = validPalletRecords[i]
  2347. if (!record.pallet) {
  2348. this.$alert(`栈板不能为空!`, '错误', {
  2349. confirmButtonText: '确定'
  2350. })
  2351. return false
  2352. }
  2353. if (!record.height || record.height <= 0) {
  2354. this.$alert(`栈板高度必须大于0!`, '错误', {
  2355. confirmButtonText: '确定'
  2356. })
  2357. return false
  2358. }
  2359. }
  2360. // 这里只新增栈板记录,不做其他事情
  2361. let saveData = {
  2362. site: this.currentRow.site,
  2363. buNo: this.currentRow.buNo,
  2364. delNo: this.currentRow.delNo,
  2365. palletRecords: JSON.stringify(validPalletRecords),
  2366. }
  2367. // 使用相同的API,但传递maintenanceOnly标识
  2368. savePalletMaintenance(saveData).then(({data}) => {
  2369. if (data && data.code === 0) {
  2370. this.refreshCurrentTabTable()
  2371. this.palletMaintenanceModelFlag = false;
  2372. this.$message({
  2373. message: '栈板记录新增成功',
  2374. type: 'success',
  2375. duration: 1500,
  2376. onClose: () => {}
  2377. })
  2378. } else {
  2379. this.$alert(data.msg, '错误', {
  2380. confirmButtonText: '确定'
  2381. })
  2382. }
  2383. })
  2384. },
  2385. getSummaries(param) {
  2386. const { columns } = param;
  2387. const sums = [];
  2388. columns.forEach((column, index) => {
  2389. if (index === 0) {
  2390. sums[index] = '合计';
  2391. return;
  2392. }
  2393. let sumDataList = this.dataList4.filter(item => item.palletQty>0);
  2394. const values = sumDataList.map(item => Number(item[column.property]));
  2395. if (!values.every(value => isNaN(value))) {
  2396. switch(column.property) {
  2397. case 'palletQty':
  2398. sums[index] = `${values.reduce((a, b) => a + b, 0)}`;
  2399. break;
  2400. default:
  2401. sums[index] = '';
  2402. }
  2403. } else {
  2404. sums[index] = '';
  2405. }
  2406. });
  2407. this.$nextTick(() => this.$refs.detailTable.doLayout());// 强制刷新布局, 否则会被表格覆盖
  2408. return sums;
  2409. },
  2410. },
  2411. activated() {
  2412. this.searchTable()
  2413. },
  2414. created() {
  2415. this.getBu ()
  2416. }
  2417. }
  2418. </script>
  2419. <style scoped>
  2420. /deep/ .zxClass .cell {
  2421. line-height: 24px;
  2422. font-size: 12px;
  2423. height: 24px;
  2424. }
  2425. /* 可点击的PN样式 */
  2426. .clickable-pn {
  2427. cursor: pointer;
  2428. text-decoration: underline;
  2429. }
  2430. .clickable-pn:hover {
  2431. opacity: 0.8;
  2432. }
  2433. /* 对话框标题样式 */
  2434. .dialog-title {
  2435. display: flex;
  2436. align-items: center;
  2437. font-size: 16px;
  2438. font-weight: 500;
  2439. }
  2440. .dialog-title .el-icon-question:hover {
  2441. color: #66b1ff;
  2442. transform: scale(1.1);
  2443. transition: all 0.3s ease;
  2444. }
  2445. /* 表格头部提示图标样式 */
  2446. /deep/ .el-table th .el-icon-question:hover {
  2447. color: #409EFF;
  2448. transform: scale(1.1);
  2449. transition: all 0.2s ease;
  2450. }
  2451. /* 提示框内容样式 */
  2452. /deep/ .el-tooltip__popper {
  2453. max-width: 300px;
  2454. }
  2455. /deep/ .el-tooltip__popper .el-tooltip__content {
  2456. line-height: 1.6;
  2457. }
  2458. /deep/ .el-tooltip__popper .el-tooltip__content div {
  2459. margin-bottom: 4px;
  2460. }
  2461. /deep/ .el-tooltip__popper .el-tooltip__content div:first-child {
  2462. font-weight: bold;
  2463. margin-bottom: 8px;
  2464. color: #409EFF;
  2465. }
  2466. .pallet-dialog .section {
  2467. margin: 10px 7px;
  2468. }
  2469. .section-title {
  2470. font-size: 14px;
  2471. font-weight: bold;
  2472. color: #333;
  2473. margin-bottom: 8px;
  2474. }
  2475. .table-wrapper {
  2476. height: 300px; /* 让表格部分固定高度并滚动 */
  2477. overflow-y: auto;
  2478. }
  2479. </style>