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.

2884 lines
97 KiB

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