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.

2182 lines
71 KiB

5 months ago
4 months ago
5 months ago
4 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
4 months ago
5 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
4 months ago
4 months ago
5 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
4 months ago
4 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <div>
  3. <el-form label-position="top" style="margin-top: -0px">
  4. <el-row :gutter="20">
  5. <el-col :span="20">
  6. <el-button v-if="notifyNo===''" @click="addNotify()" type="primary" class="yzzButtonAn">新建申请单</el-button>
  7. <el-button v-if="notifyNo!=''" type="primary" @click="chooseSOSModal()" class="yzzButtonAn">选择工单</el-button>
  8. <el-button v-if="notifyNo!=''" type="primary" @click="xiadaNotifyModel()"
  9. class="yzzButtonAn">下达申请单</el-button>
  10. <el-button v-if="notifyNo!=''" type="primary" @click="deleteNotify()" class="yzzButtonAn">删除申请单</el-button>
  11. <!-- <el-button v-if="notifyNo!=''" type="primary" @click="noBomModel()" class="yzzButtonAn">非BOM物料</el-button>
  12. <el-button v-if="notifyNo!=''" type="primary" @click="noControlModel()" class="yzzButtonAn">不管控物料</el-button> -->
  13. <!-- <el-button @click="importModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导入'}}</el-button> -->
  14. </el-col>
  15. </el-row>
  16. <el-row :gutter="10" v-if="notifyNo!=''">
  17. <el-col :span="3">
  18. <el-form-item :label="'工厂编码'">
  19. <el-input v-model="notifyData.site" disabled></el-input>
  20. </el-form-item>
  21. </el-col>
  22. <el-col :span="3">
  23. <el-form-item :label="'申请单号'">
  24. <el-input v-model="notifyData.notifyNo" disabled style="width: 100%;"></el-input>
  25. </el-form-item>
  26. </el-col>
  27. <el-col :span="3">
  28. <el-form-item :label="'申请账号'">
  29. <el-input v-model="notifyData.username" disabled></el-input>
  30. </el-form-item>
  31. </el-col>
  32. <el-col :span="3">
  33. <el-form-item :label="'申请日期'">
  34. <el-input v-model="notifyData.notifyDate" disabled></el-input>
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="3">
  38. <el-form-item :label="'状态'">
  39. <el-select v-model="notifyData.status" style="width: 100%" disabled>
  40. <el-option label="全部" value=""></el-option>
  41. <el-option v-for="item in notifyStatusList" :key="item.listValue" :label="item.listDesc"
  42. :value="item.listValue"></el-option>
  43. </el-select>
  44. </el-form-item>
  45. </el-col>
  46. </el-row>
  47. <!-- <el-row :gutter="10" v-if="notifyNo!=''">
  48. <el-col :span="12">
  49. <el-form-item :label="'备注'">
  50. <el-input v-model="notifyData.remark" style="width: 100%;"></el-input>
  51. </el-form-item>
  52. </el-col>
  53. </el-row> -->
  54. </el-form>
  55. <el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card"
  56. v-if="notifyNo!=''">
  57. <el-tab-pane label="已申请工单" name="sos">
  58. <el-table :height="height" :data="dataList" border style="width: 100%;">
  59. <el-table-column v-for="(item,index) in columnList" :key="index" :sortable="item.columnSortable"
  60. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  61. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  62. :label="item.columnLabel">
  63. <template slot-scope="scope">
  64. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  65. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  66. style="width: 100px; height: 80px" /></span>
  67. </template>
  68. </el-table-column>
  69. <el-table-column fixed="right" header-align="center" align="center" width="100" label="操作">
  70. <template slot-scope="scope">
  71. <a type="text" size="small" @click="enterSOSDetail(scope.row)">物料</a>
  72. <a type="text" size="small" @click="deleteNotifySOS(scope.row)">删除</a>
  73. </template>
  74. </el-table-column>
  75. </el-table>
  76. </el-tab-pane>
  77. <!-- <el-tab-pane label="非BOM物料" name="noBom">
  78. <el-table :data="dataList2" :height="height" border style="width: 100%; ">
  79. <el-table-column v-for="(item,index) in columnList4" :key="index" :sortable="item.columnSortable"
  80. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  81. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  82. :label="item.columnLabel">
  83. <template slot-scope="scope">
  84. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  85. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  86. style="width: 100px; height: 80px" /></span>
  87. </template>
  88. </el-table-column>
  89. <el-table-column header-align="center" align="center" width="80" label="操作">
  90. <template slot-scope="scope">
  91. <a type="text" size="small" @click="deleteNotifyMaterial(scope.row)">删除</a>
  92. </template>
  93. </el-table-column>
  94. </el-table>
  95. </el-tab-pane>
  96. <el-tab-pane label="不管控物料" name="noControl">
  97. <el-table :data="dataList3" :height="height" border style="width: 100%; ">
  98. <el-table-column v-for="(item,index) in columnList4" :key="index" :sortable="item.columnSortable"
  99. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  100. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  101. :label="item.columnLabel">
  102. <template slot-scope="scope">
  103. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  104. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  105. style="width: 100px; height: 80px" /></span>
  106. </template>
  107. </el-table-column>
  108. <el-table-column header-align="center" align="center" width="80" label="操作">
  109. <template slot-scope="scope">
  110. <a type="text" size="small" @click="deleteNotifyMaterial(scope.row)">删除</a>
  111. </template>
  112. </el-table-column>
  113. </el-table>
  114. </el-tab-pane> -->
  115. </el-tabs>
  116. <el-dialog title="选择工单" :close-on-click-modal="false" v-drag :visible.sync="seqNoModalFlag" width="1000px">
  117. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  118. <el-row :gutter="20">
  119. <el-col :span="4">
  120. <el-form-item :label="'生产订单号'">
  121. <el-input v-model="seqNoData.orderNo"></el-input>
  122. </el-form-item>
  123. </el-col>
  124. <!-- <el-col :span="4">
  125. <el-form-item>
  126. <span slot="label" style="" @click="getBaseList(216)"><a herf="#">加工中心</a></span>
  127. <el-input v-model="seqNoData.sWorkcenterno"></el-input>
  128. </el-form-item>
  129. </el-col> -->
  130. <el-col :span="4">
  131. <el-form-item :label="'日期'">
  132. <el-date-picker style="width: 100%" v-model="seqNoData.startDate" type="date" value-format="yyyy-MM-dd"
  133. placeholder="选择日期">
  134. </el-date-picker>
  135. </el-form-item>
  136. </el-col>
  137. <el-col :span="4">
  138. <el-form-item :label="'到'">
  139. <el-date-picker style="width: 100%" v-model="seqNoData.endDate" type="date" value-format="yyyy-MM-dd"
  140. placeholder="选择日期">
  141. </el-date-picker>
  142. </el-form-item>
  143. </el-col>
  144. </el-row>
  145. <el-row :gutter="20">
  146. <el-col :span="6">
  147. <el-form-item>
  148. <el-button type="primary" @click="searchSOSRouting()" style="margin-top: 5px" class="">查询</el-button>
  149. </el-form-item>
  150. </el-col>
  151. </el-row>
  152. </el-form>
  153. <el-table :height="400" :data="seqNoList" border style="width: 100%;" class="choose-sos-table">
  154. <el-table-column v-for="(item,index) in columnList2" :key="index" :sortable="item.columnSortable"
  155. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  156. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  157. :label="item.columnLabel">
  158. <template slot-scope="scope">
  159. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  160. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  161. style="width: 100px; height: 80px" /></span>
  162. </template>
  163. </el-table-column>
  164. <el-table-column fixed="left" header-align="center" align="center" width="80" label="操作">
  165. <template slot-scope="scope">
  166. <el-button type="primary" size="mini" plain class="choose-sos-btn" :loading="chooseLoading" @click="chooseSOS(scope.row)">选择</el-button>
  167. </template>
  168. </el-table-column>
  169. </el-table>
  170. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  171. <el-button type="primary" @click="seqNoModalFlag = false">关闭</el-button>
  172. </el-footer>
  173. </el-dialog>
  174. <el-dialog title="保存工单" :close-on-click-modal="false" v-drag :visible.sync="saveSeqNoModalFlag" width="750px">
  175. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  176. <el-row :gutter="20">
  177. <el-col :span="6">
  178. <el-form-item :label="'生产订单号'">
  179. <el-input v-model="notifyOrderData.orderNo" disabled></el-input>
  180. </el-form-item>
  181. </el-col>
  182. <el-col :span="6">
  183. <el-form-item :label="'工单数量'">
  184. <el-input v-model="notifyOrderData.qtyRequired" disabled></el-input>
  185. </el-form-item>
  186. </el-col>
  187. </el-row>
  188. <el-row :gutter="20">
  189. <el-col :span="6">
  190. <el-form-item :label="'物料'">
  191. <el-input v-model="notifyOrderData.partNo" disabled></el-input>
  192. </el-form-item>
  193. </el-col>
  194. <el-col :span="12">
  195. <el-form-item :label="'物料名称'">
  196. <el-input v-model="notifyOrderData.partDesc" disabled style="width: 204%" ></el-input>
  197. </el-form-item>
  198. </el-col>
  199. </el-row>
  200. <el-row :gutter="20">
  201. <el-col :span="6">
  202. <el-form-item :label="'退料时间'">
  203. <el-date-picker style="width: 100%" v-model="notifyOrderData.needDate" type="datetime"
  204. value-format="yyyy-MM-dd HH:mm" placeholder="选择日期">
  205. </el-date-picker>
  206. </el-form-item>
  207. </el-col>
  208. <el-col :span="6">
  209. <el-form-item :label="'此次退料数量'">
  210. <el-input v-model="notifyOrderData.unissureQty" @input=" value=>notifyOrderData.unissureQty = value.match(/0$|^[1-9]\d*/) ? value.match(/0$|^[1-9]\d*/)[0] : ''"></el-input>
  211. </el-form-item>
  212. </el-col>
  213. <!-- <el-col :span="6">
  214. <el-form-item :label="' '">
  215. <el-button type="primary" @click="qtyAllForSeqNo()">全数退料</el-button>
  216. </el-form-item>
  217. </el-col> -->
  218. </el-row>
  219. </el-form>
  220. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  221. <el-button type="primary" @click="saveSOS()">保存</el-button>
  222. <el-button type="primary" @click="saveSeqNoModalFlag=false">关闭</el-button>
  223. </el-footer>
  224. </el-dialog>
  225. <el-dialog title="变更BU" :close-on-click-modal="false" v-drag :visible.sync="changeBuFlag" width="350px">
  226. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  227. <el-row :gutter="20">
  228. <el-col :span="12">
  229. <el-form-item :label="'工厂编码'">
  230. <el-input v-model="notifyData.site" disabled></el-input>
  231. </el-form-item>
  232. </el-col>
  233. <el-col :span="12">
  234. <el-form-item :label="'申请单号'">
  235. <el-input v-model="notifyData.notifyNo" disabled></el-input>
  236. </el-form-item>
  237. </el-col>
  238. <el-col :span="12">
  239. <el-form-item :label="'BU'">
  240. <el-select v-model="newBu" placeholder="请选择" style="width: 100%">
  241. <el-option v-for="i in buList" :key="i.buNo" :label="i.buNo+' - '+i.buDesc" :value="i.buNo">
  242. </el-option>
  243. </el-select>
  244. </el-form-item>
  245. </el-col>
  246. </el-row>
  247. </el-form>
  248. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  249. <el-button type="primary" @click="saveNewBu()">保存</el-button>
  250. <el-button type="primary" @click="changeBuFlag=false">关闭</el-button>
  251. </el-footer>
  252. </el-dialog>
  253. <el-dialog title="申请明细" :close-on-click-modal="false" v-drag :visible.sync="materialModalFlag" width="900px">
  254. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  255. <el-row :gutter="20">
  256. <el-col :span="6">
  257. <el-form-item :label="'生产订单号'">
  258. <el-input v-model="sobomData.orderNo" disabled></el-input>
  259. </el-form-item>
  260. </el-col>
  261. <el-col :span="6">
  262. <el-form-item :label="'产品编码'">
  263. <el-input v-model="sobomData.partNo" disabled></el-input>
  264. </el-form-item>
  265. </el-col>
  266. </el-row>
  267. </el-form>
  268. <div class="yzzTable">
  269. <el-table :height="400" :data="sobomList" border v-loading="bomLoadFlag" style="width: 100%;">
  270. <el-table-column v-for="(item,index) in columnList3" :key="index" :sortable="item.columnSortable"
  271. :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
  272. :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
  273. :label="item.columnLabel">
  274. <template slot-scope="scope">
  275. <div v-if="item.columnProp === 'qtyToUnissue'">
  276. <el-input v-model="scope.row.qtyToUnissue" style="height: 11px; width: 98%;" :step="0" :min="0"></el-input>
  277. </div>
  278. <div v-else-if="item.columnProp === 'remark'">
  279. <el-input v-model="scope.row.remark" style="padding: 0;width: 100%"></el-input>
  280. </div>
  281. <div v-else>
  282. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  283. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  284. style="width: 100px; height: 80px" /></span>
  285. </div>
  286. </template>
  287. </el-table-column>
  288. <!-- <el-table-column prop="" header-align="center" align="center" min-width="50" label="操作">
  289. <template slot-scope="scope">
  290. <el-button type="primary" @click="qtyAllForBom(scope.row)" style="width: 100%">全数领料</el-button>
  291. </template>
  292. </el-table-column> -->
  293. </el-table>
  294. </div>
  295. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  296. <el-button type="primary" @click="saveMaterialDetail()">保存</el-button>
  297. <el-button type="primary" @click="materialModalFlag=false">关闭</el-button>
  298. </el-footer>
  299. </el-dialog>
  300. <el-dialog width="600px" title="选择非BOM物料" :close-on-click-modal="false" :visible.sync="partModelFlag">
  301. <el-form :inline="true" label-position="top" label-width="100px">
  302. <el-row :gutter="20">
  303. <el-col :span="6">
  304. <el-form-item style="margin-left: 0px" label="物料编码">
  305. <el-input v-model="partSearch.partNo"></el-input>
  306. </el-form-item>
  307. </el-col>
  308. <el-col :span="6">
  309. <el-form-item style="margin-left: 0px" label="物料名称">
  310. <el-input v-model="partSearch.partDesc"></el-input>
  311. </el-form-item>
  312. </el-col>
  313. <el-col :span="6">
  314. <el-form-item style="margin-left: 0px" label="规格型号">
  315. <el-input v-model="partSearch.spec"></el-input>
  316. </el-form-item>
  317. </el-col>
  318. <el-col :span="6">
  319. <el-form-item label=" ">
  320. <el-button type="primary" @click="searchPartModel()">{{'查询'}}</el-button>
  321. </el-form-item>
  322. </el-col>
  323. </el-row>
  324. </el-form>
  325. <el-table height="450" :data="partList" border @row-dblclick="chooseNoBomPartNo" style="width: 100%;">
  326. <el-table-column prop="partNo" header-align="center" align="left" min-width="80" style="font-size: 20px"
  327. label="物料编码">
  328. </el-table-column>
  329. <el-table-column prop="partDesc" header-align="center" align="left" min-width="120" style="font-size: 20px"
  330. label="物料描述">
  331. </el-table-column>
  332. <el-table-column prop="spec" header-align="center" align="left" min-width="120" style="font-size: 20px"
  333. label="规格型号">
  334. </el-table-column>
  335. <el-table-column prop="sku" header-align="center" align="left" min-width="80" label="SKU">
  336. </el-table-column>
  337. <el-table-column prop="umid" header-align="center" align="left" min-width="60" label="计量单位">
  338. </el-table-column>
  339. </el-table>
  340. </el-dialog>
  341. <el-dialog width="600px" title="选择不管控物料" :close-on-click-modal="false" :visible.sync="noControlPartModelFlag">
  342. <el-form :inline="true" label-position="top" label-width="100px">
  343. <el-row :gutter="20">
  344. <el-col :span="6">
  345. <el-form-item style="margin-left: 0px" label="物料编码">
  346. <el-input v-model="partSearch.partNo"></el-input>
  347. </el-form-item>
  348. </el-col>
  349. <el-col :span="6">
  350. <el-form-item style="margin-left: 0px" label="物料名称">
  351. <el-input v-model="partSearch.partDesc"></el-input>
  352. </el-form-item>
  353. </el-col>
  354. <el-col :span="6">
  355. <el-form-item style="margin-left: 0px" label="规格型号">
  356. <el-input v-model="partSearch.spec"></el-input>
  357. </el-form-item>
  358. </el-col>
  359. <el-col :span="6">
  360. <el-form-item label=" ">
  361. <el-button type="primary" @click="searchNoControlPartModel()">{{'查询'}}</el-button>
  362. </el-form-item>
  363. </el-col>
  364. </el-row>
  365. </el-form>
  366. <el-table height="450" :data="partList2" border @row-dblclick="chooseNoControlPartNo" style="width: 100%;">
  367. <el-table-column prop="partNo" header-align="center" align="left" min-width="80" style="font-size: 20px"
  368. label="物料编码">
  369. </el-table-column>
  370. <el-table-column prop="partDesc" header-align="center" align="left" min-width="120" style="font-size: 20px"
  371. label="物料描述">
  372. </el-table-column>
  373. <el-table-column prop="spec" header-align="center" align="left" min-width="120" style="font-size: 20px"
  374. label="规格型号">
  375. </el-table-column>
  376. <el-table-column prop="sku" header-align="center" align="left" min-width="80" label="SKU">
  377. </el-table-column>
  378. <el-table-column prop="umid" header-align="center" align="left" min-width="60" label="计量单位">
  379. </el-table-column>
  380. </el-table>
  381. </el-dialog>
  382. <el-dialog width="500px" title="物料库存 VS 需求数量" :close-on-click-modal="false" :visible.sync="xiadaModelFlag">
  383. <div class="board666">
  384. <el-table height="300" :data="xiadaList" border :row-class-name="tableRowClassName" style="width: 100%;">
  385. <el-table-column prop="componentPartNo" header-align="center" align="left" min-width="80"
  386. style="font-size: 20px" label="物料编码">
  387. </el-table-column>
  388. <el-table-column prop="partDesc" header-align="center" align="left" min-width="120" style="font-size: 20px"
  389. label="物料描述">
  390. </el-table-column>
  391. <el-table-column prop="qtyToIssue" header-align="center" align="right" min-width="80" style="font-size: 20px"
  392. label="发料数量">
  393. </el-table-column>
  394. <el-table-column prop="qtyOnHand" header-align="center" align="right" min-width="80" label="库存数量">
  395. </el-table-column>
  396. <el-table-column prop="qtyAvailable" header-align="center" align="right" min-width="80" label="可用数量">
  397. </el-table-column>
  398. </el-table>
  399. </div>
  400. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  401. <el-button type="primary" @click="xiadaNotify()">确定下达</el-button>
  402. <el-button type="primary" @click="xiadaModelFlag=false">取消</el-button>
  403. </el-footer>
  404. </el-dialog>
  405. <el-dialog title="保存物料" :close-on-click-modal="false" v-drag :visible.sync="saveOtherPartModalFlag" width="600px">
  406. <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
  407. <el-row :gutter="20">
  408. <el-col :span="6">
  409. <el-form-item :label="'物料编码'">
  410. <el-input v-model="otherPartData.componentPartNo" disabled></el-input>
  411. </el-form-item>
  412. </el-col>
  413. <el-col :span="18">
  414. <el-form-item :label="'物料描述'">
  415. <el-input v-model="otherPartData.partDesc" disabled></el-input>
  416. </el-form-item>
  417. </el-col>
  418. </el-row>
  419. <el-row :gutter="20">
  420. <el-col :span="6">
  421. <el-form-item :label="'计量单位'">
  422. <el-input v-model="otherPartData.umid" disabled></el-input>
  423. </el-form-item>
  424. </el-col>
  425. <el-col :span="6">
  426. <el-form-item :label="'需求数量'">
  427. <el-input-number v-model="otherPartData.qtyToIssue" style="padding: 0;width: 100%" :step="0" :min="0"
  428. :controls="false"></el-input-number>
  429. </el-form-item>
  430. </el-col>
  431. </el-row>
  432. <el-row :gutter="20">
  433. <el-col :span="24">
  434. <el-form-item :label="'备注'">
  435. <el-input v-model="otherPartData.remark"></el-input>
  436. </el-form-item>
  437. </el-col>
  438. </el-row>
  439. </el-form>
  440. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  441. <el-button type="primary" @click="saveOtherPart()">保存</el-button>
  442. <el-button type="primary" @click="saveOtherPartModalFlag=false">关闭</el-button>
  443. </el-footer>
  444. </el-dialog>
  445. <el-dialog title="选择申请类型" :close-on-click-modal="false" v-drag :visible.sync="showAddNotifyTypeDialog"
  446. width="400px">
  447. <el-form :inline="true" label-position="top" label-width="500px" style="margin-left: 7px;margin-top: -5px;">
  448. <el-row :gutter="20">
  449. <el-col :span="24">
  450. <el-form-item label="申请类型">
  451. <el-radio-group v-model="selectedNotifyType">
  452. <el-radio label="production">生产领料单</el-radio>
  453. <el-radio label="outsourced">委外领料单</el-radio>
  454. </el-radio-group>
  455. </el-form-item>
  456. </el-col>
  457. <el-col :span="24">
  458. <el-form-item label="备注" class="issueNotify">
  459. <el-input type="textarea" v-model="selectedNotifyRemark" :rows="3" placeholder="请输入内容" style="width: 100%"></el-input>
  460. </el-form-item>
  461. </el-col>
  462. </el-row>
  463. </el-form>
  464. <el-footer style="height:30px;text-align:center;">
  465. <el-button type="primary" @click="confirmAddNotify()">确认</el-button>
  466. <el-button type="primary" @click="showAddNotifyTypeDialog=false">取消</el-button>
  467. </el-footer>
  468. </el-dialog>
  469. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  470. </div>
  471. </template>
  472. <script>
  473. import {
  474. getSOScheduledRoutingListForUnissure,
  475. createNotify,
  476. getUserNotifyNo,
  477. deleteUnissueNotifyHeader,
  478. getAllNotifyStatus,
  479. getNotifyNoDetail,
  480. saveUnissueNotifyOrderList,
  481. getSOSBOMForIssure,
  482. saveUnissueMaterialDetail,
  483. deleteNotifyUnissue,
  484. getIFSShopOrderByOrderNo,
  485. searchUnissueNotifyMaterialList,
  486. updateNotifyStatus,
  487. } from '@/api/orderIssure/productionInboundRequest.js'
  488. import Chooselist from '@/views/modules/common/Chooselist_eam'
  489. export default {
  490. name: 'newSoIssueNotify',
  491. components: {
  492. Chooselist,
  493. },
  494. watch: {
  495. // notifyOrderData: {
  496. // deep: true,
  497. // handler: function (newV, oldV) {
  498. // this.notifyOrderData.locationNo = this.notifyOrderData.locationNo.toUpperCase()
  499. // }
  500. // },
  501. },
  502. data() {
  503. return {
  504. activeName: 'sos',
  505. noControlPartModelFlag: false,
  506. buList: [],
  507. partList: [],
  508. partList2: [],
  509. notifyStatusList: [],
  510. notifyNo: '',
  511. notifyData: {
  512. site: '',
  513. bu: '',
  514. notifyNo: '',
  515. notifyDate: '',
  516. enteredDate: '',
  517. userName: '',
  518. userDisplay: '',
  519. remark: '',
  520. planIssueDate: '',
  521. },
  522. dataList2: [],
  523. dataList3: [],
  524. // 是否收藏
  525. favorite: false,
  526. changeBuFlag: false,
  527. partModelFlag: false,
  528. newBu: '',
  529. // 导出 start
  530. exportData: [],
  531. exportName: '设备分组' + this.dayjs().format('YYYYMMDDHHmmss'),
  532. exportHeader: ['设备分组'],
  533. exportFooter: [],
  534. exportList: [],
  535. // 导出 end
  536. searchData: {
  537. site: this.$store.state.user.site,
  538. userName: this.$store.state.user.name,
  539. groupID: '',
  540. groupDesc: '',
  541. buDesc: '',
  542. active: 'Y',
  543. page: 1,
  544. limit: 10,
  545. },
  546. sobomData: {
  547. orderno: '',
  548. seqno: '',
  549. partNo: '',
  550. },
  551. //申请单序号
  552. itemNo: '',
  553. notifyOrderData: {
  554. partNo: '',
  555. orderNo: '',
  556. itemNo: '',
  557. seqNo: '',
  558. partDesc: '',
  559. qtyrequired: '',
  560. sResourceID: '',
  561. unissureQty: '',
  562. locationNo: '',
  563. needDate: '',
  564. },
  565. seqNoData: {
  566. site: this.$store.state.user.site,
  567. seqno: '',
  568. sResourceID: '',
  569. sWorkcenterno: '',
  570. operatorId: '',
  571. sShiftno: '',
  572. startDate: '',
  573. endDate: '',
  574. },
  575. seqNoList: [],
  576. height: 200,
  577. pageIndex: 1,
  578. pageSize: 20,
  579. totalPage: 0,
  580. dataList: [],
  581. sobomList: [],
  582. dataListSelections: [],
  583. seqNoModalFlag: false,
  584. materialModalFlag: false,
  585. modalDisableFlag: false,
  586. saveSeqNoModalFlag: false,
  587. bomLoadFlag: false,
  588. xiadaList: [],
  589. columnList4: [
  590. {
  591. userId: this.$store.state.user.name,
  592. functionId: 701001,
  593. serialNumber: '701001Table4ComponentPartNo',
  594. tableId: '701001Table4',
  595. tableName: '非BOM材料明细',
  596. columnProp: 'componentPartNo',
  597. headerAlign: 'center',
  598. align: 'center',
  599. columnLabel: '材料编码',
  600. columnHidden: false,
  601. columnImage: false,
  602. columnSortable: false,
  603. sortLv: 0,
  604. status: true,
  605. fixed: '',
  606. columnWidth: 100,
  607. },
  608. {
  609. userId: this.$store.state.user.name,
  610. functionId: 701001,
  611. serialNumber: '701001Table4PartDesc',
  612. tableId: '701001Table4',
  613. tableName: '非BOM材料明细',
  614. columnProp: 'partDesc',
  615. headerAlign: 'center',
  616. align: 'left',
  617. columnLabel: '材料名称',
  618. columnHidden: false,
  619. columnImage: false,
  620. columnSortable: false,
  621. sortLv: 0,
  622. status: true,
  623. fixed: '',
  624. columnWidth: 130,
  625. },
  626. {
  627. userId: this.$store.state.user.name,
  628. functionId: 701001,
  629. serialNumber: '701001Table4QtyToIssue',
  630. tableId: '701001Table4',
  631. tableName: '非BOM材料明细',
  632. columnProp: 'qtyToIssue',
  633. headerAlign: 'center',
  634. align: 'right',
  635. columnLabel: '申请数量',
  636. columnHidden: false,
  637. columnImage: false,
  638. columnSortable: false,
  639. sortLv: 0,
  640. status: true,
  641. fixed: '',
  642. columnWidth: 80,
  643. },
  644. {
  645. userId: this.$store.state.user.name,
  646. functionId: 701001,
  647. serialNumber: '701001Table4Remark',
  648. tableId: '701001Table4',
  649. tableName: '非BOM材料明细',
  650. columnProp: 'remark',
  651. headerAlign: 'center',
  652. align: 'left',
  653. columnLabel: '备注',
  654. columnHidden: false,
  655. columnImage: false,
  656. columnSortable: false,
  657. sortLv: 0,
  658. status: true,
  659. fixed: '',
  660. columnWidth: 200,
  661. },
  662. ],
  663. modalData: {
  664. flag: '',
  665. bu: '',
  666. site: this.$store.state.user.site,
  667. groupID: '',
  668. groupDesc: '',
  669. active: '',
  670. createBy: this.$store.state.user.name,
  671. updateBy: this.$store.state.user.name,
  672. },
  673. // 展示列集
  674. columnList: [
  675. {
  676. userId: this.$store.state.user.name,
  677. functionId: 701001,
  678. serialNumber: '701001Table1ItemNo',
  679. tableId: '701001Table1',
  680. tableName: '领料申请工单子表',
  681. columnProp: 'itemNo',
  682. headerAlign: 'center',
  683. align: 'right',
  684. columnLabel: '序号',
  685. columnHidden: false,
  686. columnImage: false,
  687. columnSortable: false,
  688. sortLv: 0,
  689. status: true,
  690. fixed: '',
  691. columnWidth: 50,
  692. },
  693. {
  694. userId: this.$store.state.user.name,
  695. functionId: 701001,
  696. serialNumber: '701001Table1SOOrderNo',
  697. tableId: '701001Table1',
  698. tableName: '领料申请工单子表',
  699. columnProp: 'soorderNo',
  700. headerAlign: 'center',
  701. align: 'center',
  702. columnLabel: '生产订单号',
  703. columnHidden: false,
  704. columnImage: false,
  705. columnSortable: false,
  706. sortLv: 0,
  707. status: true,
  708. fixed: '',
  709. columnWidth: 120,
  710. },
  711. /* {
  712. userId: this.$store.state.user.name,
  713. functionId: 701001,
  714. serialNumber: '701001Table1OpsItemNo',
  715. tableId: '701001Table1',
  716. tableName: '领料申请工单子表',
  717. columnProp: 'opsItemNo',
  718. headerAlign: 'center',
  719. align: 'right',
  720. columnLabel: '工序',
  721. columnHidden: false,
  722. columnImage: false,
  723. columnSortable: false,
  724. sortLv: 0,
  725. status: true,
  726. fixed: '',
  727. columnWidth: 80,
  728. },
  729. {
  730. userId: this.$store.state.user.name,
  731. functionId: 701001,
  732. serialNumber: '701001Table1ItemDesc',
  733. tableId: '701001Table1',
  734. tableName: '领料申请工单子表',
  735. columnProp: 'itemDesc',
  736. headerAlign: 'center',
  737. align: 'left',
  738. columnLabel: '工序名称',
  739. columnHidden: false,
  740. columnImage: false,
  741. columnSortable: false,
  742. sortLv: 0,
  743. status: true,
  744. fixed: '',
  745. columnWidth: 100,
  746. },
  747. {
  748. userId: this.$store.state.user.name,
  749. functionId: 701001,
  750. serialNumber: '701001Table1LocationNo',
  751. tableId: '701001Table1',
  752. tableName: '领料申请工单子表',
  753. columnProp: 'locationNo',
  754. headerAlign: 'center',
  755. align: 'left',
  756. columnLabel: '机台编码',
  757. columnHidden: false,
  758. columnImage: false,
  759. columnSortable: false,
  760. sortLv: 0,
  761. status: true,
  762. fixed: '',
  763. columnWidth: 80,
  764. }, */
  765. {
  766. userId: this.$store.state.user.name,
  767. functionId: 701001,
  768. serialNumber: '701001Table1NeedDate',
  769. tableId: '701001Table1',
  770. tableName: '领料申请派工单子表',
  771. columnProp: 'needDate',
  772. headerAlign: 'center',
  773. align: 'left',
  774. columnLabel: '退料时间',
  775. columnHidden: false,
  776. columnImage: false,
  777. columnSortable: false,
  778. sortLv: 0,
  779. status: true,
  780. fixed: '',
  781. columnWidth: 80,
  782. },
  783. {
  784. userId: this.$store.state.user.name,
  785. functionId: 701001,
  786. serialNumber: '701001Table1IssureQty',
  787. tableId: '701001Table1',
  788. tableName: '领料申请派工单子表',
  789. columnProp: 'unissureQty',
  790. headerAlign: 'center',
  791. align: 'right',
  792. columnLabel: '退料数量',
  793. columnHidden: false,
  794. columnImage: false,
  795. columnSortable: false,
  796. sortLv: 0,
  797. status: true,
  798. fixed: '',
  799. columnWidth: 80,
  800. },
  801. ],
  802. columnList2: [
  803. {
  804. userId: this.$store.state.user.name,
  805. functionId: 701001,
  806. serialNumber: '701001Table2Orderno',
  807. tableId: '701001Table2',
  808. tableName: '查询派工单',
  809. columnProp: 'orderNo',
  810. headerAlign: 'center',
  811. align: 'center',
  812. columnLabel: '生产订单',
  813. columnHidden: false,
  814. columnImage: false,
  815. columnSortable: false,
  816. sortLv: 0,
  817. status: true,
  818. fixed: '',
  819. columnWidth: 120,
  820. },
  821. /* {
  822. userId: this.$store.state.user.name,
  823. functionId: 701001,
  824. serialNumber: '701001Table2Itemno',
  825. tableId: '701001Table2',
  826. tableName: '查询派工单',
  827. columnProp: 'itemNo',
  828. headerAlign: 'center',
  829. align: 'right',
  830. columnLabel: '工序',
  831. columnHidden: false,
  832. columnImage: false,
  833. columnSortable: false,
  834. sortLv: 0,
  835. status: true,
  836. fixed: '',
  837. columnWidth: 50,
  838. },
  839. {
  840. userId: this.$store.state.user.name,
  841. functionId: 701001,
  842. serialNumber: '701001Table2ItemDesc',
  843. tableId: '701001Table2',
  844. tableName: '查询派工单',
  845. columnProp: 'itemDesc',
  846. headerAlign: 'center',
  847. align: 'left',
  848. columnLabel: '工序名称',
  849. columnHidden: false,
  850. columnImage: false,
  851. columnSortable: false,
  852. sortLv: 0,
  853. status: true,
  854. fixed: '',
  855. columnWidth: 100,
  856. }, */
  857. {
  858. userId: this.$store.state.user.name,
  859. functionId: 701001,
  860. serialNumber: '701001Table2PartNo',
  861. tableId: '701001Table2',
  862. tableName: '查询派工单',
  863. columnProp: 'partNo',
  864. headerAlign: 'center',
  865. align: 'left',
  866. columnLabel: '物料编码',
  867. columnHidden: false,
  868. columnImage: false,
  869. columnSortable: false,
  870. sortLv: 0,
  871. status: true,
  872. fixed: '',
  873. columnWidth: 80,
  874. },
  875. {
  876. userId: this.$store.state.user.name,
  877. functionId: 701001,
  878. serialNumber: '701001Table2PartNo',
  879. tableId: '701001Table2',
  880. tableName: '查询派工单',
  881. columnProp: 'partDesc',
  882. headerAlign: 'center',
  883. align: 'left',
  884. columnLabel: '物料名称',
  885. columnHidden: false,
  886. columnImage: false,
  887. columnSortable: false,
  888. sortLv: 0,
  889. status: true,
  890. fixed: '',
  891. columnWidth: 120,
  892. showOverflowTooltip: true,
  893. },
  894. {
  895. userId: this.$store.state.user.name,
  896. functionId: 701001,
  897. serialNumber: '701001Table2Qtyrequired',
  898. tableId: '701001Table2',
  899. tableName: '查询派工单',
  900. columnProp: 'lotSize',
  901. headerAlign: 'center',
  902. align: 'right',
  903. columnLabel: '工单数量',
  904. columnHidden: false,
  905. columnImage: false,
  906. columnSortable: false,
  907. sortLv: 0,
  908. status: true,
  909. fixed: '',
  910. columnWidth: 80,
  911. },
  912. {
  913. userId: this.$store.state.user.name,
  914. functionId: 701001,
  915. serialNumber: '701001Table2Qtyreported',
  916. tableId: '701001Table2',
  917. tableName: '查询派工单',
  918. columnProp: 'qtyReported',
  919. headerAlign: 'center',
  920. align: 'right',
  921. columnLabel: '报工数量',
  922. columnHidden: false,
  923. columnImage: false,
  924. columnSortable: false,
  925. sortLv: 0,
  926. status: true,
  927. fixed: '',
  928. columnWidth: 80,
  929. },
  930. {
  931. userId: this.$store.state.user.name,
  932. functionId: 701001,
  933. serialNumber: '701001Table2SScheduleddate',
  934. tableId: '701001Table2',
  935. tableName: '查询工单',
  936. columnProp: 'startDate',
  937. headerAlign: 'center',
  938. align: 'left',
  939. columnLabel: '工单开始日期',
  940. columnHidden: false,
  941. columnImage: false,
  942. columnSortable: false,
  943. sortLv: 0,
  944. status: true,
  945. fixed: '',
  946. columnWidth: 100,
  947. },
  948. {
  949. userId: this.$store.state.user.name,
  950. functionId: 701001,
  951. serialNumber: '701001Table2SScheduleddate',
  952. tableId: '701001Table2',
  953. tableName: '查询工单',
  954. columnProp: 'finishDate',
  955. headerAlign: 'center',
  956. align: 'left',
  957. columnLabel: '工单结束日期',
  958. columnHidden: false,
  959. columnImage: false,
  960. columnSortable: false,
  961. sortLv: 0,
  962. status: true,
  963. fixed: '',
  964. columnWidth: 100,
  965. },
  966. /* {
  967. userId: this.$store.state.user.name,
  968. functionId: 701001,
  969. serialNumber: '701001Table2SWorkcenterno',
  970. tableId: '701001Table2',
  971. tableName: '查询派工单',
  972. columnProp: 'sWorkCenterNo',
  973. headerAlign: 'center',
  974. align: 'left',
  975. columnLabel: '加工中心编码',
  976. columnHidden: false,
  977. columnImage: false,
  978. columnSortable: false,
  979. sortLv: 0,
  980. status: true,
  981. fixed: '',
  982. columnWidth: 80,
  983. },
  984. {
  985. userId: this.$store.state.user.name,
  986. functionId: 701001,
  987. serialNumber: '701001Table2WorkCenterDesc',
  988. tableId: '701001Table2',
  989. tableName: '查询工单',
  990. columnProp: 'workCenterDesc',
  991. headerAlign: 'center',
  992. align: 'left',
  993. columnLabel: '加工中心名称',
  994. columnHidden: false,
  995. columnImage: false,
  996. columnSortable: false,
  997. sortLv: 0,
  998. status: true,
  999. fixed: '',
  1000. columnWidth: 100,
  1001. },
  1002. {
  1003. userId: this.$store.state.user.name,
  1004. functionId: 701001,
  1005. serialNumber: '701001Table2SResourceid',
  1006. tableId: '701001Table2',
  1007. tableName: '查询派工单',
  1008. columnProp: 'sResourceID',
  1009. headerAlign: 'center',
  1010. align: 'left',
  1011. columnLabel: '机台编码',
  1012. columnHidden: false,
  1013. columnImage: false,
  1014. columnSortable: false,
  1015. sortLv: 0,
  1016. status: true,
  1017. fixed: '',
  1018. columnWidth: 60,
  1019. },
  1020. {
  1021. userId: this.$store.state.user.name,
  1022. functionId: 701001,
  1023. serialNumber: '701001Table2ResourceDesc',
  1024. tableId: '701001Table2',
  1025. tableName: '查询派工单',
  1026. columnProp: 'resourceDesc',
  1027. headerAlign: 'center',
  1028. align: 'left',
  1029. columnLabel: '机台名称',
  1030. columnHidden: false,
  1031. columnImage: false,
  1032. columnSortable: false,
  1033. sortLv: 0,
  1034. status: true,
  1035. fixed: '',
  1036. columnWidth: 100,
  1037. },
  1038. {
  1039. userId: this.$store.state.user.name,
  1040. functionId: 701001,
  1041. serialNumber: '701001Table2OperatorDesc',
  1042. tableId: '701001Table2',
  1043. tableName: '查询派工单',
  1044. columnProp: 'operatorDesc',
  1045. headerAlign: 'center',
  1046. align: 'left',
  1047. columnLabel: '操作员',
  1048. columnHidden: false,
  1049. columnImage: false,
  1050. columnSortable: false,
  1051. sortLv: 0,
  1052. status: true,
  1053. fixed: '',
  1054. columnWidth: 100,
  1055. },*/
  1056. ],
  1057. columnList3: [
  1058. {
  1059. userId: this.$store.state.user.name,
  1060. functionId: 701001,
  1061. serialNumber: '701001Table3ComponentPartNo',
  1062. tableId: '701001Table3',
  1063. tableName: '领料申请BOM子表',
  1064. columnProp: 'componentPartNo',
  1065. headerAlign: 'center',
  1066. align: 'left',
  1067. columnLabel: '物料编码',
  1068. columnHidden: false,
  1069. columnImage: false,
  1070. columnSortable: false,
  1071. sortLv: 0,
  1072. status: true,
  1073. fixed: '',
  1074. columnWidth: 80,
  1075. },
  1076. {
  1077. userId: this.$store.state.user.name,
  1078. functionId: 701001,
  1079. serialNumber: '701001Table3PartDesc',
  1080. tableId: '701001Table3',
  1081. tableName: '领料申请BOM子表',
  1082. columnProp: 'componentPartDesc',
  1083. headerAlign: 'center',
  1084. align: 'left',
  1085. columnLabel: '物料描述',
  1086. columnHidden: false,
  1087. columnImage: false,
  1088. columnSortable: false,
  1089. sortLv: 0,
  1090. status: true,
  1091. fixed: '',
  1092. columnWidth: 120,
  1093. },
  1094. /* {
  1095. userId: this.$store.state.user.name,
  1096. functionId: 701001,
  1097. serialNumber: '701001Table3QtyRequired',
  1098. tableId: '701001Table3',
  1099. tableName: '领料申请BOM子表',
  1100. columnProp: 'qtyRequired',
  1101. headerAlign: 'center',
  1102. align: 'right',
  1103. columnLabel: '需求数量',
  1104. columnHidden: false,
  1105. columnImage: false,
  1106. columnSortable: false,
  1107. sortLv: 0,
  1108. status: true,
  1109. fixed: '',
  1110. columnWidth: 50,
  1111. },
  1112. {
  1113. userId: this.$store.state.user.name,
  1114. functionId: 701001,
  1115. serialNumber: '701001Table3QtyOnHand',
  1116. tableId: '701001Table3',
  1117. tableName: '领料申请BOM子表',
  1118. columnProp: 'qtyOnHand',
  1119. headerAlign: 'center',
  1120. align: 'right',
  1121. columnLabel: '现场库存',
  1122. columnHidden: false,
  1123. columnImage: false,
  1124. columnSortable: false,
  1125. sortLv: 0,
  1126. status: true,
  1127. fixed: '',
  1128. columnWidth: 50,
  1129. },
  1130. {
  1131. userId: this.$store.state.user.name,
  1132. functionId: 701001,
  1133. serialNumber: '701001Table3StockQty',
  1134. tableId: '701001Table3',
  1135. tableName: '领料申请BOM子表',
  1136. columnProp: 'stockQty',
  1137. headerAlign: 'center',
  1138. align: 'right',
  1139. columnLabel: 'ERP库存',
  1140. columnHidden: false,
  1141. columnImage: false,
  1142. columnSortable: false,
  1143. sortLv: 0,
  1144. status: true,
  1145. fixed: '',
  1146. columnWidth: 50,
  1147. }, */
  1148. {
  1149. userId: this.$store.state.user.name,
  1150. functionId: 701001,
  1151. serialNumber: '701001Table3QtyToIssue',
  1152. tableId: '701001Table3',
  1153. tableName: '领料申请BOM子表',
  1154. columnProp: 'qtyToUnissue',
  1155. headerAlign: 'center',
  1156. align: 'right',
  1157. columnLabel: '本次退货数量',
  1158. columnHidden: false,
  1159. columnImage: false,
  1160. columnSortable: false,
  1161. sortLv: 0,
  1162. status: true,
  1163. fixed: '',
  1164. columnWidth: 60,
  1165. },
  1166. {
  1167. userId: this.$store.state.user.name,
  1168. functionId: 701001,
  1169. serialNumber: '701001Table3Remark',
  1170. tableId: '701001Table3',
  1171. tableName: '领料申请BOM子表',
  1172. columnProp: 'remark',
  1173. headerAlign: 'center',
  1174. align: 'left',
  1175. columnLabel: '备注',
  1176. columnHidden: false,
  1177. columnImage: false,
  1178. columnSortable: false,
  1179. sortLv: 0,
  1180. status: true,
  1181. fixed: '',
  1182. columnWidth: 150,
  1183. },
  1184. ],
  1185. rules: {
  1186. groupIdType: [
  1187. {
  1188. required: true,
  1189. message: ' ',
  1190. trigger: ['blur', 'change'],
  1191. },
  1192. ],
  1193. groupDescType: [
  1194. {
  1195. required: true,
  1196. message: ' ',
  1197. trigger: ['blur', 'change'],
  1198. },
  1199. ],
  1200. activeType: [
  1201. {
  1202. required: true,
  1203. message: ' ',
  1204. trigger: ['blur', 'change'],
  1205. },
  1206. ],
  1207. bu: [
  1208. {
  1209. required: true,
  1210. message: ' ',
  1211. trigger: ['blur', 'change'],
  1212. },
  1213. ],
  1214. },
  1215. userBuList: [],
  1216. authSearch: false,
  1217. authSave: false,
  1218. authUpdate: false,
  1219. authDelete: false,
  1220. menuId: this.$route.meta.menuId,
  1221. partSearch: {
  1222. site: '',
  1223. sourceBu: '',
  1224. partNo: '',
  1225. partDesc: '',
  1226. spec: '',
  1227. },
  1228. xiadaModelFlag: false,
  1229. saveOtherPartModalFlag: false,
  1230. otherPartData: {
  1231. site: '',
  1232. notifyNo: '',
  1233. itemNo: '',
  1234. bOMItemNo: '',
  1235. componentPartNo: '',
  1236. qtyToIssue: '',
  1237. issueType: '',
  1238. partDesc: '',
  1239. umid: '',
  1240. remark: '',
  1241. },
  1242. showAddNotifyTypeDialog: false,
  1243. selectedNotifyType: 'production',
  1244. selectedNotifyRemark:'',
  1245. chooseLoading: false,
  1246. }
  1247. },
  1248. mounted() {
  1249. /* this.$nextTick(() => {
  1250. this.height = window.innerHeight - 300
  1251. }) */
  1252. },
  1253. created() {
  1254. // 按钮控制
  1255. this.getButtonAuthData()
  1256. // 获取用户的 site 和 bu
  1257. //this.getSiteAndBuByUserName()
  1258. // 校验用户是否收藏
  1259. /* this.favoriteIsOk()*/
  1260. this.getUserNotifyNo()
  1261. // 动态列
  1262. /* this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  1263. this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
  1264. this.getTableUserColumn(this.$route.meta.menuId+'table3',3)
  1265. this.getTableUserColumn(this.$route.meta.menuId+'table4',4) */
  1266. // if (!this.authSearch) {
  1267. // // 获取数据列表
  1268. // this.getDataList()
  1269. // }
  1270. },
  1271. methods: {
  1272. deleteNotifyMaterial(row) {
  1273. this.$confirm('确认删除?', '提示', {
  1274. confirmButtonText: '确定',
  1275. cancelButtonText: '取消',
  1276. type: 'warning',
  1277. }).then(() => {
  1278. deleteNotifyMaterialWithOutLog(row).then(({ data }) => {
  1279. if (data && data.code === 0) {
  1280. this.searchOtherPart('非BOM物料')
  1281. this.searchOtherPart('不管控物料')
  1282. this.$message({
  1283. message: '操作成功',
  1284. type: 'success',
  1285. duration: 1500,
  1286. onClose: () => {},
  1287. })
  1288. } else {
  1289. this.$alert(data.msg, '错误', {
  1290. confirmButtonText: '确定',
  1291. })
  1292. }
  1293. })
  1294. })
  1295. },
  1296. getBaseList(val, type) {
  1297. this.tagNo = val
  1298. let conSql = ''
  1299. this.$nextTick(() => {
  1300. let strVal = ''
  1301. if (val === 515) {
  1302. strVal = this.seqNoData.sResourceid
  1303. conSql =
  1304. " and site = '" +
  1305. this.notifyData.site +
  1306. "'" +
  1307. " and bu_no = '" +
  1308. this.notifyData.bu +
  1309. "'"
  1310. this.$refs.baseList.init(val, strVal, conSql)
  1311. }
  1312. if (val === 216) {
  1313. strVal = this.seqNoData.sWorkcenterno
  1314. conSql =
  1315. " and site = '" +
  1316. this.notifyData.site +
  1317. "'" +
  1318. " and bu_no = '" +
  1319. this.notifyData.bu +
  1320. "'"
  1321. this.$refs.baseList.init(val, strVal, conSql)
  1322. }
  1323. if (val === 215) {
  1324. strVal = this.notifyOrderData.locationNo
  1325. this.$refs.baseList.init(val, strVal)
  1326. }
  1327. })
  1328. },
  1329. chooseNoBomPartNo(row) {
  1330. this.otherPartData = {
  1331. site: this.notifyData.site,
  1332. notifyNo: this.notifyData.notifyNo,
  1333. itemNo: 998,
  1334. bOMItemNo: '',
  1335. componentPartNo: row.partNo,
  1336. qtyToIssue: '',
  1337. issueType: '非BOM物料',
  1338. partDesc: row.partDesc,
  1339. umid: row.umid,
  1340. remark: '',
  1341. }
  1342. this.saveOtherPartModalFlag = true
  1343. },
  1344. chooseNoControlPartNo(row) {
  1345. this.otherPartData = {
  1346. site: this.notifyData.site,
  1347. notifyNo: this.notifyData.notifyNo,
  1348. itemNo: 999,
  1349. bOMItemNo: '',
  1350. componentPartNo: row.partNo,
  1351. qtyToIssue: '',
  1352. issueType: '不管控物料',
  1353. partDesc: row.partDesc,
  1354. umid: row.umid,
  1355. remark: '',
  1356. }
  1357. this.saveOtherPartModalFlag = true
  1358. },
  1359. tableRowClassName({ row, rowIndex }) {
  1360. if (row.qtyToIssue > row.qtyAvailable) {
  1361. return 'error-row'
  1362. }
  1363. return ''
  1364. },
  1365. // 列表方法的回调
  1366. getBaseData(val) {
  1367. if (this.tagNo === 515) {
  1368. this.seqNoData.sResourceid = val.resource_id
  1369. }
  1370. if (this.tagNo === 215) {
  1371. this.notifyOrderData.locationNo = val.location_id
  1372. }
  1373. if (this.tagNo === 216) {
  1374. this.seqNoData.sWorkcenterno = val.work_center_no
  1375. }
  1376. },
  1377. getUserNotifyNo() {
  1378. let inData = {
  1379. site: this.$store.state.user.site,
  1380. username: this.$store.state.user.name,
  1381. }
  1382. this.getAllNotifyStatus()
  1383. getUserNotifyNo(inData).then(({ data }) => {
  1384. if (data.code === 0) {
  1385. if (data.row != null) {
  1386. this.notifyNo = data.row.notifyNo
  1387. this.notifyData = data.row
  1388. this.getNotifyNoDetail()
  1389. /* this.searchOtherPart('BOM')
  1390. this.searchOtherPart('不管控物料') */
  1391. } else {
  1392. this.notifyNo = ''
  1393. this.notifyData = {
  1394. site: '',
  1395. bu: '',
  1396. notifyNo: '',
  1397. notifyDate: '',
  1398. enteredDate: '',
  1399. userName: '',
  1400. userDisplay: '',
  1401. remark: '',
  1402. planIssueDate: '',
  1403. }
  1404. this.dataList = []
  1405. }
  1406. } else {
  1407. this.notifyNo = ''
  1408. this.notifyData = {
  1409. site: '',
  1410. bu: '',
  1411. notifyNo: '',
  1412. notifyDate: '',
  1413. enteredDate: '',
  1414. userName: '',
  1415. userDisplay: '',
  1416. remark: '',
  1417. planIssueDate: '',
  1418. }
  1419. this.dataList = []
  1420. }
  1421. })
  1422. },
  1423. getNotifyNoDetail() {
  1424. let inData = {
  1425. site: this.$store.state.user.site,
  1426. notifyNo: this.notifyNo,
  1427. }
  1428. getNotifyNoDetail(inData).then(({ data }) => {
  1429. if (data.code === 0) {
  1430. this.dataList = data.rows
  1431. }
  1432. })
  1433. },
  1434. addNotify() {
  1435. //this.showAddNotifyTypeDialog = true
  1436. let inData = {
  1437. site: this.$store.state.user.site,
  1438. userName: this.$store.state.user.name,
  1439. }
  1440. createNotify(inData).then(({ data }) => {
  1441. if (data.code === 0) {
  1442. this.showAddNotifyTypeDialog = false
  1443. this.$message({
  1444. message: '操作成功',
  1445. type: 'success',
  1446. duration: 1500,
  1447. onClose: () => {},
  1448. })
  1449. this.getUserNotifyNo()
  1450. } else {
  1451. this.$alert(data.msg, '错误', {
  1452. confirmButtonText: '确定',
  1453. })
  1454. }
  1455. })
  1456. },
  1457. confirmAddNotify() {
  1458. let outWorkOrderFlag = 'N'
  1459. if (this.selectedNotifyType === 'outsourced') {
  1460. outWorkOrderFlag = 'Y'
  1461. } else {
  1462. outWorkOrderFlag = 'N'
  1463. }
  1464. let inData = {
  1465. site: this.$store.state.user.site,
  1466. userName: this.$store.state.user.name,
  1467. outWorkOrderFlag: outWorkOrderFlag,
  1468. remark: this.selectedNotifyRemark,
  1469. }
  1470. this.getAllNotifyStatus()
  1471. createNotify(inData).then(({ data }) => {
  1472. if (data.code === 0) {
  1473. this.showAddNotifyTypeDialog = false
  1474. this.$message({
  1475. message: '操作成功',
  1476. type: 'success',
  1477. duration: 1500,
  1478. onClose: () => {},
  1479. })
  1480. this.getUserNotifyNo()
  1481. } else {
  1482. this.$alert(data.msg, '错误', {
  1483. confirmButtonText: '确定',
  1484. })
  1485. }
  1486. })
  1487. },
  1488. chooseSOS(row) {
  1489. if (this.dataList.length > 0) {
  1490. //这边是有个判断的,判断派工单号不能重复
  1491. let stop = false
  1492. for (let i = 0; i < this.dataList.length; i++) {
  1493. if (this.dataList[i].seqNo == row.seqno) {
  1494. stop = true
  1495. }
  1496. }
  1497. if (stop) {
  1498. this.$alert('已经选择过此工单,请返回点击明细直接操作!!', '提示', {
  1499. confirmButtonText: '确定',
  1500. })
  1501. return false
  1502. }
  1503. }
  1504. let inData = {
  1505. site: this.$store.state.user.site,
  1506. orderNo: row.orderNo,
  1507. }
  1508. this.chooseLoading = true
  1509. getIFSShopOrderByOrderNo(inData).then(({ data }) => {
  1510. if (data.code === 0) {
  1511. console.log("data",data);
  1512. this.notifyOrderData.partNo = data.shopOrderVo[0].partNo
  1513. this.notifyOrderData.orderNo = data.shopOrderVo[0].orderNo
  1514. this.notifyOrderData.itemNo = data.shopOrderVo[0].itemNo
  1515. this.notifyOrderData.seqNo = data.shopOrderVo[0].seqNo
  1516. this.notifyOrderData.partDesc = data.shopOrderVo[0].partDesc
  1517. this.notifyOrderData.qtyRequired = data.shopOrderVo[0].lotSize
  1518. this.notifyOrderData.sResourceID = row.sResourceID
  1519. this.notifyOrderData.unissureQty = ''
  1520. this.notifyOrderData.needDate = this.dayjs().format('YYYY-MM-DD HH:mm')
  1521. this.notifyOrderData.locationNo = row.sResourceID
  1522. this.saveSeqNoModalFlag = true
  1523. }else {
  1524. this.$meassage.error(data.msg)
  1525. return;
  1526. }
  1527. }).finally(() => {
  1528. this.chooseLoading = false
  1529. })
  1530. },
  1531. saveSOS() {
  1532. if (
  1533. this.notifyOrderData.needDate == null ||
  1534. this.notifyOrderData.needDate == ''
  1535. ) {
  1536. this.$message.warning('请选择时间!')
  1537. return false
  1538. }
  1539. // if(this.notifyOrderData.locationNo==null||this.notifyOrderData.locationNo==''){
  1540. // this.$message.warning('请输入机台!')
  1541. // return false
  1542. // }
  1543. if (
  1544. this.notifyOrderData.unissureQty == null ||
  1545. this.notifyOrderData.unissureQty == '' ||
  1546. this.notifyOrderData.unissureQty <= 0
  1547. ) {
  1548. this.$message.warning('请填写领取数量!')
  1549. return false
  1550. }
  1551. let row = this.notifyOrderData
  1552. console.log("row",row);
  1553. if (this.dataList.length > 0) {
  1554. let stop = false
  1555. for (let i = 0; i < this.dataList.length; i++) {
  1556. if (this.dataList[i].seqNo == row.seqno) {
  1557. stop = true
  1558. }
  1559. }
  1560. if (stop) {
  1561. this.$alert('已经选择过此工单,请返回点击明细直接操作!!', '提示', {
  1562. confirmButtonText: '确定',
  1563. })
  1564. return false
  1565. }
  1566. }
  1567. this.$confirm('确定选择工单' + row.orderNo + '?', '提示', {
  1568. confirmButtonText: '确定',
  1569. cancelButtonText: '取消',
  1570. type: 'warning',
  1571. }).then(() => {
  1572. let inData = {
  1573. site: this.$store.state.user.site,
  1574. notifyNo: this.notifyNo,
  1575. fgPartNo: row.partNo,
  1576. soorderNo: row.orderNo,
  1577. opsItemNo: row.itemNo,
  1578. seqNo: row.seqNo,
  1579. locationNo: row.locationNo,
  1580. needDate: row.needDate,
  1581. unissureQty: row.unissureQty,
  1582. }
  1583. saveUnissueNotifyOrderList(inData).then(({ data }) => {
  1584. if (data.code === 0) {
  1585. this.saveSeqNoModalFlag = false
  1586. row.itemNo = data.itemNo
  1587. this.getNotifyNoDetail()
  1588. this.enterSOS(row)
  1589. } else {
  1590. this.$alert(data.msg, '错误', {
  1591. confirmButtonText: '确定',
  1592. })
  1593. }
  1594. })
  1595. })
  1596. },
  1597. qtyAllForSeqNo() {
  1598. this.notifyOrderData.unissureQty = this.notifyOrderData.qtyRequired
  1599. },
  1600. qtyAllForBom(row) {
  1601. row.qtyToIssue = row.qtyRequired
  1602. },
  1603. enterSOSDetail(row) {
  1604. let rows = {
  1605. site: this.$store.state.user.site,
  1606. notifyNo: this.notifyNo,
  1607. soorderNo: row.soorderNo,
  1608. seqNo: row.seqNo,
  1609. partNo: row.fgPartNo,
  1610. itemNo: row.itemNo,
  1611. }
  1612. this.searchUnissueNotifyMaterialList(rows)
  1613. //this.enterSOS(rows)
  1614. },
  1615. searchUnissueNotifyMaterialList(row){
  1616. this.bomLoadFlag = true
  1617. this.materialModalFlag = true
  1618. searchUnissueNotifyMaterialList(row).then(({ data }) => {
  1619. if (data.code === 0) {
  1620. this.sobomList = data.rows
  1621. }
  1622. }).finally(() => {
  1623. this.bomLoadFlag = false
  1624. })
  1625. },
  1626. enterSOS(row) {
  1627. console.log("row",row);
  1628. this.seqNoModalFlag = false
  1629. this.materialModalFlag = true
  1630. this.sobomList = []
  1631. this.sobomData = {
  1632. orderNo: row.orderNo,
  1633. seqNo: row.seqNo,
  1634. partNo: row.partNo,
  1635. }
  1636. this.bomLoadFlag = true
  1637. let inData = {
  1638. site: this.$store.state.user.site,
  1639. notifyNo: this.notifyNo,
  1640. orderNo: row.orderNo,
  1641. seqNo: row.seqNo,
  1642. partNo: row.partNo,
  1643. itemNo: row.itemNo,
  1644. }
  1645. getSOSBOMForIssure(inData).then(({ data }) => {
  1646. this.bomLoadFlag = false
  1647. if (data.code === 0) {
  1648. this.sobomList = data.rows
  1649. for (let i = 0; i < this.sobomList.length; i++) {
  1650. this.sobomList[i].itemNo = inData.itemNo
  1651. }
  1652. }
  1653. })
  1654. },
  1655. ToSOS() {
  1656. this.seqNoModalFlag = true
  1657. this.materialModalFlag = false
  1658. },
  1659. chooseSOSModal() {
  1660. this.seqNoData = {
  1661. site: this.$store.state.user.site,
  1662. orderno: '',
  1663. seqno: '',
  1664. sResourceid: '',
  1665. sWorkcenterno: '',
  1666. operatorId: '',
  1667. sShiftno: '',
  1668. startDate: this.dayjs().format('YYYY-MM-DD'),
  1669. endDate: this.dayjs().format('YYYY-MM-DD'),
  1670. }
  1671. //this.searchSOSRouting()查询工单列表
  1672. this.seqNoModalFlag = true
  1673. },
  1674. searchSOSRouting() {
  1675. getSOScheduledRoutingListForUnissure(this.seqNoData).then(({ data }) => {
  1676. if (data.code === 0) {
  1677. this.seqNoList = data.rows
  1678. }
  1679. })
  1680. },
  1681. saveMaterialDetail() {
  1682. for (let i = 0; i < this.sobomList.length; i++) {
  1683. if (
  1684. this.sobomList[i].applyQty === '' ||
  1685. this.sobomList[i].applyQty == null
  1686. ) {
  1687. this.sobomList[i].applyQty = 0
  1688. }
  1689. this.sobomList[i].notifyNo = this.notifyNo
  1690. this.sobomList[i].site = this.$store.state.user.site
  1691. }
  1692. let materialList = this.sobomList.filter((item) => item.qtyToUnissue > 0)
  1693. if (materialList.length == 0) {
  1694. this.$alert('没有需要保存的内容!', '提示', {
  1695. confirmButtonText: '确定',
  1696. })
  1697. return false
  1698. }
  1699. console.log("this.sobomList",materialList);
  1700. saveUnissueMaterialDetail(materialList).then(({ data }) => {
  1701. if (data.code === 0) {
  1702. this.materialModalFlag = false
  1703. this.chooseSOSModal()
  1704. this.$message.success('操作成功')
  1705. } else {
  1706. this.$alert(data.msg, '错误', {
  1707. confirmButtonText: '确定',
  1708. })
  1709. }
  1710. })
  1711. },
  1712. //获取用户的bu
  1713. getSiteAndBuByUserName() {
  1714. let tempData = {
  1715. username: this.$store.state.user.name,
  1716. }
  1717. getSiteAndBuByUserName(tempData).then(({ data }) => {
  1718. if (data.code === 0 && data.row != null) {
  1719. this.userBuList = data.rows
  1720. }
  1721. })
  1722. },
  1723. // 校验用户是否收藏
  1724. favoriteIsOk() {
  1725. let userFavorite = {
  1726. userId: this.$store.state.user.id,
  1727. languageCode: this.$i18n.locale,
  1728. }
  1729. userFavoriteList(userFavorite).then(({ data }) => {
  1730. for (let i = 0; i < data.list.length; i++) {
  1731. if (this.$route.meta.menuId === data.list[i].menuId) {
  1732. this.favorite = true
  1733. }
  1734. }
  1735. })
  1736. },
  1737. // 收藏 OR 取消收藏
  1738. favoriteFunction() {
  1739. let userFavorite = {
  1740. userId: this.$store.state.user.id,
  1741. functionId: this.$route.meta.menuId,
  1742. }
  1743. if (this.favorite) {
  1744. removeUserFavorite(userFavorite).then(({ data }) => {
  1745. this.$message.success(data.msg)
  1746. this.favorite = false
  1747. })
  1748. } else {
  1749. // 收藏
  1750. saveUserFavorite(userFavorite).then(({ data }) => {
  1751. this.$message.success(data.msg)
  1752. this.favorite = true
  1753. })
  1754. }
  1755. },
  1756. //导出excel
  1757. async createExportData() {
  1758. this.searchData.limit = -1
  1759. this.searchData.page = 1
  1760. await eamGroupSearch(this.searchData).then(({ data }) => {
  1761. this.exportList = data.page.list
  1762. })
  1763. return this.exportList
  1764. },
  1765. startDownload() {},
  1766. finishDownload() {},
  1767. fields() {
  1768. let json = '{'
  1769. this.columnList.forEach((item, index) => {
  1770. if (index == this.columnList.length - 1) {
  1771. json +=
  1772. '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  1773. } else {
  1774. json +=
  1775. '"' +
  1776. item.columnLabel +
  1777. '"' +
  1778. ':' +
  1779. '"' +
  1780. item.columnProp +
  1781. '"' +
  1782. ','
  1783. }
  1784. })
  1785. json += '}'
  1786. let s = eval('(' + json + ')')
  1787. return s
  1788. },
  1789. noBomModel() {
  1790. this.partSearch = {
  1791. site: this.notifyData.site,
  1792. sourceBu: this.notifyData.bu,
  1793. partNo: '',
  1794. partDesc: '',
  1795. spec: '',
  1796. }
  1797. this.partModelFlag = true
  1798. this.searchPartModel()
  1799. },
  1800. noControlModel() {
  1801. this.partSearch = {
  1802. site: this.notifyData.site,
  1803. sourceBu: this.notifyData.bu,
  1804. partNo: '',
  1805. partDesc: '',
  1806. spec: '',
  1807. }
  1808. this.noControlPartModelFlag = true
  1809. this.searchNoControlPartModel()
  1810. },
  1811. searchPartModel() {
  1812. getPartList(this.partSearch).then(({ data }) => {
  1813. if (data.code === 0) {
  1814. this.partList = data.rows
  1815. }
  1816. })
  1817. },
  1818. searchNoControlPartModel() {
  1819. getNoControlPartList(this.partSearch).then(({ data }) => {
  1820. if (data.code === 0) {
  1821. this.partList2 = data.rows
  1822. }
  1823. })
  1824. },
  1825. xiadaNotifyModel() {
  1826. if (
  1827. this.dataList.length == 0 &&
  1828. this.dataList2.length == 0 &&
  1829. this.dataList3.length == 0
  1830. ) {
  1831. this.$alert('没有明细记录无法下达!!', '提示', {
  1832. confirmButtonText: '确定',
  1833. })
  1834. return false
  1835. }
  1836. this.$confirm('确定下达' + '?', '提示', {
  1837. confirmButtonText: '确定',
  1838. cancelButtonText: '取消',
  1839. type: 'warning',
  1840. }).then(() => {
  1841. updateNotifyStatus(this.notifyData).then(({ data }) => {
  1842. if (data.code === 0) {
  1843. this.$message.success('下达成功')
  1844. this.getUserNotifyNo()
  1845. }
  1846. }).catch(() => {
  1847. this.$message.error(data.msg)
  1848. })
  1849. })
  1850. /* checkPartStock(this.notifyData).then(({ data }) => {
  1851. if (data.code === 0) {
  1852. this.xiadaList = data.rows
  1853. }
  1854. }) */
  1855. //this.xiadaModelFlag = true
  1856. },
  1857. xiadaNotify() {
  1858. xiadaNotify(this.notifyData).then(({ data }) => {
  1859. if (data.code === 0) {
  1860. this.xiadaModelFlag = false
  1861. this.getUserNotifyNo()
  1862. this.$message.success('操作成功')
  1863. } else {
  1864. this.$alert(data.msg, '错误', {
  1865. confirmButtonText: '确定',
  1866. })
  1867. }
  1868. })
  1869. },
  1870. saveOtherPart() {
  1871. if (
  1872. this.otherPartData.qtyToIssue == null ||
  1873. this.otherPartData.qtyToIssue == '' ||
  1874. this.otherPartData.qtyToIssue <= 0
  1875. ) {
  1876. this.$message.warning('请填写领取数量!')
  1877. return false
  1878. }
  1879. this.$confirm('确定保存' + '?', '提示', {
  1880. confirmButtonText: '确定',
  1881. cancelButtonText: '取消',
  1882. type: 'warning',
  1883. }).then(() => {
  1884. saveOtherPart(this.otherPartData).then(({ data }) => {
  1885. if (data.code === 0) {
  1886. this.saveOtherPartModalFlag = false
  1887. if (this.otherPartData.issueType === '非BOM物料') {
  1888. this.partModelFlag = false
  1889. this.activeName = 'noBom'
  1890. this.searchOtherPart('非BOM物料')
  1891. }
  1892. if (this.otherPartData.issueType === '不管控物料') {
  1893. this.noControlPartModelFlag = false
  1894. this.activeName = 'noControl'
  1895. this.searchOtherPart('不管控物料')
  1896. }
  1897. this.$message.success('操作成功')
  1898. } else {
  1899. this.$alert(data.msg, '错误', {
  1900. confirmButtonText: '确定',
  1901. })
  1902. }
  1903. })
  1904. })
  1905. },
  1906. deleteNotify() {
  1907. if (this.dataList.length > 0) {
  1908. this.$alert('请先删除已经申请的明细记录!!', '提示', {
  1909. confirmButtonText: '确定',
  1910. })
  1911. return false
  1912. }
  1913. deleteUnissueNotifyHeader(this.notifyData).then(({ data }) => {
  1914. if (data.code === 0) {
  1915. this.getUserNotifyNo()
  1916. this.$message.success(data.msg)
  1917. } else {
  1918. this.$alert(data.msg, '错误', {
  1919. confirmButtonText: '确定',
  1920. })
  1921. }
  1922. })
  1923. },
  1924. updateBuModel() {
  1925. if (this.dataList.length > 0) {
  1926. this.$alert(
  1927. '已经选择了工单,无法切换BU,请删除已选工单!',
  1928. '错误',
  1929. {
  1930. confirmButtonText: '确定',
  1931. }
  1932. )
  1933. }
  1934. let inData = {
  1935. site: this.notifyData.site,
  1936. username: this.$store.state.user.name,
  1937. }
  1938. getBuByUserNameSite(inData).then(({ data }) => {
  1939. if (data && data.code === 0) {
  1940. this.buList = data.rows
  1941. }
  1942. })
  1943. this.newBu = this.notifyData.bu
  1944. this.changeBuFlag = true
  1945. },
  1946. saveNewBu() {
  1947. let inData = {
  1948. bu: this.newBu,
  1949. site: this.notifyData.site,
  1950. notifyNo: this.notifyData.notifyNo,
  1951. }
  1952. updateNotifyBu(inData).then(({ data }) => {
  1953. if (data && data.code === 0) {
  1954. this.notifyData.bu = this.newBu
  1955. this.changeBuFlag = false
  1956. this.$message({
  1957. message: '操作成功',
  1958. type: 'success',
  1959. duration: 1500,
  1960. onClose: () => {},
  1961. })
  1962. } else {
  1963. this.$alert(data.msg, '错误', {
  1964. confirmButtonText: '确定',
  1965. })
  1966. }
  1967. })
  1968. },
  1969. searchOtherPart(type) {
  1970. let inData = {
  1971. site: this.notifyData.site,
  1972. notifyNo: this.notifyData.notifyNo,
  1973. issueType: type,
  1974. }
  1975. searchOtherPart(inData).then(({ data }) => {
  1976. if (data && data.code === 0) {
  1977. if (type === '非BOM物料') {
  1978. this.dataList2 = data.rows
  1979. }
  1980. if (type === '不管控物料') {
  1981. this.dataList3 = data.rows
  1982. }
  1983. }
  1984. })
  1985. },
  1986. // 删除
  1987. deleteNotifySOS(row) {
  1988. this.$confirm(`是否删除这个工单的申请信息?`, '提示', {
  1989. confirmButtonText: '确定',
  1990. cancelButtonText: '取消',
  1991. type: 'warning',
  1992. })
  1993. .then(() => {
  1994. deleteNotifyUnissue(row).then(({ data }) => {
  1995. if (data && data.code === 0) {
  1996. this.getNotifyNoDetail()
  1997. this.$message({
  1998. message: '操作成功',
  1999. type: 'success',
  2000. duration: 1500,
  2001. onClose: () => {},
  2002. })
  2003. } else {
  2004. this.$alert(data.msg, '错误', {
  2005. confirmButtonText: '确定',
  2006. })
  2007. }
  2008. })
  2009. })
  2010. .catch(() => {})
  2011. },
  2012. // 动态列开始 获取 用户保存的 格式列
  2013. async getTableUserColumn(tableId, columnId) {
  2014. let queryTableUser = {
  2015. userId: this.$store.state.user.name,
  2016. functionId: this.$route.meta.menuId,
  2017. tableId: tableId,
  2018. status: true,
  2019. languageCode: this.$i18n.locale,
  2020. }
  2021. await getTableUserListLanguage(queryTableUser).then(({ data }) => {
  2022. if (data.rows.length > 0) {
  2023. //this.columnList1 = []
  2024. switch (columnId) {
  2025. case 1:
  2026. this.columnList = data.rows
  2027. break
  2028. case 2:
  2029. this.columnList2 = data.rows
  2030. break
  2031. case 3:
  2032. this.columnList3 = data.rows
  2033. break
  2034. case 4:
  2035. this.columnList4 = data.rows
  2036. break
  2037. }
  2038. } else {
  2039. this.getColumnList(tableId, columnId)
  2040. }
  2041. })
  2042. },
  2043. // 获取 tableDefault 列
  2044. async getColumnList(tableId, columnId) {
  2045. let queryTable = {
  2046. functionId: this.$route.meta.menuId,
  2047. tableId: tableId,
  2048. languageCode: this.$i18n.locale,
  2049. }
  2050. await getTableDefaultListLanguage(queryTable).then(({ data }) => {
  2051. if (!data.rows.length == 0) {
  2052. switch (columnId) {
  2053. case 1:
  2054. this.columnList = data.rows
  2055. break
  2056. case 2:
  2057. this.columnList2 = data.rows
  2058. break
  2059. case 3:
  2060. this.columnList3 = data.rows
  2061. break
  2062. case 4:
  2063. this.columnList4 = data.rows
  2064. break
  2065. }
  2066. } else {
  2067. // this.showDefault = true.
  2068. }
  2069. })
  2070. },
  2071. //获取按钮的权限数据
  2072. getButtonAuthData() {
  2073. let searchFlag = this.isAuth(this.menuId + ':search')
  2074. let saveFlag = this.isAuth(this.menuId + ':save')
  2075. let updateFlag = this.isAuth(this.menuId + ':update')
  2076. let deleteFlag = this.isAuth(this.menuId + ':delete')
  2077. //处理页面的权限数据
  2078. this.authSearch = !searchFlag
  2079. this.authSave = !saveFlag
  2080. this.authUpdate = !updateFlag
  2081. this.authDelete = !deleteFlag
  2082. },
  2083. searchTable() {},
  2084. getAllNotifyStatus() {
  2085. let inData = {
  2086. site: this.$store.state.user.site,
  2087. listName: 'ISSUENOTIFYHEADER_STATUS',
  2088. locale: this.$i18n.locale,
  2089. }
  2090. getAllNotifyStatus(inData).then(({ data }) => {
  2091. this.notifyStatusList = data
  2092. console.log('notifyStatusList', this.notifyStatusList)
  2093. })
  2094. },
  2095. },
  2096. }
  2097. </script>
  2098. <style scoped>
  2099. .board666 .el-table .error-row {
  2100. background: #f86868;
  2101. }
  2102. /* 在 <style scoped> 下,使用深度选择器作用到 ElementUI 内部结构 */
  2103. .issueNotify {
  2104. width: 100%;
  2105. height: auto;
  2106. }
  2107. .issueNotify /deep/ .el-form-item__content {
  2108. display: inline !important;
  2109. }
  2110. .site-content > .el-tabs > .el-tabs__content > .site-tabs__tools {
  2111. top: 35px;
  2112. height: 40px;
  2113. font-size: 16px;
  2114. line-height: 40px;
  2115. }
  2116. .text-right /deep/ .el-input__inner {
  2117. text-align: right !important;
  2118. }
  2119. .text-right /deep/ .el-input-number__input {
  2120. text-align: right !important;
  2121. }
  2122. .yzzTable /deep/.el-table .cell {
  2123. line-height: 20px;
  2124. font-size: 12px;
  2125. height: 20px;
  2126. }
  2127. </style>
  2128. <style scoped>
  2129. /* 选择工单弹窗:紧凑表格与按钮样式 */
  2130. .choose-sos-btn {
  2131. height: 14px;
  2132. box-sizing: border-box;
  2133. padding: 0 6px;
  2134. line-height: 12px;
  2135. font-size: 12px;
  2136. display: inline-flex;
  2137. align-items: center;
  2138. justify-content: center;
  2139. }
  2140. </style>