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.

2693 lines
89 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <template>
  2. <div class="mod-config yzz">
  3. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
  4. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  5. <el-form-item :label="'申请单号'">
  6. <el-input v-model="searchData.notifyNo" style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'申请账号'">
  9. <el-input v-model="searchData.userName" style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'工单号'">
  12. <el-input v-model="searchData.orderNo" style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item label="状态" >
  15. <el-select v-model="searchData.status" placeholder="请选择" style="width: 120px">
  16. <el-option label="全部" value=""></el-option>
  17. <el-option label="ISSUE" value="ISSUE"></el-option>
  18. <el-option label="CANCEL" value="CANCEL"></el-option>
  19. </el-select>
  20. </el-form-item>
  21. <el-form-item :label="'申请单日期'">
  22. <el-date-picker
  23. style="width: 120px"
  24. v-model="searchData.startDate"
  25. type="date"
  26. value-format="yyyy-MM-dd"
  27. placeholder="选择日期">
  28. </el-date-picker>
  29. </el-form-item>
  30. <el-form-item style="margin-top: 23px;">
  31. <label style="margin-left: 0px;font-size: 19px">&#10142</label>
  32. </el-form-item>
  33. <el-form-item :label="' '">
  34. <el-date-picker
  35. style="width: 120px"
  36. v-model="searchData.endDate"
  37. type="date"
  38. value-format="yyyy-MM-dd"
  39. placeholder="选择日期">
  40. </el-date-picker>
  41. </el-form-item>
  42. <el-form-item label="推送WCS" >
  43. <el-select v-model="searchData.pushWcsFlag" placeholder="请选择" style="width: 120px">
  44. <el-option label="全部" value=""></el-option>
  45. <el-option label="未推送" value="未推送"></el-option>
  46. <el-option label="部分推送" value="部分推送"></el-option>
  47. <el-option label="推送完成" value="推送完成"></el-option>
  48. <el-option label="出库完成" value="出库完成"></el-option>
  49. </el-select>
  50. </el-form-item>
  51. <el-form-item :label="' '">
  52. <el-button type="primary" @click="searchTable()">查询</el-button>
  53. <!-- <el-button type="primary" @click="createNotifyModal()">新增</el-button> -->
  54. <download-excel
  55. :fields="fields()"
  56. :data="exportData"
  57. type="xls"
  58. :name="exportName"
  59. :header="exportHeader"
  60. :footer="exportFooter"
  61. :fetch="createExportData"
  62. :before-generate="startDownload"
  63. :before-finish="finishDownload"
  64. worksheet="导出信息"
  65. class="el-button el-button--primary el-button--medium">
  66. {{ '导出' }}
  67. </download-excel>
  68. </el-form-item>
  69. </el-form>
  70. </el-form>
  71. <el-table
  72. :data="dataList"
  73. @row-click="changeData"
  74. :height="height"
  75. border
  76. highlight-current-row
  77. ref="mainTable"
  78. v-loading="dataListLoading"
  79. style="width: 100%; ">
  80. <el-table-column
  81. v-for="(item,index) in columnList1" :key="index"
  82. :sortable="item.columnSortable"
  83. :prop="item.columnProp"
  84. :header-align="item.headerAlign"
  85. :show-overflow-tooltip="item.showOverflowTooltip"
  86. :align="item.align"
  87. :fixed="item.fixed==''?false:item.fixed"
  88. :min-width="item.columnWidth"
  89. :label="item.columnLabel">
  90. <template slot-scope="scope">
  91. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  92. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  93. style="width: 100px; height: 80px"/></span>
  94. </template>
  95. </el-table-column>
  96. <el-table-column
  97. header-align="center"
  98. align="center"
  99. width="180"
  100. label="操作">
  101. <template slot-scope="scope">
  102. <a type="text" size="small" v-if="scope.row.status==='ISSUE'" @click="closeNotifyModel(scope.row)">关闭</a>
  103. <a type="text" size="small" v-if="scope.row.status==='CLOSED'" @click="openNotify(scope.row)">开启</a>
  104. <a type="text" size="small" v-if="scope.row.pushWcsFlag!=='出库完成'&&scope.row.pushWcsFlag!=='推送完成'&&scope.row.status==='ISSUE'" @click="previewInventory(scope.row)" style="margin-left: 10px;">推送WCS</a>
  105. <!-- rqrq - 取消下达按钮,只在状态为ISSUE且未推送WCS时显示 -->
  106. <a type="text" size="small" v-if="scope.row.status==='ISSUE'&&scope.row.pushWcsFlag==='未推送'" @click="cancelIssueNotifyHandle(scope.row)" style="margin-left: 10px;">取消下达</a>
  107. <!-- <a type="text" size="small" v-if="scope.row.pushWcsFlag!=='Y'" @click="pushToWcs(scope.row)" style="margin-left: 10px;">推送WCS</a>-->
  108. </template>
  109. </el-table-column>
  110. </el-table>
  111. <el-pagination
  112. @size-change="sizeChangeHandle"
  113. @current-change="currentChangeHandle"
  114. :current-page="pageIndex"
  115. :page-sizes="[20, 50, 100, 1000]"
  116. :page-size="pageSize"
  117. :total="totalPage"
  118. layout="total, sizes, prev, pager, next, jumper">
  119. </el-pagination>
  120. <el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  121. <el-tab-pane label="申请单明细" name="detail">
  122. <el-table
  123. :data="dataList2"
  124. :height="height"
  125. border
  126. v-loading="dataListLoading"
  127. style="width: 100%; ">
  128. <!-- <el-table-column-->
  129. <!-- header-align="center"-->
  130. <!-- align="center"-->
  131. <!-- width="80"-->
  132. <!-- label="操作">-->
  133. <!-- <template slot-scope="scope">-->
  134. <!-- <a type="text" size="small" v-if="currentRow.status==='ISSUE'" @click="deleteNotifySOSPlus(scope.row)">删除</a>-->
  135. <!-- </template>-->
  136. <!-- </el-table-column>-->
  137. <el-table-column
  138. v-for="(item,index) in columnList2" :key="index"
  139. :sortable="item.columnSortable"
  140. :prop="item.columnProp"
  141. :header-align="item.headerAlign"
  142. :show-overflow-tooltip="item.showOverflowTooltip"
  143. :align="item.align"
  144. :fixed="item.fixed==''?false:item.fixed"
  145. :min-width="item.columnWidth"
  146. :label="item.columnLabel">
  147. <template slot-scope="scope">
  148. <!-- rqrq - 是否推送WCS特殊显示:Y显示绿色"是",否则显示灰色"否" -->
  149. <span v-if="item.columnProp === 'pushWmsFlag'" :style="{color: scope.row.pushWmsFlag === 'Y' ? '#67C23A' : '#909399'}">
  150. {{ scope.row.pushWmsFlag === 'Y' ? '是' : '否' }}
  151. </span>
  152. <!-- rqrq - 立库取出特殊显示:Y显示绿色"是",否则显示灰色"否" -->
  153. <span v-else-if="item.columnProp === 'transportFlag'" :style="{color: scope.row.transportFlag === 'Y' ? '#67C23A' : '#909399'}">
  154. {{ scope.row.transportFlag === 'Y' ? '是' : '否' }}
  155. </span>
  156. <!-- 普通列显示 -->
  157. <span v-else-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  158. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  159. style="width: 100px; height: 80px"/></span>
  160. </template>
  161. </el-table-column>
  162. <!-- 操作列 -->
  163. <el-table-column
  164. fixed="right"
  165. header-align="center"
  166. align="center"
  167. width="120"
  168. label="操作">
  169. <template slot-scope="scope">
  170. <a type="text" size="small" v-if="scope.row.pushWmsFlag !== 'Y' && currentRow && currentRow.pushWcsFlag === '未推送'" @click="enterSOSDetail(scope.row)" style="margin-right: 10px;">修改</a>
  171. <a type="text" size="small" v-if="scope.row.pushWmsFlag !== 'Y' && currentRow && currentRow.pushWcsFlag === '未推送'" @click="deleteNotifySOSPlus(scope.row)">删除</a>
  172. </template>
  173. </el-table-column>
  174. </el-table>
  175. </el-tab-pane>
  176. <el-tab-pane label="材料明细" name="sub">
  177. <el-table
  178. :data="dataList3"
  179. :height="height"
  180. border
  181. :row-class-name="tableRowClassName"
  182. v-loading="dataListLoading"
  183. @row-dblclick="handleMaterialRowDblClick"
  184. style="width: 100%; ">
  185. <!-- <el-table-column-->
  186. <!-- header-align="center"-->
  187. <!-- align="center"-->
  188. <!-- width="80"-->
  189. <!-- label="操作">-->
  190. <!-- <template slot-scope="scope">-->
  191. <!-- <a type="text" size="small" v-if="currentRow.status==='ISSUE'" @click="deleteNotifyMaterial(scope.row)">删除</a>-->
  192. <!-- </template>-->
  193. <!-- </el-table-column>-->
  194. <el-table-column
  195. v-for="(item,index) in columnList3" :key="index"
  196. :sortable="item.columnSortable"
  197. :prop="item.columnProp"
  198. :header-align="item.headerAlign"
  199. :show-overflow-tooltip="item.showOverflowTooltip"
  200. :align="item.align"
  201. :fixed="item.fixed==''?false:item.fixed"
  202. :min-width="item.columnWidth"
  203. :label="item.columnLabel">
  204. <template slot-scope="scope">
  205. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  206. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  207. style="width: 100px; height: 80px"/></span>
  208. </template>
  209. </el-table-column>
  210. </el-table>
  211. </el-tab-pane>
  212. <el-tab-pane label="材料汇总" name="sum">
  213. <el-table
  214. :data="dataList4"
  215. :height="height"
  216. border
  217. v-loading="dataListLoading"
  218. style="width: 100%; ">
  219. <!-- <el-table-column-->
  220. <!-- header-align="center"-->
  221. <!-- align="center"-->
  222. <!-- width="80"-->
  223. <!-- fixed="left"-->
  224. <!-- label="操作">-->
  225. <!-- <template slot-scope="scope">-->
  226. <!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
  227. <!-- </template>-->
  228. <!-- </el-table-column>-->
  229. <el-table-column
  230. v-for="(item,index) in columnList4" :key="index"
  231. :sortable="item.columnSortable"
  232. :prop="item.columnProp"
  233. :header-align="item.headerAlign"
  234. :show-overflow-tooltip="item.showOverflowTooltip"
  235. :align="item.align"
  236. :fixed="item.fixed==''?false:item.fixed"
  237. :min-width="item.columnWidth"
  238. :label="item.columnLabel">
  239. <template slot-scope="scope">
  240. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  241. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  242. style="width: 100px; height: 80px"/></span>
  243. </template>
  244. </el-table-column>
  245. </el-table>
  246. </el-tab-pane>
  247. <el-tab-pane label="预留标签清单" name="labelDetail">
  248. <el-table
  249. :data="dataList7"
  250. :height="height"
  251. border
  252. v-loading="dataListLoading"
  253. style="width: 100%; ">
  254. <el-table-column
  255. v-for="(item,index) in columnList6" :key="index"
  256. :sortable="item.columnSortable"
  257. :prop="item.columnProp"
  258. :header-align="item.headerAlign"
  259. :show-overflow-tooltip="item.showOverflowTooltip"
  260. :align="item.align"
  261. :fixed="item.fixed==''?false:item.fixed"
  262. :min-width="item.columnWidth"
  263. :label="item.columnLabel">
  264. <template slot-scope="scope">
  265. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  266. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  267. style="width: 100px; height: 80px"/></span>
  268. </template>
  269. </el-table-column>
  270. </el-table>
  271. </el-tab-pane>
  272. </el-tabs>
  273. <el-dialog title="关闭原因" :close-on-click-modal="false" v-drag :visible.sync="closeModalFlag" width="450px">
  274. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
  275. <el-row :gutter="20">
  276. <el-col :span="24">
  277. <el-form-item >
  278. <el-input
  279. type="textarea"
  280. v-model="closeData.closeRemark "
  281. :rows="3"
  282. resize='none'
  283. maxlength="200"
  284. show-word-limit
  285. style="height: 60px" >
  286. </el-input>
  287. </el-form-item>
  288. </el-col>
  289. </el-row>
  290. </el-form>
  291. <el-footer style="height:40px;margin-top: 60px;text-align:center">
  292. <el-button type="primary" @click="closeNotify()">保存</el-button>
  293. <el-button type="primary" @click="closeModalFlag=false">关闭</el-button>
  294. </el-footer>
  295. </el-dialog>
  296. <!-- 物料明细对话框 -->
  297. <el-dialog title="申请明细" :close-on-click-modal="false" v-drag :visible.sync="materialModalFlag" width="900px">
  298. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  299. <el-row :gutter="20">
  300. <el-col :span="6">
  301. <el-form-item :label="'生产订单号'">
  302. <el-input v-model="sobomData.orderNo" disabled></el-input>
  303. </el-form-item>
  304. </el-col>
  305. <el-col :span="6">
  306. <el-form-item :label="'产品编码'">
  307. <el-input v-model="sobomData.partNo" disabled></el-input>
  308. </el-form-item>
  309. </el-col>
  310. </el-row>
  311. </el-form>
  312. <div class="yzzTable">
  313. <el-table :height="400" :data="sobomList" border v-loading="bomLoadFlag" style="width: 100%;">
  314. <el-table-column
  315. prop="componentPartNo"
  316. label="物料编码"
  317. sortable
  318. headerAlign="center"
  319. width="120"
  320. align="left">
  321. </el-table-column>
  322. <el-table-column
  323. prop="componentPartDesc"
  324. label="物料描述"
  325. headerAlign="center"
  326. width="200"
  327. align="left"
  328. show-overflow-tooltip>
  329. </el-table-column>
  330. <el-table-column
  331. prop="qtyRequired"
  332. label="需求数量"
  333. headerAlign="center"
  334. width="100"
  335. align="right">
  336. </el-table-column>
  337. <!-- rqrq - 新增可用库存列 -->
  338. <el-table-column
  339. prop="availableQty"
  340. label="可用库存"
  341. headerAlign="center"
  342. width="100"
  343. align="right">
  344. <template slot-scope="scope">
  345. <span :style="{fontWeight: 'bold', color: (scope.row.availableQty < scope.row.qtyRequired) ? '#F56C6C' : ''}">
  346. {{ scope.row.availableQty }}
  347. </span>
  348. </template>
  349. </el-table-column>
  350. <el-table-column
  351. prop="qtyToIssue"
  352. label="本次申请数量"
  353. headerAlign="center"
  354. width="120"
  355. align="right">
  356. <template slot-scope="scope">
  357. <el-input v-model="scope.row.qtyToIssue" type="number" style="height: 11px; width: 98%;" :step="0"
  358. :min="0"></el-input>
  359. </template>
  360. </el-table-column>
  361. <el-table-column
  362. prop="remark"
  363. label="备注"
  364. headerAlign="center"
  365. width="200"
  366. align="left">
  367. <template slot-scope="scope">
  368. <el-input v-model="scope.row.remark" style="padding: 0;width: 100%"></el-input>
  369. </template>
  370. </el-table-column>
  371. <el-table-column prop="" header-align="center" align="center" min-width="80" label="操作">
  372. <template slot-scope="scope">
  373. <el-button type="primary" @click="qtyAllForBom(scope.row)" style="width: 100%">全数领料</el-button>
  374. </template>
  375. </el-table-column>
  376. </el-table>
  377. </div>
  378. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  379. <el-button type="primary" @click="saveMaterialDetail()">保存</el-button>
  380. <el-button type="primary" @click="materialModalFlag=false">关闭</el-button>
  381. </el-footer>
  382. </el-dialog>
  383. <!-- 编辑材料明细对话框 -->
  384. <el-dialog title="编辑材料明细" :close-on-click-modal="false" v-drag :visible.sync="editMaterialModalFlag" width="600px">
  385. <el-form :inline="true" label-position="top" label-width="120px" style="margin-top: 20px;">
  386. <el-row>
  387. <el-col span="8">
  388. <el-form-item label="申请单序号">
  389. <el-input v-model="editMaterialData.itemNo" disabled></el-input>
  390. </el-form-item>
  391. </el-col>
  392. <el-col span="8">
  393. <el-form-item label="材料编码">
  394. <el-input v-model="editMaterialData.componentPartNo" disabled></el-input>
  395. </el-form-item>
  396. </el-col>
  397. <el-col span="8">
  398. <el-form-item label="生产订单">
  399. <el-input v-model="editMaterialData.soorderNo" disabled></el-input>
  400. </el-form-item>
  401. </el-col>
  402. </el-row>
  403. <el-row>
  404. <el-col span="8">
  405. <el-form-item label="需求时间">
  406. <el-input v-model="editMaterialData.needDate" disabled></el-input>
  407. </el-form-item>
  408. </el-col>
  409. <el-col span="8">
  410. <el-form-item label="申请数量" required>
  411. <el-input
  412. v-model="editMaterialData.qtyToIssue"
  413. :min="0"
  414. style="width: 98%;"
  415. @input="value => editMaterialData.qtyToIssue = value
  416. .replace(/[^\d.]/g, '')
  417. .replace(/\.{2,}/g, '.')
  418. .replace(/^\./, '0.')
  419. .replace(/(\.\d{4}).*/, '$1')
  420. .replace(/^0+(?=\d)/, '0')
  421. .replace(/^0+(?=\.)/, '0')"
  422. ></el-input>
  423. </el-form-item>
  424. </el-col>
  425. <el-col span="8">
  426. <el-form-item label="类型">
  427. <el-input v-model="editMaterialData.issueType" disabled></el-input>
  428. </el-form-item>
  429. </el-col>
  430. </el-row>
  431. </el-form>
  432. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  433. <el-button type="primary" @click="saveEditMaterialDetail()">保存</el-button>
  434. <el-button type="primary" @click="editMaterialModalFlag=false">关闭</el-button>
  435. </el-footer>
  436. </el-dialog>
  437. <!-- 库存预览模态框 -->
  438. <el-dialog
  439. title="库存匹配预览"
  440. :visible.sync="previewDialogVisible"
  441. width="80%"
  442. :close-on-click-modal="false">
  443. <el-table
  444. :data="previewData"
  445. border
  446. v-loading="previewLoading"
  447. style="width: 100%;"
  448. height="300"
  449. :row-class-name="getRowClassName">
  450. <el-table-column
  451. prop="rowNo"
  452. label="行号"
  453. width="80"
  454. align="center">
  455. </el-table-column>
  456. <el-table-column
  457. prop="productionOrderNo"
  458. label="生产订单号"
  459. width="100"
  460. sortable
  461. align="center">
  462. </el-table-column>
  463. <el-table-column
  464. prop="bomLineNo"
  465. label="BOM行号"
  466. width="100"
  467. sortable
  468. align="center">
  469. </el-table-column>
  470. <el-table-column
  471. prop="partNo"
  472. label="物料编码"
  473. width="100"
  474. sortable
  475. align="center">
  476. </el-table-column>
  477. <el-table-column
  478. prop="requiredQty"
  479. label="需求数量"
  480. width="80"
  481. align="center">
  482. </el-table-column>
  483. <el-table-column
  484. prop="isWarehouseSatisfied"
  485. label="立库是否满足"
  486. width="100"
  487. align="center">
  488. <template slot-scope="scope">
  489. <span :style="{color: scope.row.isWarehouseSatisfied === 'Y' ? '#67C23A' : '#F56C6C'}">
  490. {{ scope.row.isWarehouseSatisfied === 'Y' ? '是' : '否' }}
  491. </span>
  492. </template>
  493. </el-table-column>
  494. <el-table-column
  495. prop="isOtherWarehouseSatisfied"
  496. label="分切仓库是否满足"
  497. width="120"
  498. align="center">
  499. <template slot-scope="scope">
  500. <span v-if="scope.row.isOtherWarehouseSatisfied" :style="{color: scope.row.isOtherWarehouseSatisfied === 'Y' ? '#67C23A' : '#F56C6C'}">
  501. {{ scope.row.isOtherWarehouseSatisfied === 'Y' ? '是' : '否' }}
  502. </span>
  503. </template>
  504. </el-table-column>
  505. <el-table-column
  506. prop="matchedBarcodes"
  507. label="匹配条码"
  508. min-width="300"
  509. align="left"
  510. class-name="wrap-text-column">
  511. <template slot-scope="scope">
  512. <div style="white-space: normal; word-break: break-all; line-height: 1.5;">
  513. {{ scope.row.matchedBarcodes }}
  514. </div>
  515. </template>
  516. </el-table-column>
  517. </el-table>
  518. <span slot="footer" class="dialog-footer">
  519. <el-button type="primary" class="yzzButtonAn" @click="pushToWCS" :disabled="previewLoading">
  520. {{ previewLoading ? '推送中...' : '推送至WCS' }}
  521. </el-button>
  522. <el-button @click="previewDialogVisible = false" :disabled="previewLoading">关闭</el-button>
  523. </span>
  524. </el-dialog>
  525. </div>
  526. </template>
  527. <script>
  528. import {
  529. haiAnGetPoOrderMaterialForIssure,
  530. haiAnSearchNotifyHeaderNew,
  531. haiAnCheckUserHasUnissueShopOrder,
  532. haiAnCancelIssueNotify
  533. } from '@/api/haianWarehouse/poOrderIssueNotify.js'
  534. export default {
  535. name: 'searchPoIssureNotify54',
  536. data() {
  537. return {
  538. height:200,
  539. activeName: 'detail',
  540. dataList: [],
  541. dataList2: [],
  542. dataList3: [],
  543. dataList4: [],
  544. dataList5: [],
  545. dataList6: [],
  546. dataList7: [], // 预留标签清单数据 - rqrq
  547. userBuList:[],
  548. createNotifyFlag: false,
  549. saveOrderDetailFlag: false,
  550. closeData:{
  551. site:'',
  552. notifyNo:'',
  553. closeRemark:'',
  554. username:this.$store.state.user.name,
  555. },
  556. closeModalFlag:false,
  557. searchData: {
  558. page: 1,
  559. limit: 100,
  560. site:'',
  561. userName: '',
  562. notifyNo: '',
  563. status: '',
  564. pushWcsFlag: '', // rqrq - 推送WCS筛选条件
  565. loginUserName: this.$store.state.user.name,
  566. startDate: this.dayjs().format("YYYY-MM-DD"),
  567. endDate: this.dayjs().format("YYYY-MM-DD"),
  568. issueStartDate:this.dayjs().format("YYYY-MM-DD"),
  569. issueEndDate: this.dayjs().format("YYYY-MM-DD")+" 23:59:59",
  570. sql: "",
  571. orderNo: "",
  572. orderType: 'shoporder', // rqrq - 默认查询shoporder类型
  573. },
  574. notifyData:{
  575. site: '',
  576. bu: '',
  577. notifyNo: '',
  578. notifyDate: '',
  579. enteredDate: '',
  580. userName: this.$store.state.user.name,
  581. userDisplay: '',
  582. remark: '',
  583. planIssueDate: '',
  584. outWorkOrderFlag: false,
  585. },
  586. pageIndex: 1,
  587. pageSize: 100,
  588. totalPage: 0,
  589. //工单分页
  590. co_pageIndex: 1,
  591. co_pageSize: 100,
  592. co_totalPage: 0,
  593. dataListLoading: false,
  594. currentRow:'',
  595. columnList1:[
  596. {
  597. userId: this.$store.state.user.name,
  598. functionId: 701002,
  599. serialNumber: '701002Table1NotifyNo',
  600. tableId: "701002Table1",
  601. tableName: "领料申请主表",
  602. columnProp: "notifyNo",
  603. headerAlign: "center",
  604. align: "center",
  605. columnLabel: "申请单单号",
  606. columnHidden: false,
  607. columnImage: false,
  608. columnSortable: false,
  609. sortLv: 0,
  610. status: true,
  611. fixed: '',
  612. columnWidth: 100
  613. },{
  614. userId: this.$store.state.user.name,
  615. functionId: 701002,
  616. serialNumber: '701002Table1NotifyDate',
  617. tableId: "701002Table1",
  618. tableName: "领料申请主表",
  619. columnProp: "notifyDate",
  620. headerAlign: "center",
  621. align: "center",
  622. columnLabel: "申请日期",
  623. columnHidden: false,
  624. columnImage: false,
  625. columnSortable: false,
  626. sortLv: 0,
  627. status: true,
  628. fixed: '',
  629. columnWidth: 100
  630. }, {
  631. userId: this.$store.state.user.name,
  632. functionId: 701002,
  633. serialNumber: '701002Table1UserName',
  634. tableId: "701002Table1",
  635. tableName: "领料申请主表",
  636. columnProp: "username",
  637. headerAlign: "center",
  638. align: "left",
  639. columnLabel: "申请账号",
  640. columnHidden: false,
  641. columnImage: false,
  642. columnSortable: false,
  643. sortLv: 0,
  644. status: true,
  645. fixed: '',
  646. columnWidth: 100
  647. },{
  648. userId: this.$store.state.user.name,
  649. functionId: 701002,
  650. serialNumber: '701002Table1EnteredDate',
  651. tableId: "701002Table1",
  652. tableName: "领料申请主表",
  653. columnProp: "enteredDate",
  654. headerAlign: "center",
  655. align: "center",
  656. columnLabel: "录入时间",
  657. columnHidden: false,
  658. columnImage: false,
  659. columnSortable: false,
  660. sortLv: 0,
  661. status: true,
  662. fixed: '',
  663. columnWidth: 120
  664. },{
  665. userId: this.$store.state.user.name,
  666. functionId: 701002,
  667. serialNumber: '701002Table1Status',
  668. tableId: "701002Table1",
  669. tableName: "领料申请主表",
  670. columnProp: "status",
  671. headerAlign: "center",
  672. align: "left",
  673. columnLabel: "状态",
  674. columnHidden: false,
  675. columnImage: false,
  676. columnSortable: false,
  677. sortLv: 0,
  678. status: true,
  679. fixed: '',
  680. columnWidth: 80
  681. },{
  682. userId: this.$store.state.user.name,
  683. functionId: 701002,
  684. serialNumber: '701002Table1ConfirmStatus',
  685. tableId: "701002Table1",
  686. tableName: "领料申请主表",
  687. columnProp: "confirmStatus",
  688. headerAlign: "center",
  689. align: "center",
  690. columnLabel: "确认状态",
  691. columnHidden: false,
  692. columnImage: false,
  693. columnSortable: false,
  694. sortLv: 0,
  695. status: true,
  696. fixed: '',
  697. columnWidth: 80
  698. },{
  699. userId: this.$store.state.user.name,
  700. functionId: 701002,
  701. serialNumber: '701002Table1WcsPushFlag',
  702. tableId: "701002Table1",
  703. tableName: "领料申请主表",
  704. columnProp: "pushWcsFlag",
  705. headerAlign: "center",
  706. align: "left",
  707. columnLabel: "推送WCS",
  708. columnHidden: false,
  709. columnImage: false,
  710. columnSortable: false,
  711. sortLv: 0,
  712. status: true,
  713. fixed: '',
  714. columnWidth: 80
  715. },{
  716. userId: this.$store.state.user.name,
  717. functionId: 701002,
  718. serialNumber: '701002Table1Remark',
  719. tableId: "701002Table1",
  720. tableName: "领料申请主表",
  721. columnProp: "remark",
  722. headerAlign: "center",
  723. align: "left",
  724. columnLabel: "备注",
  725. columnHidden: false,
  726. columnImage: false,
  727. columnSortable: false,
  728. sortLv: 0,
  729. status: true,
  730. fixed: '',
  731. columnWidth: 200
  732. },
  733. ],
  734. columnList2:[
  735. {
  736. userId: this.$store.state.user.name,
  737. functionId: 701002,
  738. serialNumber: '701002Table2ItemNo',
  739. tableId: "701002Table2",
  740. tableName: "申请单派工单明细表",
  741. columnProp: "itemNo",
  742. headerAlign: "center",
  743. align: "right",
  744. columnLabel: "序号",
  745. columnHidden: false,
  746. columnImage: false,
  747. columnSortable: false,
  748. sortLv: 0,
  749. status: true,
  750. fixed: '',
  751. columnWidth: 40
  752. },
  753. {
  754. userId: this.$store.state.user.name,
  755. functionId: 701002,
  756. serialNumber: '701002Table2NeedDate',
  757. tableId: "701002Table2",
  758. tableName: "领料申请派工单子表",
  759. columnProp: 'needDate',
  760. headerAlign: "center",
  761. align: "left",
  762. columnLabel: '要求发料时间',
  763. columnHidden: false,
  764. columnImage: false,
  765. columnSortable: false,
  766. sortLv: 0,
  767. status: true,
  768. fixed: '',
  769. columnWidth: 80,
  770. },
  771. {
  772. userId: this.$store.state.user.name,
  773. functionId: 701002,
  774. serialNumber: '701002Table2PushWcsTime',
  775. tableId: "701002Table2",
  776. tableName: "领料申请派工单子表",
  777. columnProp: 'pushWcsTime',
  778. headerAlign: "center",
  779. align: "center",
  780. columnLabel: '推送WCS时间',
  781. columnHidden: false,
  782. columnImage: false,
  783. columnSortable: false,
  784. sortLv: 0,
  785. status: true,
  786. fixed: '',
  787. columnWidth: 130,
  788. },
  789. {
  790. userId: this.$store.state.user.name,
  791. functionId: 701002,
  792. serialNumber: '701002Table2SOOrderNo',
  793. tableId: "701002Table2",
  794. tableName: "申请单派工单明细表",
  795. columnProp: "soorderNo",
  796. headerAlign: "center",
  797. align: "left",
  798. columnLabel: "生产订单",
  799. columnHidden: false,
  800. columnImage: false,
  801. columnSortable: false,
  802. sortLv: 0,
  803. status: true,
  804. fixed: '',
  805. columnWidth: 120
  806. }, {
  807. userId: this.$store.state.user.name,
  808. functionId: 701002,
  809. serialNumber: '701002Table2FGPartNo',
  810. tableId: "701002Table2",
  811. tableName: "申请单派工单明细表",
  812. columnProp: "fgPartNo",
  813. headerAlign: "center",
  814. align: "left",
  815. columnLabel: "工单物料",
  816. columnHidden: false,
  817. columnImage: false,
  818. columnSortable: false,
  819. sortLv: 0,
  820. status: true,
  821. fixed: '',
  822. columnWidth: 80
  823. }, {
  824. userId: this.$store.state.user.name,
  825. functionId: 701002,
  826. serialNumber: '701002Table2ReleaseNo',
  827. tableId: "701002Table2",
  828. tableName: "申请单派工单明细表",
  829. columnProp: "releaseNo",
  830. headerAlign: "center",
  831. align: "left",
  832. columnLabel: "发布号",
  833. columnHidden: false,
  834. columnImage: false,
  835. columnSortable: false,
  836. sortLv: 0,
  837. status: true,
  838. fixed: '',
  839. columnWidth: 80
  840. }, {
  841. userId: this.$store.state.user.name,
  842. functionId: 701002,
  843. serialNumber: '701002Table2SequenceNo',
  844. tableId: "701002Table2",
  845. tableName: "申请单派工单明细表",
  846. columnProp: "sequenceNo",
  847. headerAlign: "center",
  848. align: "left",
  849. columnLabel: "序号",
  850. columnHidden: false,
  851. columnImage: false,
  852. columnSortable: false,
  853. sortLv: 0,
  854. status: true,
  855. fixed: '',
  856. columnWidth: 80
  857. }, {
  858. userId: this.$store.state.user.name,
  859. functionId: 701002,
  860. serialNumber: '701002Table2PushWmsFlag',
  861. tableId: "701002Table2",
  862. tableName: "申请单派工单明细表",
  863. columnProp: "pushWmsFlag",
  864. headerAlign: "center",
  865. align: "center",
  866. columnLabel: "是否推送WCS",
  867. columnHidden: false,
  868. columnImage: false,
  869. columnSortable: false,
  870. sortLv: 0,
  871. status: true,
  872. fixed: '',
  873. columnWidth: 120
  874. }, {
  875. userId: this.$store.state.user.name,
  876. functionId: 701002,
  877. serialNumber: '701002Table2TransportFlag',
  878. tableId: "701002Table2",
  879. tableName: "申请单派工单明细表",
  880. columnProp: "transportFlag",
  881. headerAlign: "center",
  882. align: "center",
  883. columnLabel: "立库取出",
  884. columnHidden: false,
  885. columnImage: false,
  886. columnSortable: false,
  887. sortLv: 0,
  888. status: true,
  889. fixed: '',
  890. columnWidth: 80
  891. }, {
  892. userId: this.$store.state.user.name,
  893. functionId: 701002,
  894. serialNumber: '701002Table2AreaDesc',
  895. tableId: "701002Table2",
  896. tableName: "申请单派工单明细表",
  897. columnProp: "areaDesc",
  898. headerAlign: "center",
  899. align: "left",
  900. columnLabel: "配送区域",
  901. columnHidden: false,
  902. columnImage: false,
  903. columnSortable: false,
  904. sortLv: 0,
  905. status: true,
  906. fixed: '',
  907. columnWidth: 100
  908. }
  909. ],
  910. columnList3:[
  911. {
  912. userId: this.$store.state.user.name,
  913. functionId: 701002,
  914. serialNumber: '701002Table3ItemNo',
  915. tableId: "701002Table3",
  916. tableName: "申请单材料明细表",
  917. columnProp: "itemNo",
  918. headerAlign: "center",
  919. align: "right",
  920. columnLabel: "申请单序号",
  921. columnHidden: false,
  922. columnImage: false,
  923. columnSortable: false,
  924. sortLv: 0,
  925. status: true,
  926. fixed: '',
  927. columnWidth: 80
  928. },{
  929. userId: this.$store.state.user.name,
  930. functionId: 701002,
  931. serialNumber: '701002Table3ComponentPartNo',
  932. tableId: "701002Table3",
  933. tableName: "申请单材料明细表",
  934. columnProp: "componentPartNo",
  935. headerAlign: "center",
  936. align: "center",
  937. columnLabel: "材料编码",
  938. columnHidden: false,
  939. columnImage: false,
  940. columnSortable: false,
  941. sortLv: 0,
  942. status: true,
  943. fixed: '',
  944. columnWidth: 100
  945. },{
  946. userId: this.$store.state.user.name,
  947. functionId: 701002,
  948. serialNumber: '701002Table3IsInWh',
  949. tableId: "701002Table3",
  950. tableName: "申请单材料明细表",
  951. columnProp: "isInWh",
  952. headerAlign: "center",
  953. align: "center",
  954. columnLabel: "是否进立库",
  955. columnHidden: false,
  956. columnImage: false,
  957. columnSortable: false,
  958. sortLv: 0,
  959. status: true,
  960. fixed: '',
  961. columnWidth: 80
  962. },{
  963. userId: this.$store.state.user.name,
  964. functionId: 701002,
  965. serialNumber: '701002Table3NeedDate',
  966. tableId: "701002Table3",
  967. tableName: "申请单材料明细表",
  968. columnProp: "needDate",
  969. headerAlign: "center",
  970. align: "center",
  971. columnLabel: "需求时间",
  972. columnHidden: false,
  973. columnImage: false,
  974. columnSortable: false,
  975. sortLv: 0,
  976. status: true,
  977. fixed: '',
  978. columnWidth: 110
  979. },{
  980. userId: this.$store.state.user.name,
  981. functionId: 701002,
  982. serialNumber: '701002Table3QtyToIssue',
  983. tableId: "701002Table3",
  984. tableName: "申请单材料明细表",
  985. columnProp: "qtyToIssue",
  986. headerAlign: "center",
  987. align: "right",
  988. columnLabel: "申请数量",
  989. columnHidden: false,
  990. columnImage: false,
  991. columnSortable: false,
  992. sortLv: 0,
  993. status: true,
  994. fixed: '',
  995. columnWidth: 80
  996. },/* {
  997. userId: this.$store.state.user.name,
  998. functionId: 701002,
  999. serialNumber: '701002Table3QtyToIssueOriginal',
  1000. tableId: "701002Table3",
  1001. tableName: "申请单材料明细表",
  1002. columnProp: "qtyToIssueOriginal",
  1003. headerAlign: "center",
  1004. align: "right",
  1005. columnLabel: "已发数量",
  1006. columnHidden: false,
  1007. columnImage: false,
  1008. columnSortable: false,
  1009. sortLv: 0,
  1010. status: true,
  1011. fixed: '',
  1012. columnWidth: 80
  1013. }, */{
  1014. userId: this.$store.state.user.name,
  1015. functionId: 701002,
  1016. serialNumber: '701002Table3IssueType',
  1017. tableId: "701002Table3",
  1018. tableName: "申请单材料明细表",
  1019. columnProp: "issueType",
  1020. headerAlign: "center",
  1021. align: "right",
  1022. columnLabel: "类型",
  1023. columnHidden: false,
  1024. columnImage: false,
  1025. columnSortable: false,
  1026. sortLv: 0,
  1027. status: true,
  1028. fixed: '',
  1029. columnWidth: 80
  1030. },{
  1031. userId: this.$store.state.user.name,
  1032. functionId: 701002,
  1033. serialNumber: '701002Table3Remark',
  1034. tableId: "701002Table3",
  1035. tableName: "申请单材料明细表",
  1036. columnProp: "remark",
  1037. headerAlign: "center",
  1038. align: "left",
  1039. columnLabel: "备注",
  1040. columnHidden: false,
  1041. columnImage: false,
  1042. columnSortable: false,
  1043. sortLv: 0,
  1044. status: true,
  1045. fixed: '',
  1046. columnWidth: 160
  1047. },{
  1048. userId: this.$store.state.user.name,
  1049. functionId: 701002,
  1050. serialNumber: '701002Table3SOOrderNo',
  1051. tableId: "701002Table3",
  1052. tableName: "申请单材料明细表",
  1053. columnProp: "soorderNo",
  1054. headerAlign: "center",
  1055. align: "left",
  1056. columnLabel: "生产订单",
  1057. columnHidden: false,
  1058. columnImage: false,
  1059. columnSortable: false,
  1060. sortLv: 0,
  1061. status: true,
  1062. fixed: '',
  1063. columnWidth: 120
  1064. },{
  1065. userId: this.$store.state.user.name,
  1066. functionId: 701002,
  1067. serialNumber: '701002Table3BOMItemNo',
  1068. tableId: "701002Table3",
  1069. tableName: "申请单材料明细表",
  1070. columnProp: "bomitemNo",
  1071. headerAlign: "center",
  1072. align: "right",
  1073. columnLabel: "BOM序号",
  1074. columnHidden: false,
  1075. columnImage: false,
  1076. columnSortable: false,
  1077. sortLv: 0,
  1078. status: true,
  1079. fixed: '',
  1080. columnWidth: 80
  1081. },
  1082. ],
  1083. columnList4:[
  1084. {
  1085. userId: this.$store.state.user.name,
  1086. functionId: 701002,
  1087. serialNumber: '701002Table4IssueType',
  1088. tableId: "701002Table4",
  1089. tableName: "申请单材料明细表",
  1090. columnProp: "issueType",
  1091. headerAlign: "center",
  1092. align: "center",
  1093. columnLabel: "类型",
  1094. columnHidden: false,
  1095. columnImage: false,
  1096. columnSortable: false,
  1097. sortLv: 0,
  1098. status: true,
  1099. fixed: '',
  1100. columnWidth: 100
  1101. },
  1102. {
  1103. userId: this.$store.state.user.name,
  1104. functionId: 701002,
  1105. serialNumber: '701002Table4ComponentPartNo',
  1106. tableId: "701002Table4",
  1107. tableName: "申请单材料明细表",
  1108. columnProp: "componentPartNo",
  1109. headerAlign: "center",
  1110. align: "center",
  1111. columnLabel: "材料编码",
  1112. columnHidden: false,
  1113. columnImage: false,
  1114. columnSortable: false,
  1115. sortLv: 0,
  1116. status: true,
  1117. fixed: '',
  1118. columnWidth: 100
  1119. },{
  1120. userId: this.$store.state.user.name,
  1121. functionId: 701002,
  1122. serialNumber: '701002Table4IsInWh',
  1123. tableId: "701002Table4",
  1124. tableName: "申请单材料明细表",
  1125. columnProp: "isInWh",
  1126. headerAlign: "center",
  1127. align: "center",
  1128. columnLabel: "是否进立库",
  1129. columnHidden: false,
  1130. columnImage: false,
  1131. columnSortable: false,
  1132. sortLv: 0,
  1133. status: true,
  1134. fixed: '',
  1135. columnWidth: 80
  1136. },{
  1137. userId: this.$store.state.user.name,
  1138. functionId: 701002,
  1139. serialNumber: '701002Table4PartDesc',
  1140. tableId: "701002Table4",
  1141. tableName: "申请单材料明细表",
  1142. columnProp: "partDesc",
  1143. headerAlign: "center",
  1144. align: "left",
  1145. columnLabel: "材料名称",
  1146. columnHidden: false,
  1147. columnImage: false,
  1148. columnSortable: false,
  1149. sortLv: 0,
  1150. status: true,
  1151. fixed: '',
  1152. columnWidth: 130
  1153. },{
  1154. userId: this.$store.state.user.name,
  1155. functionId: 701002,
  1156. serialNumber: '701002Table4QtyToIssue',
  1157. tableId: "701002Table4",
  1158. tableName: "申请单材料明细表",
  1159. columnProp: "qtyToIssue",
  1160. headerAlign: "center",
  1161. align: "right",
  1162. columnLabel: "合计申请数量",
  1163. columnHidden: false,
  1164. columnImage: false,
  1165. columnSortable: false,
  1166. sortLv: 0,
  1167. status: true,
  1168. fixed: '',
  1169. columnWidth: 80
  1170. },{
  1171. userId: this.$store.state.user.name,
  1172. functionId: 701002,
  1173. serialNumber: '701002Table4QtyToIssueOriginal',
  1174. tableId: "701002Table4",
  1175. tableName: "申请单材料明细表",
  1176. columnProp: "qtyToIssueOriginal",
  1177. headerAlign: "center",
  1178. align: "right",
  1179. columnLabel: "合计已发数量",
  1180. columnHidden: false,
  1181. columnImage: false,
  1182. columnSortable: false,
  1183. sortLv: 0,
  1184. status: true,
  1185. fixed: '',
  1186. columnWidth: 80
  1187. },
  1188. ],
  1189. columnList6:[ // 预留标签清单列配置 - rqrq
  1190. {
  1191. userId: this.$store.state.user.name,
  1192. functionId: 701002,
  1193. serialNumber: '701002Table6ItemNo',
  1194. tableId: "701002Table6",
  1195. tableName: "预留标签清单表",
  1196. columnProp: "itemNo",
  1197. headerAlign: "center",
  1198. align: "right",
  1199. columnLabel: "订单序号",
  1200. columnHidden: false,
  1201. columnImage: false,
  1202. columnSortable: false,
  1203. sortLv: 0,
  1204. status: true,
  1205. fixed: '',
  1206. columnWidth: 80
  1207. },{
  1208. userId: this.$store.state.user.name,
  1209. functionId: 701002,
  1210. serialNumber: '701002Table6BOMItemNo',
  1211. tableId: "701002Table6",
  1212. tableName: "预留标签清单表",
  1213. columnProp: "bomItemNo",
  1214. headerAlign: "center",
  1215. align: "right",
  1216. columnLabel: "订单物料行号",
  1217. columnHidden: false,
  1218. columnImage: false,
  1219. columnSortable: false,
  1220. sortLv: 0,
  1221. status: true,
  1222. fixed: '',
  1223. columnWidth: 100
  1224. },{
  1225. userId: this.$store.state.user.name,
  1226. functionId: 701002,
  1227. serialNumber: '701002Table6SerialNo',
  1228. tableId: "701002Table6",
  1229. tableName: "预留标签清单表",
  1230. columnProp: "serialNo",
  1231. headerAlign: "center",
  1232. align: "left",
  1233. columnLabel: "标签号",
  1234. columnHidden: false,
  1235. columnImage: false,
  1236. columnSortable: false,
  1237. sortLv: 0,
  1238. status: true,
  1239. fixed: '',
  1240. columnWidth: 120
  1241. },{
  1242. userId: this.$store.state.user.name,
  1243. functionId: 701002,
  1244. serialNumber: '701002Table6TaskRef',
  1245. tableId: "701002Table6",
  1246. tableName: "预留标签清单表",
  1247. columnProp: "taskRef",
  1248. headerAlign: "center",
  1249. align: "left",
  1250. columnLabel: "立库任务号",
  1251. columnHidden: false,
  1252. columnImage: false,
  1253. columnSortable: false,
  1254. sortLv: 0,
  1255. status: true,
  1256. fixed: '',
  1257. columnWidth: 120
  1258. },{
  1259. userId: this.$store.state.user.name,
  1260. functionId: 701002,
  1261. serialNumber: '701002Table6TaskItem',
  1262. tableId: "701002Table6",
  1263. tableName: "预留标签清单表",
  1264. columnProp: "taskItem",
  1265. headerAlign: "center",
  1266. align: "right",
  1267. columnLabel: "立库任务行号",
  1268. columnHidden: false,
  1269. columnImage: false,
  1270. columnSortable: false,
  1271. sortLv: 0,
  1272. status: true,
  1273. fixed: '',
  1274. columnWidth: 100
  1275. },{
  1276. userId: this.$store.state.user.name,
  1277. functionId: 701002,
  1278. serialNumber: '701002Table6OutWcsFlag',
  1279. tableId: "701002Table6",
  1280. tableName: "预留标签清单表",
  1281. columnProp: "outWcsFlag",
  1282. headerAlign: "center",
  1283. align: "center",
  1284. columnLabel: "立库取出",
  1285. columnHidden: false,
  1286. columnImage: false,
  1287. columnSortable: false,
  1288. sortLv: 0,
  1289. status: true,
  1290. fixed: '',
  1291. columnWidth: 80
  1292. },
  1293. {
  1294. userId: this.$store.state.user.name,
  1295. functionId: 701002,
  1296. serialNumber: '701002Table6OutWcsTime',
  1297. tableId: "701002Table6",
  1298. tableName: "预留标签清单表",
  1299. columnProp: "outWcsTime",
  1300. headerAlign: "center",
  1301. align: "center",
  1302. columnLabel: "取出时间",
  1303. columnHidden: false,
  1304. columnImage: false,
  1305. columnSortable: false,
  1306. sortLv: 0,
  1307. status: true,
  1308. fixed: '',
  1309. columnWidth: 140
  1310. }
  1311. ],
  1312. // 导出 start
  1313. exportData: [],
  1314. exportName: '发料申请单'+this.dayjs().format('YYYYMMDDHHmmss'),
  1315. exportHeader: ["发料申请单"],
  1316. exportFooter: [],
  1317. // 导出 end
  1318. orderDetailData:{
  1319. orderNo:'',
  1320. seqNo:'',
  1321. locationNo:'',
  1322. qtyrequired:'',
  1323. issureQty:0,
  1324. partDesc:'',
  1325. partNo:'',
  1326. resourceId:'',
  1327. resourceDesc:'',
  1328. needDate:'',
  1329. itemDesc:'',
  1330. workCenterNo:'',
  1331. itemNo:0,
  1332. materialType:'BOM物料',
  1333. },
  1334. chooseSOSModalFlag: false,
  1335. chooseSOSData: {
  1336. orderno: '',
  1337. seqno: '',
  1338. sResourceid: '',
  1339. startDate: '',
  1340. endDate: '',
  1341. },
  1342. chooseOrderModalFlag: false,
  1343. chooseOrderData: {
  1344. page: 1,
  1345. limit: 100,
  1346. orderNo: '',
  1347. status: '',
  1348. date3: '',
  1349. date4: '',
  1350. statusList: '',
  1351. },
  1352. chooseOrderList: [],
  1353. chooseOperationModalFlag: false,
  1354. chooseOperationData: {
  1355. orderNo: '',
  1356. site: '',
  1357. itemDesc: ''
  1358. },
  1359. chooseOperationList: [],
  1360. chooseResourceModalFlag: false,
  1361. chooseResourceData: {
  1362. site: '',
  1363. workCenterNo: '',
  1364. resourceID: '',
  1365. resourceDesc: '',
  1366. },
  1367. chooseResourceList: [],
  1368. chooseSOSList: [],
  1369. choosePartModalFlag: false,
  1370. choosePartData: {
  1371. site: '',
  1372. sourceBu: '',
  1373. partNo: '',
  1374. partDesc: '',
  1375. spec: '',
  1376. },
  1377. choosePartList: [],
  1378. // 预览相关数据
  1379. previewDialogVisible: false,
  1380. previewLoading: false,
  1381. previewData: [],
  1382. // 物料明细对话框相关数据
  1383. materialModalFlag: false,
  1384. sobomList: [],
  1385. sobomData: {
  1386. orderNo: '',
  1387. seqNo: '',
  1388. partNo: '',
  1389. },
  1390. bomLoadFlag: false,
  1391. // 编辑材料明细对话框相关数据
  1392. editMaterialModalFlag: false,
  1393. editMaterialData: {
  1394. itemNo: '',
  1395. componentPartNo: '',
  1396. isInWh: '',
  1397. needDate: '',
  1398. qtyToIssue: 0,
  1399. issueType: '',
  1400. remark: '',
  1401. soorderNo: '',
  1402. bomitemNo: '',
  1403. site: '',
  1404. notifyNo: '',
  1405. },
  1406. }
  1407. },
  1408. mounted () {
  1409. this.$nextTick(() => {
  1410. this.height = (window.innerHeight- 315) / 2
  1411. })
  1412. },
  1413. created () {
  1414. this.searchTable()
  1415. // 补充海安标签扩展列,确保预留标签页签能展示海安增强字段 - rqrq
  1416. this.haiAnEnsureLabelColumns()
  1417. },
  1418. methods: {
  1419. // 每页数
  1420. sizeChangeHandle (val) {
  1421. this.pageSize = val
  1422. this.searchTable()
  1423. },
  1424. // 当前页
  1425. currentChangeHandle (val) {
  1426. this.pageIndex = val
  1427. this.searchTable()
  1428. },
  1429. tabClick (tab, event) {
  1430. // 刷新列表数据
  1431. this.refreshCurrentTabTable()
  1432. },
  1433. changeData(row){
  1434. this.currentRow = JSON.parse(JSON.stringify(row));
  1435. this.refreshCurrentTabTable ();
  1436. },
  1437. refreshCurrentTabTable(){
  1438. if(this.currentRow===''||this.currentRow===null){
  1439. this.currentRow={site:'',notifyNo:'',orderType:'shoporder'}
  1440. }
  1441. // rqrq - 添加orderType参数
  1442. let queryData = {
  1443. ...this.currentRow,
  1444. orderType: 'shoporder'
  1445. }
  1446. if(this.activeName==='detail'){
  1447. searchNotifyOrderListNew(queryData).then(({data}) => {
  1448. //区分请求成功和失败的状况
  1449. if (data && data.code == 0) {
  1450. this.dataList2 = data.rows
  1451. } else {
  1452. this.dataList2 = [];
  1453. }
  1454. });
  1455. }else if(this.activeName==='sub'){
  1456. searchNotifyMaterialListNew(queryData).then(({data}) => {
  1457. //区分请求成功和失败的状况
  1458. if (data && data.code == 0) {
  1459. this.dataList3 = data.rows
  1460. } else {
  1461. this.dataList3 = [];
  1462. }
  1463. });
  1464. }else if(this.activeName==='change'){
  1465. searchNotifyLogNew(queryData).then(({data}) => {
  1466. //区分请求成功和失败的状况
  1467. if (data && data.code == 0) {
  1468. this.dataList5 = data.rows
  1469. } else {
  1470. this.dataList5 = [];
  1471. }
  1472. });
  1473. }else if(this.activeName==='close'){
  1474. searchNotifyLogCloseNew(queryData).then(({data}) => {
  1475. //区分请求成功和失败的状况
  1476. if (data && data.code == 0) {
  1477. this.dataList6 = data.rows
  1478. } else {
  1479. this.dataList6 = [];
  1480. }
  1481. });
  1482. }else if(this.activeName==='labelDetail'){ // rqrq - 预留标签清单页签
  1483. searchMaterialListDetail(queryData).then(({data}) => {
  1484. //区分请求成功和失败的状况
  1485. if (data && data.code == 0) {
  1486. this.dataList7 = data.rows
  1487. } else {
  1488. this.dataList7 = [];
  1489. }
  1490. });
  1491. }else {
  1492. searchSumNotifyMaterialListNew(queryData).then(({data}) => {
  1493. //区分请求成功和失败的状况
  1494. if (data && data.code == 0) {
  1495. this.dataList4 = data.rows
  1496. } else {
  1497. this.dataList4 = [];
  1498. }
  1499. });
  1500. }
  1501. },
  1502. searchTable(){
  1503. this.searchData.limit = this.pageSize
  1504. this.searchData.page = this.pageIndex
  1505. searchNotifyHeaderNew(this.searchData).then(({data}) => {
  1506. //区分请求成功和失败的状况
  1507. if (data && data.code == 0) {
  1508. this.dataList = data.page.list
  1509. this.pageIndex = data.page.currPage
  1510. this.pageSize = data.page.pageSize
  1511. this.totalPage = data.page.totalCount
  1512. } else {
  1513. this.dataList = [];
  1514. }
  1515. });
  1516. },
  1517. closeNotifyModel(row){
  1518. this.closeData.site=row.site
  1519. this.closeData.notifyNo=row.notifyNo
  1520. this.closeData.closeRemark=''
  1521. this.closeModalFlag=true
  1522. },
  1523. closeNotify(){
  1524. if(this.closeData.closeRemark==null||this.closeData.closeRemark===''){
  1525. this.$alert("必须输入关闭原因", '错误', {
  1526. confirmButtonText: '确定'
  1527. })
  1528. return false;
  1529. }
  1530. let inData={
  1531. site:this.closeData.site,
  1532. notifyNo:this.closeData.notifyNo,
  1533. closeRemark:this.closeData.closeRemark,
  1534. username:this.$store.state.user.name,
  1535. status:'CLOSED',
  1536. }
  1537. updateNotifyStatusNew(inData).then(({data}) => {
  1538. if (data && data.code === 0) {
  1539. this.closeModalFlag=false
  1540. this.searchTable()
  1541. this.$message({
  1542. message: '操作成功',
  1543. type: 'success',
  1544. duration: 1500,
  1545. onClose: () => {}
  1546. })
  1547. } else {
  1548. this.$alert(data.msg, '错误', {
  1549. confirmButtonText: '确定'
  1550. })
  1551. }
  1552. })
  1553. },
  1554. openNotify(row){
  1555. this.$confirm('确认打开?', '提示', {
  1556. confirmButtonText: '确定',
  1557. cancelButtonText: '取消',
  1558. type: 'warning'
  1559. }).then(() => {
  1560. let inData={
  1561. site:row.site,
  1562. notifyNo:row.notifyNo,
  1563. status:'ISSUE',
  1564. }
  1565. updateNotifyStatusNew(inData).then(({data}) => {
  1566. if (data && data.code === 0) {
  1567. this.searchTable()
  1568. this.$message({
  1569. message: '操作成功',
  1570. type: 'success',
  1571. duration: 1500,
  1572. onClose: () => {}
  1573. })
  1574. } else {
  1575. this.$alert(data.msg, '错误', {
  1576. confirmButtonText: '确定'
  1577. })
  1578. }
  1579. })
  1580. })
  1581. },
  1582. // 预览库存匹配情况
  1583. previewInventory(row) {
  1584. this.currentRow = row // 保存当前行数据
  1585. this.previewDialogVisible = true
  1586. this.previewLoading = true
  1587. this.previewData = []
  1588. let inData = {
  1589. site: row.site,
  1590. notifyNo: row.notifyNo
  1591. }
  1592. checkIssueNotifyInventory(inData).then(({data}) => {
  1593. this.previewLoading = false
  1594. if (data && data.code === 0) {
  1595. this.previewData = data.rows || []
  1596. console.log('库存预览数据:', this.previewData)
  1597. } else {
  1598. this.$alert(data.msg, '错误', {
  1599. confirmButtonText: '确定'
  1600. })
  1601. }
  1602. }).catch(() => {
  1603. this.previewLoading = false
  1604. this.$message.error('获取库存预览失败')
  1605. })
  1606. },
  1607. // 根据订单满足状态设置行样式
  1608. getRowClassName({row}) {
  1609. if (row.orderSatisfactionStatus === 1) {
  1610. return 'success-row' // 绿色:完全立库满足
  1611. } else if (row.orderSatisfactionStatus === 2) {
  1612. return 'warning-row' // 黄色:立库+分切区满足
  1613. } else if (row.orderSatisfactionStatus === 3) {
  1614. return 'danger-row' // 红色:存在不满足
  1615. }
  1616. return ''
  1617. },
  1618. // 从预览对话框推送至WCS
  1619. pushToWCS() {
  1620. // 筛选绿色和黄色的数据(orderSatisfactionStatus = 1 或 2)
  1621. // const validData = this.previewData.filter(item =>
  1622. // item.orderSatisfactionStatus === 1 || item.orderSatisfactionStatus === 2
  1623. // )
  1624. //全部推送 后端判断
  1625. const validData = this.previewData
  1626. if (validData.length === 0) {
  1627. this.$message.warning('没有可推送的数据(只推送绿色和黄色状态的数据)')
  1628. return
  1629. }
  1630. this.$confirm(`确认推送 ${validData.length} 条数据至WCS?`, '提示', {
  1631. confirmButtonText: '确定',
  1632. cancelButtonText: '取消',
  1633. type: 'warning'
  1634. }).then(() => {
  1635. // 显示加载状态 - rqrq
  1636. this.previewLoading = true
  1637. const inData = {
  1638. site: this.currentRow.site,
  1639. notifyNo: this.currentRow.notifyNo,
  1640. inventoryList: validData
  1641. }
  1642. pushInventoryToWcs(inData).then(({data}) => {
  1643. this.previewLoading = false
  1644. if (data && data.code === 0) {
  1645. this.$message({
  1646. message: '推送WCS成功',
  1647. type: 'success',
  1648. duration: 1500
  1649. })
  1650. this.previewDialogVisible = false
  1651. this.searchTable()
  1652. } else {
  1653. this.$alert(data.msg || '推送失败', '错误', {
  1654. confirmButtonText: '确定'
  1655. })
  1656. }
  1657. }).catch((error) => {
  1658. this.previewLoading = false
  1659. this.$message.error(error.message || '推送WCS失败,请重试')
  1660. })
  1661. }).catch(() => {
  1662. // 用户取消操作 - rqrq
  1663. console.log('用户取消推送')
  1664. })
  1665. },
  1666. pushToWcs(row){
  1667. this.$confirm('确认推送到WCS?', '提示', {
  1668. confirmButtonText: '确定',
  1669. cancelButtonText: '取消',
  1670. type: 'warning'
  1671. }).then(() => {
  1672. let inData={
  1673. site: row.site,
  1674. notifyNo: row.notifyNo
  1675. }
  1676. pushNotifyToWcs(inData).then(({data}) => {
  1677. if (data && data.code === 0) {
  1678. this.searchTable()
  1679. this.$message({
  1680. message: '推送WCS成功',
  1681. type: 'success',
  1682. duration: 1500,
  1683. onClose: () => {}
  1684. })
  1685. } else {
  1686. this.$alert(data.msg, '错误', {
  1687. confirmButtonText: '确定'
  1688. })
  1689. }
  1690. })
  1691. })
  1692. },
  1693. /**
  1694. * @Description 取消下达处理方法 - rqrq
  1695. * @param row 当前行数据
  1696. */
  1697. cancelIssueNotifyHandle(row) {
  1698. // 先判断发起人是否有未下达的shoporder申请单 - rqrq
  1699. let checkData = {
  1700. site: row.site,
  1701. username: row.username
  1702. }
  1703. checkUserHasUnissueShopOrder(checkData).then(({ data }) => {
  1704. if (data && data.code === 0) {
  1705. // 如果有未下达的申请单 - rqrq
  1706. if (data.row != null) {
  1707. this.$alert('该用户有未下达的申请单,请先处理', '提示', {
  1708. confirmButtonText: '确定'
  1709. })
  1710. return
  1711. }
  1712. // 没有未下达的申请单,执行取消下达 - rqrq
  1713. this.$confirm(`确定取消下达申请单【${row.notifyNo}】吗?`, '提示', {
  1714. confirmButtonText: '确定',
  1715. cancelButtonText: '取消',
  1716. type: 'warning'
  1717. }).then(() => {
  1718. let cancelData = {
  1719. site: row.site,
  1720. notifyNo: row.notifyNo
  1721. }
  1722. cancelIssueNotify(cancelData).then(({ data }) => {
  1723. if (data && data.code === 0) {
  1724. this.$message.success('取消下达成功')
  1725. // 重新加载数据 - rqrq
  1726. this.searchTable()
  1727. } else {
  1728. this.$alert(data.msg, '错误', {
  1729. confirmButtonText: '确定'
  1730. })
  1731. }
  1732. }).catch(() => {
  1733. this.$message.error('取消下达失败')
  1734. })
  1735. }).catch(() => {
  1736. // 用户取消操作 - rqrq
  1737. })
  1738. } else {
  1739. this.$alert(data.msg, '错误', {
  1740. confirmButtonText: '确定'
  1741. })
  1742. }
  1743. }).catch(() => {
  1744. this.$message.error('检查用户申请单失败')
  1745. })
  1746. },
  1747. deleteNotifyMaterial(row){
  1748. this.$confirm('确认删除?', '提示', {
  1749. confirmButtonText: '确定',
  1750. cancelButtonText: '取消',
  1751. type: 'warning'
  1752. }).then(() => {
  1753. deleteNotifyMaterial(row).then(({data}) => {
  1754. if (data && data.code === 0) {
  1755. this.refreshCurrentTabTable()
  1756. this.$message({
  1757. message: '操作成功',
  1758. type: 'success',
  1759. duration: 1500,
  1760. onClose: () => {}
  1761. })
  1762. } else {
  1763. this.$alert(data.msg, '错误', {
  1764. confirmButtonText: '确定'
  1765. })
  1766. }
  1767. })
  1768. })
  1769. },
  1770. deleteNotifySOSPlus(row){
  1771. this.$confirm('确认删除?', '提示', {
  1772. confirmButtonText: '确定',
  1773. cancelButtonText: '取消',
  1774. type: 'warning'
  1775. }).then(() => {
  1776. deleteNotifySOSPlus(row).then(({data}) => {
  1777. if (data && data.code === 0) {
  1778. this.refreshCurrentTabTable()
  1779. this.$message({
  1780. message: '操作成功',
  1781. type: 'success',
  1782. duration: 1500,
  1783. onClose: () => {}
  1784. })
  1785. } else {
  1786. this.$alert(data.msg, '错误', {
  1787. confirmButtonText: '确定'
  1788. })
  1789. }
  1790. })
  1791. })
  1792. },
  1793. // 进入工单物料明细
  1794. enterSOSDetail(row) {
  1795. let rows = {
  1796. site: this.currentRow.site || this.$store.state.user.site,
  1797. notifyNo: this.currentRow.notifyNo,
  1798. orderNo: row.soorderNo || row.orderNo,
  1799. seqNo: row.seqNo || '',
  1800. partNo: row.fgPartNo || row.partNo,
  1801. itemNo: row.itemNo,
  1802. releaseNo: row.releaseNo,
  1803. sequenceNo: row.sequenceNo,
  1804. }
  1805. this.enterSOS(rows)
  1806. },
  1807. // 打开物料明细对话框
  1808. enterSOS(row) {
  1809. this.materialModalFlag = true
  1810. this.sobomList = []
  1811. this.sobomData = {
  1812. orderNo: row.orderNo,
  1813. seqNo: row.seqNo,
  1814. partNo: row.partNo,
  1815. }
  1816. this.bomLoadFlag = true
  1817. let inData = {
  1818. site: this.currentRow.site || this.$store.state.user.site,
  1819. notifyNo: this.currentRow.notifyNo,
  1820. orderNo: row.orderNo,
  1821. releaseNo: row.releaseNo,
  1822. sequenceNo: row.sequenceNo,
  1823. partNo: row.partNo,
  1824. itemNo: row.itemNo,
  1825. }
  1826. getSOSBOMForIssureNew(inData).then(({ data }) => {
  1827. this.bomLoadFlag = false
  1828. if (data.code === 0) {
  1829. this.sobomList = data.rows
  1830. for (let i = 0; i < this.sobomList.length; i++) {
  1831. this.sobomList[i].itemNo = inData.itemNo
  1832. }
  1833. } else {
  1834. this.$alert(data.msg, '错误', {
  1835. confirmButtonText: '确定'
  1836. })
  1837. }
  1838. }).catch(() => {
  1839. this.bomLoadFlag = false
  1840. this.$message.error('获取物料明细失败')
  1841. })
  1842. },
  1843. // 全数领料
  1844. qtyAllForBom(row) {
  1845. row.qtyToIssue = row.qtyRequired
  1846. },
  1847. // 保存物料明细
  1848. saveMaterialDetail() {
  1849. for (let i = 0; i < this.sobomList.length; i++) {
  1850. if (
  1851. this.sobomList[i].qtyToIssue === '' ||
  1852. this.sobomList[i].qtyToIssue == null
  1853. ) {
  1854. this.sobomList[i].qtyToIssue = 0
  1855. }
  1856. this.sobomList[i].notifyNo = this.currentRow.notifyNo
  1857. this.sobomList[i].site = this.currentRow.site || this.$store.state.user.site
  1858. }
  1859. let materialList = this.sobomList.filter((item) => item.qtyToIssue > 0)
  1860. if (materialList.length == 0) {
  1861. this.$alert('没有需要保存的内容!', '提示', {
  1862. confirmButtonText: '确定',
  1863. })
  1864. return false
  1865. }
  1866. saveMaterialDetail(materialList).then(({ data }) => {
  1867. if (data.code === 0) {
  1868. this.materialModalFlag = false
  1869. this.refreshCurrentTabTable()
  1870. this.$message.success('操作成功')
  1871. } else {
  1872. this.$alert(data.msg, '错误', {
  1873. confirmButtonText: '确定',
  1874. })
  1875. }
  1876. })
  1877. },
  1878. // 处理材料明细行双击事件
  1879. handleMaterialRowDblClick(row) {
  1880. if(!'未推送'.includes(this.currentRow.pushWcsFlag)){
  1881. this.$message.warning('只有未推送状态的申请单才能编辑材料明细')
  1882. return;
  1883. }
  1884. // 保存完整的行数据,以便后续保存时包含所有必要字段
  1885. this.editMaterialData = JSON.parse(JSON.stringify(row))
  1886. // 确保包含必要的字段
  1887. this.editMaterialData.site = this.currentRow.site || this.$store.state.user.site
  1888. this.editMaterialData.notifyNo = this.currentRow.notifyNo || ''
  1889. // 确保申请数量有默认值
  1890. if (this.editMaterialData.qtyToIssue === null || this.editMaterialData.qtyToIssue === undefined) {
  1891. this.editMaterialData.qtyToIssue = 0
  1892. }
  1893. this.editMaterialModalFlag = true
  1894. },
  1895. // 保存编辑的材料明细
  1896. saveEditMaterialDetail() {
  1897. if (this.editMaterialData.qtyToIssue === null || this.editMaterialData.qtyToIssue === '') {
  1898. this.$alert('申请数量不能为空!', '提示', {
  1899. confirmButtonText: '确定',
  1900. })
  1901. return false
  1902. }
  1903. if (this.editMaterialData.qtyToIssue < 0) {
  1904. this.$alert('申请数量不能小于0!', '提示', {
  1905. confirmButtonText: '确定',
  1906. })
  1907. return false
  1908. }
  1909. // 使用完整的行数据,只更新申请数量
  1910. let materialData = {
  1911. ...this.editMaterialData,
  1912. }
  1913. // 确保申请数量不为空
  1914. if (materialData.qtyToIssue === '' || materialData.qtyToIssue == null) {
  1915. materialData.qtyToIssue = 0
  1916. }
  1917. updateMaterialDetail(materialData).then(({ data }) => {
  1918. if (data.code === 0) {
  1919. this.editMaterialModalFlag = false
  1920. this.refreshCurrentTabTable()
  1921. this.$message.success('保存成功')
  1922. } else {
  1923. this.$alert(data.msg, '错误', {
  1924. confirmButtonText: '确定',
  1925. })
  1926. }
  1927. }).catch(() => {
  1928. this.$message.error('保存失败')
  1929. })
  1930. },
  1931. //导出excel - rqrq
  1932. async createExportData() {
  1933. const queryParams = {
  1934. ...this.searchData,
  1935. limit: 999999, // 设置一个很大的数字来获取全部数据 - rqrq
  1936. page: 1
  1937. }
  1938. const {data} = await searchNotifyHeaderNew(queryParams)
  1939. if (data && data.code === 0) {
  1940. return data.page.list || []
  1941. }
  1942. return []
  1943. },
  1944. startDownload() {
  1945. // this.exportData = this.dataList
  1946. },
  1947. finishDownload() {
  1948. },
  1949. fields() {
  1950. let json = "{"
  1951. this.columnList1.forEach((item, index) => {
  1952. if (index == this.columnList1.length - 1) {
  1953. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1954. } else {
  1955. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1956. }
  1957. })
  1958. json += "}"
  1959. let s = eval("(" + json + ")")
  1960. return s
  1961. },
  1962. tableRowClassName ({row, rowIndex}) {
  1963. if (row.qtyToIssueOriginal<row.qtyToIssue&&new Date(row.needDate)<new Date(this.dayjs().format("YYYY-MM-DD HH:mm"))) {
  1964. return 'error-row'
  1965. }
  1966. return ''
  1967. },
  1968. /**
  1969. * 统一构建海安查询入参,强制使用登录用户site避免跨站点串单 - rqrq
  1970. */
  1971. haiAnBuildQueryData (row) {
  1972. const baseRow = row || {}
  1973. return {
  1974. ...baseRow,
  1975. site: this.$store.state.user.site,
  1976. orderType: 'shoporder'
  1977. }
  1978. },
  1979. /**
  1980. * 海安标签页签增加subsite/allocSeq/palletId/taskSeq列,便于追踪标签流向 - rqrq
  1981. */
  1982. haiAnEnsureLabelColumns () {
  1983. if (!Array.isArray(this.columnList6)) {
  1984. return
  1985. }
  1986. const appendColumn = (columnProp, columnLabel, columnWidth = 100, align = 'left') => {
  1987. if (this.columnList6.some(col => col.columnProp === columnProp)) {
  1988. return
  1989. }
  1990. this.columnList6.push({
  1991. userId: this.$store.state.user.name,
  1992. functionId: 701002,
  1993. serialNumber: `701002Table6${columnProp}`,
  1994. tableId: '701002Table6',
  1995. tableName: '海安预留标签清单表',
  1996. columnProp,
  1997. headerAlign: 'center',
  1998. align,
  1999. columnLabel,
  2000. columnHidden: false,
  2001. columnImage: false,
  2002. columnSortable: false,
  2003. sortLv: 0,
  2004. status: true,
  2005. fixed: '',
  2006. columnWidth
  2007. })
  2008. }
  2009. appendColumn('taskSeq', '立库任务序号', 110, 'right')
  2010. appendColumn('subSite', '子站点', 110, 'left')
  2011. appendColumn('allocSeq', '分配序号', 100, 'right')
  2012. appendColumn('palletId', '栈板号', 120, 'left')
  2013. },
  2014. /**
  2015. * 海安页签刷新逻辑,四个页签均改为海安接口并保留原交互语义 - rqrq
  2016. */
  2017. refreshCurrentTabTable () {
  2018. if (this.currentRow === '' || this.currentRow === null) {
  2019. this.currentRow = { site: this.$store.state.user.site, notifyNo: '', orderType: 'shoporder' }
  2020. }
  2021. const queryData = this.haiAnBuildQueryData(this.currentRow)
  2022. if (this.activeName === 'detail') {
  2023. haiAnSearchNotifyOrderListNew(queryData).then(({ data }) => {
  2024. this.dataList2 = data && data.code === 0 ? (data.rows || []) : []
  2025. })
  2026. } else if (this.activeName === 'sub') {
  2027. haiAnSearchNotifyMaterialListNew(queryData).then(({ data }) => {
  2028. this.dataList3 = data && data.code === 0 ? (data.rows || []) : []
  2029. })
  2030. } else if (this.activeName === 'change') {
  2031. haiAnSearchNotifyLogNew(queryData).then(({ data }) => {
  2032. this.dataList5 = data && data.code === 0 ? (data.rows || []) : []
  2033. })
  2034. } else if (this.activeName === 'close') {
  2035. haiAnSearchNotifyLogCloseNew(queryData).then(({ data }) => {
  2036. this.dataList6 = data && data.code === 0 ? (data.rows || []) : []
  2037. })
  2038. } else if (this.activeName === 'labelDetail') {
  2039. haiAnSearchMaterialListDetail(queryData).then(({ data }) => {
  2040. this.dataList7 = data && data.code === 0 ? (data.rows || []) : []
  2041. })
  2042. } else {
  2043. haiAnSearchSumNotifyMaterialListNew(queryData).then(({ data }) => {
  2044. this.dataList4 = data && data.code === 0 ? (data.rows || []) : []
  2045. })
  2046. }
  2047. },
  2048. /**
  2049. * 海安主表查询改为海安接口,固定传登录站点并保留分页语义 - rqrq
  2050. */
  2051. searchTable () {
  2052. this.searchData.limit = this.pageSize
  2053. this.searchData.page = this.pageIndex
  2054. this.searchData.site = this.$store.state.user.site
  2055. this.searchData.orderType = 'shoporder'
  2056. haiAnSearchNotifyHeaderNew(this.searchData).then(({ data }) => {
  2057. if (data && data.code === 0) {
  2058. this.dataList = data.page.list
  2059. this.pageIndex = data.page.currPage
  2060. this.pageSize = data.page.pageSize
  2061. this.totalPage = data.page.totalCount
  2062. return
  2063. }
  2064. this.dataList = []
  2065. })
  2066. },
  2067. /**
  2068. * 海安关闭申请单,保持旧页面的必填关闭原因校验与提示语义 - rqrq
  2069. */
  2070. closeNotify () {
  2071. if (this.closeData.closeRemark == null || this.closeData.closeRemark === '') {
  2072. this.$alert('必须输入关闭原因', '错误', {
  2073. confirmButtonText: '确定'
  2074. })
  2075. return false
  2076. }
  2077. const inData = {
  2078. site: this.$store.state.user.site,
  2079. notifyNo: this.closeData.notifyNo,
  2080. closeRemark: this.closeData.closeRemark,
  2081. username: this.$store.state.user.name,
  2082. status: 'CLOSED'
  2083. }
  2084. haiAnUpdateNotifyStatusNew(inData).then(({ data }) => {
  2085. if (data && data.code === 0) {
  2086. this.closeModalFlag = false
  2087. this.searchTable()
  2088. this.$message({
  2089. message: '操作成功',
  2090. type: 'success',
  2091. duration: 1500
  2092. })
  2093. return
  2094. }
  2095. this.$alert(data.msg, '错误', {
  2096. confirmButtonText: '确定'
  2097. })
  2098. })
  2099. },
  2100. /**
  2101. * 海安开启申请单,状态回写改走海安接口并保持原确认交互 - rqrq
  2102. */
  2103. openNotify (row) {
  2104. this.$confirm('确认打开?', '提示', {
  2105. confirmButtonText: '确定',
  2106. cancelButtonText: '取消',
  2107. type: 'warning'
  2108. }).then(() => {
  2109. const inData = {
  2110. site: this.$store.state.user.site,
  2111. notifyNo: row.notifyNo,
  2112. status: 'ISSUE'
  2113. }
  2114. haiAnUpdateNotifyStatusNew(inData).then(({ data }) => {
  2115. if (data && data.code === 0) {
  2116. this.searchTable()
  2117. this.$message({
  2118. message: '操作成功',
  2119. type: 'success',
  2120. duration: 1500
  2121. })
  2122. return
  2123. }
  2124. this.$alert(data.msg, '错误', {
  2125. confirmButtonText: '确定'
  2126. })
  2127. })
  2128. })
  2129. },
  2130. /**
  2131. * 海安库存预览当前为占位实现,保留入口并给出待开发提示 - rqrq
  2132. */
  2133. previewInventory (row) {
  2134. this.currentRow = row
  2135. this.previewDialogVisible = true
  2136. this.previewLoading = true
  2137. this.previewData = []
  2138. const inData = {
  2139. site: this.$store.state.user.site,
  2140. notifyNo: row.notifyNo
  2141. }
  2142. haiAnCheckIssueNotifyInventory(inData).then(({ data }) => {
  2143. this.previewLoading = false
  2144. if (data && data.code === 0) {
  2145. this.previewData = data.rows || []
  2146. if (data.placeholder) {
  2147. this.$message.warning(data.msg || '海安库存预览待开发')
  2148. }
  2149. return
  2150. }
  2151. this.$alert(data.msg, '错误', {
  2152. confirmButtonText: '确定'
  2153. })
  2154. }).catch(() => {
  2155. this.previewLoading = false
  2156. this.$message.error('获取库存预览失败')
  2157. })
  2158. },
  2159. /**
  2160. * 海安推送WCS当前为占位实现,仅提示待开发并不触发真实推送 - rqrq
  2161. */
  2162. pushToWCS () {
  2163. const validData = this.previewData || []
  2164. this.$confirm(`确认推送 ${validData.length} 条数据至WCS?`, '提示', {
  2165. confirmButtonText: '确定',
  2166. cancelButtonText: '取消',
  2167. type: 'warning'
  2168. }).then(() => {
  2169. this.previewLoading = true
  2170. const inData = {
  2171. site: this.$store.state.user.site,
  2172. notifyNo: this.currentRow.notifyNo,
  2173. inventoryList: validData
  2174. }
  2175. haiAnPushInventoryToWcs(inData).then(({ data }) => {
  2176. this.previewLoading = false
  2177. if (data && data.code === 0) {
  2178. this.$message.warning(data.msg || '海安推送WCS待开发')
  2179. this.previewDialogVisible = false
  2180. return
  2181. }
  2182. this.$alert(data.msg || '推送失败', '错误', {
  2183. confirmButtonText: '确定'
  2184. })
  2185. }).catch((error) => {
  2186. this.previewLoading = false
  2187. this.$message.error(error.message || '推送WCS失败,请重试')
  2188. })
  2189. })
  2190. },
  2191. /**
  2192. * 兼容旧入口的海安推送占位方法,避免历史按钮调用空指针 - rqrq
  2193. */
  2194. pushToWcs (row) {
  2195. this.previewInventory(row)
  2196. },
  2197. /**
  2198. * 海安取消下达流程:先检查未下达冲突,再执行取消并刷新列表 - rqrq
  2199. */
  2200. cancelIssueNotifyHandle (row) {
  2201. const checkData = {
  2202. site: this.$store.state.user.site,
  2203. username: row.username
  2204. }
  2205. haiAnCheckUserHasUnissueShopOrder(checkData).then(({ data }) => {
  2206. if (data && data.code === 0) {
  2207. if (data.row != null) {
  2208. this.$alert('该用户有未下达的申请单,请先处理', '提示', {
  2209. confirmButtonText: '确定'
  2210. })
  2211. return
  2212. }
  2213. this.$confirm(`确定取消下达申请单【${row.notifyNo}】吗?`, '提示', {
  2214. confirmButtonText: '确定',
  2215. cancelButtonText: '取消',
  2216. type: 'warning'
  2217. }).then(() => {
  2218. const cancelData = {
  2219. site: this.$store.state.user.site,
  2220. notifyNo: row.notifyNo
  2221. }
  2222. haiAnCancelIssueNotify(cancelData).then(({ data }) => {
  2223. if (data && data.code === 0) {
  2224. this.$message.success('取消下达成功')
  2225. this.searchTable()
  2226. return
  2227. }
  2228. this.$alert(data.msg, '错误', {
  2229. confirmButtonText: '确定'
  2230. })
  2231. }).catch(() => {
  2232. this.$message.error('取消下达失败')
  2233. })
  2234. })
  2235. return
  2236. }
  2237. this.$alert(data.msg, '错误', {
  2238. confirmButtonText: '确定'
  2239. })
  2240. }).catch(() => {
  2241. this.$message.error('检查用户申请单失败')
  2242. })
  2243. },
  2244. /**
  2245. * 海安删除工单行增强接口,保留未推送状态限制并同步刷新当前页签 - rqrq
  2246. */
  2247. deleteNotifySOSPlus (row) {
  2248. this.$confirm('确认删除?', '提示', {
  2249. confirmButtonText: '确定',
  2250. cancelButtonText: '取消',
  2251. type: 'warning'
  2252. }).then(() => {
  2253. const inData = {
  2254. ...row,
  2255. site: this.$store.state.user.site,
  2256. notifyNo: this.currentRow.notifyNo
  2257. }
  2258. haiAnDeleteNotifySOSPlus(inData).then(({ data }) => {
  2259. if (data && data.code === 0) {
  2260. this.refreshCurrentTabTable()
  2261. this.$message({
  2262. message: '操作成功',
  2263. type: 'success',
  2264. duration: 1500
  2265. })
  2266. return
  2267. }
  2268. this.$alert(data.msg, '错误', {
  2269. confirmButtonText: '确定'
  2270. })
  2271. })
  2272. })
  2273. },
  2274. /**
  2275. * 海安查看页物料弹窗查询,按海安接口回显已保存数量并透传subsite - rqrq
  2276. */
  2277. enterSOS (row) {
  2278. this.materialModalFlag = true
  2279. this.sobomList = []
  2280. this.sobomData = {
  2281. orderNo: row.orderNo,
  2282. seqNo: row.seqNo,
  2283. partNo: row.partNo,
  2284. subSite: row.subSite
  2285. }
  2286. this.bomLoadFlag = true
  2287. const inData = {
  2288. site: this.$store.state.user.site,
  2289. notifyNo: this.currentRow.notifyNo,
  2290. orderNo: row.orderNo,
  2291. releaseNo: row.releaseNo,
  2292. sequenceNo: row.sequenceNo,
  2293. partNo: row.partNo,
  2294. itemNo: row.itemNo
  2295. }
  2296. haiAnGetSOSBOMForIssureNew(inData).then(({ data }) => {
  2297. this.bomLoadFlag = false
  2298. if (data && data.code === 0) {
  2299. this.sobomList = data.rows || []
  2300. for (let i = 0; i < this.sobomList.length; i++) {
  2301. this.sobomList[i].itemNo = inData.itemNo
  2302. this.sobomList[i].subSite = row.subSite
  2303. }
  2304. return
  2305. }
  2306. this.$alert(data.msg, '错误', {
  2307. confirmButtonText: '确定'
  2308. })
  2309. }).catch(() => {
  2310. this.bomLoadFlag = false
  2311. this.$message.error('获取物料明细失败')
  2312. })
  2313. },
  2314. /**
  2315. * 海安保存材料明细走海安先删后存链路,并透传subsite防止跨子站点串单 - rqrq
  2316. */
  2317. saveMaterialDetail () {
  2318. for (let i = 0; i < this.sobomList.length; i++) {
  2319. if (this.sobomList[i].qtyToIssue === '' || this.sobomList[i].qtyToIssue == null) {
  2320. this.sobomList[i].qtyToIssue = 0
  2321. }
  2322. this.sobomList[i].notifyNo = this.currentRow.notifyNo
  2323. this.sobomList[i].site = this.$store.state.user.site
  2324. this.sobomList[i].subSite = this.sobomList[i].subSite || this.sobomData.subSite || this.currentRow.subSite
  2325. }
  2326. const materialList = this.sobomList.filter((item) => item.qtyToIssue > 0)
  2327. if (materialList.length === 0) {
  2328. this.$alert('没有需要保存的内容!', '提示', {
  2329. confirmButtonText: '确定'
  2330. })
  2331. return false
  2332. }
  2333. haiAnSaveMaterialDetail(materialList).then(({ data }) => {
  2334. if (data && data.code === 0) {
  2335. this.materialModalFlag = false
  2336. this.refreshCurrentTabTable()
  2337. this.$message.success('操作成功')
  2338. return
  2339. }
  2340. this.$alert(data.msg, '错误', {
  2341. confirmButtonText: '确定'
  2342. })
  2343. })
  2344. },
  2345. /**
  2346. * 海安编辑材料数量,沿用未推送限制并改为海安更新接口 - rqrq
  2347. */
  2348. saveEditMaterialDetail () {
  2349. if (this.editMaterialData.qtyToIssue === null || this.editMaterialData.qtyToIssue === '') {
  2350. this.$alert('申请数量不能为空!', '提示', {
  2351. confirmButtonText: '确定'
  2352. })
  2353. return false
  2354. }
  2355. if (this.editMaterialData.qtyToIssue < 0) {
  2356. this.$alert('申请数量不能小于0!', '提示', {
  2357. confirmButtonText: '确定'
  2358. })
  2359. return false
  2360. }
  2361. const materialData = {
  2362. ...this.editMaterialData,
  2363. site: this.$store.state.user.site,
  2364. notifyNo: this.currentRow.notifyNo
  2365. }
  2366. if (materialData.qtyToIssue === '' || materialData.qtyToIssue == null) {
  2367. materialData.qtyToIssue = 0
  2368. }
  2369. haiAnUpdateMaterialDetail(materialData).then(({ data }) => {
  2370. if (data && data.code === 0) {
  2371. this.editMaterialModalFlag = false
  2372. this.refreshCurrentTabTable()
  2373. this.$message.success('保存成功')
  2374. return
  2375. }
  2376. this.$alert(data.msg, '错误', {
  2377. confirmButtonText: '确定'
  2378. })
  2379. }).catch(() => {
  2380. this.$message.error('保存失败')
  2381. })
  2382. },
  2383. /**
  2384. * 海安导出数据改为海安主查询接口,确保导出内容来自海安表链路 - rqrq
  2385. */
  2386. async createExportData () {
  2387. const queryParams = {
  2388. ...this.searchData,
  2389. site: this.$store.state.user.site,
  2390. orderType: 'shoporder',
  2391. limit: 999999,
  2392. page: 1
  2393. }
  2394. const { data } = await haiAnSearchNotifyHeaderNew(queryParams)
  2395. if (data && data.code === 0) {
  2396. return data.page.list || []
  2397. }
  2398. return []
  2399. },
  2400. /**
  2401. * 委外发料查看页参数:固定orderType=poorder,保证主子表查询口径一致 - rqrq
  2402. */
  2403. haiAnBuildQueryData (row) {
  2404. const baseRow = row || {}
  2405. return {
  2406. ...baseRow,
  2407. site: this.$store.state.user.site,
  2408. orderType: 'poorder'
  2409. }
  2410. },
  2411. /**
  2412. * 委外发料主列表查询:仅查询poorder类型海安申请单 - rqrq
  2413. */
  2414. searchTable () {
  2415. this.searchData.limit = this.pageSize
  2416. this.searchData.page = this.pageIndex
  2417. this.searchData.site = this.$store.state.user.site
  2418. this.searchData.orderType = 'poorder'
  2419. haiAnSearchNotifyHeaderNew(this.searchData).then(({ data }) => {
  2420. if (data && data.code === 0) {
  2421. this.dataList = data.page.list
  2422. this.pageIndex = data.page.currPage
  2423. this.pageSize = data.page.pageSize
  2424. this.totalPage = data.page.totalCount
  2425. return
  2426. }
  2427. this.dataList = []
  2428. })
  2429. },
  2430. /**
  2431. * 委外发料物料弹窗:调用海安poorder专用IFS聚合接口并透传subsite - rqrq
  2432. */
  2433. enterSOS (row) {
  2434. this.materialModalFlag = true
  2435. this.sobomList = []
  2436. this.sobomData = {
  2437. orderNo: row.orderNo || row.soorderNo,
  2438. seqNo: row.sequenceNo || row.seqNo,
  2439. partNo: row.partNo || row.fgpartNo,
  2440. subSite: row.subSite
  2441. }
  2442. this.bomLoadFlag = true
  2443. const inData = {
  2444. site: this.$store.state.user.site,
  2445. notifyNo: this.currentRow.notifyNo,
  2446. orderNo: row.orderNo || row.soorderNo,
  2447. releaseNo: row.releaseNo,
  2448. sequenceNo: row.sequenceNo || row.seqNo,
  2449. itemNo: row.itemNo
  2450. }
  2451. haiAnGetPoOrderMaterialForIssure(inData).then(({ data }) => {
  2452. this.bomLoadFlag = false
  2453. if (data && data.code === 0) {
  2454. this.sobomList = data.rows || []
  2455. for (let i = 0; i < this.sobomList.length; i++) {
  2456. this.sobomList[i].itemNo = inData.itemNo
  2457. this.sobomList[i].subSite = this.sobomList[i].subSite || row.subSite
  2458. }
  2459. return
  2460. }
  2461. this.$alert(data.msg, '错误', {
  2462. confirmButtonText: '确定'
  2463. })
  2464. }).catch(() => {
  2465. this.bomLoadFlag = false
  2466. this.$message.error('获取委外发料明细失败')
  2467. })
  2468. },
  2469. /**
  2470. * 委外发料取消下达:按poorder口径检查未下达单据后再执行取消 - rqrq
  2471. */
  2472. cancelIssueNotifyHandle (row) {
  2473. const checkData = {
  2474. site: this.$store.state.user.site,
  2475. username: row.username,
  2476. orderType: 'poorder'
  2477. }
  2478. haiAnCheckUserHasUnissueShopOrder(checkData).then(({ data }) => {
  2479. if (data && data.code === 0) {
  2480. if (data.row != null) {
  2481. this.$alert('该用户有未下达的申请单,请先处理', '提示', {
  2482. confirmButtonText: '确定'
  2483. })
  2484. return
  2485. }
  2486. this.$confirm(`确定取消下达申请单【${row.notifyNo}】吗?`, '提示', {
  2487. confirmButtonText: '确定',
  2488. cancelButtonText: '取消',
  2489. type: 'warning'
  2490. }).then(() => {
  2491. const cancelData = {
  2492. site: this.$store.state.user.site,
  2493. notifyNo: row.notifyNo
  2494. }
  2495. haiAnCancelIssueNotify(cancelData).then(({ data }) => {
  2496. if (data && data.code === 0) {
  2497. this.$message.success('取消下达成功')
  2498. this.searchTable()
  2499. return
  2500. }
  2501. this.$alert(data.msg, '错误', {
  2502. confirmButtonText: '确定'
  2503. })
  2504. }).catch(() => {
  2505. this.$message.error('取消下达失败')
  2506. })
  2507. })
  2508. return
  2509. }
  2510. this.$alert(data.msg, '错误', {
  2511. confirmButtonText: '确定'
  2512. })
  2513. }).catch(() => {
  2514. this.$message.error('检查用户申请单失败')
  2515. })
  2516. },
  2517. /**
  2518. * 委外发料导出:固定按poorder维度导出海安主单数据 - rqrq
  2519. */
  2520. async createExportData () {
  2521. const queryParams = {
  2522. ...this.searchData,
  2523. site: this.$store.state.user.site,
  2524. orderType: 'poorder',
  2525. limit: 999999,
  2526. page: 1
  2527. }
  2528. const { data } = await haiAnSearchNotifyHeaderNew(queryParams)
  2529. if (data && data.code === 0) {
  2530. return data.page.list || []
  2531. }
  2532. return []
  2533. },
  2534. /**
  2535. * 委外发料WCS预览:按海安复刻约束保持关闭,避免触发真实推送链路 - rqrq
  2536. */
  2537. previewInventory () {
  2538. this.$message.warning('海安委外发料WCS推送功能暂不启用')
  2539. },
  2540. /**
  2541. * 委外发料WCS推送:按复刻要求注掉推送,仅保留提示 - rqrq
  2542. */
  2543. pushToWCS () {
  2544. this.$message.warning('海安委外发料WCS推送功能暂不启用')
  2545. },
  2546. /**
  2547. * 兼容旧按钮入口:统一提示关闭,不触发后端推送接口 - rqrq
  2548. */
  2549. pushToWcs () {
  2550. this.$message.warning('海安委外发料WCS推送功能暂不启用')
  2551. }
  2552. },
  2553. }
  2554. </script>
  2555. <style scoped>
  2556. /deep/ .el-form-item--medium .el-form-item__content {
  2557. height: auto;
  2558. }
  2559. .disabled {
  2560. cursor: not-allowed !important;
  2561. color: #C0C4CC !important;
  2562. pointer-events: none;
  2563. }
  2564. .text-right >>> .el-input__inner {
  2565. text-align: right !important;
  2566. }
  2567. .text-right >>> .el-input-number__input {
  2568. text-align: right !important;
  2569. }
  2570. .yzzTable /deep/.el-table .cell {
  2571. line-height: 20px;
  2572. font-size: 12px;
  2573. height: 20px;
  2574. }
  2575. .single-line-multi-select >>> .el-select__tags {
  2576. display: flex;
  2577. flex-wrap: nowrap;
  2578. overflow: hidden;
  2579. white-space: nowrap;
  2580. max-width: 100%;
  2581. }
  2582. .single-line-multi-select >>> .el-tag {
  2583. flex-shrink: 0;
  2584. max-width: 100px;
  2585. overflow: hidden;
  2586. text-overflow: ellipsis;
  2587. white-space: nowrap;
  2588. }
  2589. .single-line-multi-select >>> .el-select__input {
  2590. flex-shrink: 0;
  2591. min-width: 30px;
  2592. }
  2593. /* 库存预览表格行颜色 */
  2594. /deep/ .el-table .success-row {
  2595. background: #f0f9ff !important;
  2596. border-left: 3px solid #67C23A;
  2597. }
  2598. /* rqrq - 匹配条码列自动换行显示 */
  2599. /deep/ .wrap-text-column .cell {
  2600. white-space: normal !important;
  2601. word-break: break-all !important;
  2602. line-height: 1.5 !important;
  2603. }
  2604. /deep/ .el-table .warning-row {
  2605. background: #fdf6ec !important;
  2606. border-left: 3px solid #E6A23C;
  2607. }
  2608. /deep/ .el-table .danger-row {
  2609. background: #fef0f0 !important;
  2610. border-left: 3px solid #F56C6C;
  2611. }
  2612. /deep/ .el-table .success-row:hover > td {
  2613. background-color: #ecf5ff !important;
  2614. }
  2615. /deep/ .el-table .warning-row:hover > td {
  2616. background-color: #faecd8 !important;
  2617. }
  2618. /deep/ .el-table .danger-row:hover > td {
  2619. background-color: #fde2e2 !important;
  2620. }
  2621. </style>