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.

2297 lines
73 KiB

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