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.

1445 lines
53 KiB

9 months ago
6 months ago
9 months ago
6 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
  1. <template>
  2. <div class="customer-css">
  3. <el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners" width="920px" style="height: 680px;" class="customer-dialog">
  4. <el-form :inline="true" label-position="top" style="height: 495px;" label-width="80px">
  5. <!-- 菜单信息 -->
  6. <el-row>
  7. <el-col :span="24">
  8. <el-form-item :label=labels.currentTime>
  9. <el-date-picker disabled="disabled" style="width: 145px;"
  10. v-model="pageData.reportedTime"
  11. format="yyyy-MM-dd HH:mm:ss"
  12. value-format="yyyy-MM-dd HH:mm:ss"
  13. placeholder="">
  14. </el-date-picker>
  15. </el-form-item>
  16. <el-form-item class="customer-button">
  17. <el-button class="customer-bun-min" type="primary" @click="refreshPageData" style="margin-left: 10px; margin-bottom: 5px;">
  18. {{buttons.refreshButton}}</el-button>
  19. </el-form-item>
  20. <el-form-item class="customer-button">
  21. <el-button class="customer-bun-min" :disabled="buttonTags.finishRollFlag" type="primary" @click="finishRollBun" style="margin-left: 10px; margin-bottom: 5px;">
  22. {{buttons.finishRoll}}</el-button>
  23. </el-form-item>
  24. <el-form-item class="customer-button">
  25. <el-button class="customer-bun-min" type="primary" @click="closeDialog" style="margin-left: 10px; margin-bottom: 5px;">
  26. {{buttons.closeButton}}</el-button>
  27. </el-form-item>
  28. <el-form-item label=" ">
  29. <el-button type="primary" @click="openAttendanceModal" style="margin-left: 10px">考勤修改</el-button>
  30. </el-form-item>
  31. <!-- <el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>-->
  32. </el-col>
  33. </el-row>
  34. <!-- 卷数量统计 班次信息 -->
  35. <el-form>
  36. <fieldset class="customer-fieldset" style="width: 495px;">
  37. <legend>{{labels.rollQtySum}}</legend>
  38. <el-form-item class="customer-item">
  39. <el-checkbox disabled="disabled" style="margin-top: 15px;" true-label="Y" false-label="N"
  40. v-model="pageData.reportedFlag">{{labels.whetherReport}}</el-checkbox>
  41. </el-form-item>
  42. <el-form-item class="customer-item" :label=labels.approvedQty style="margin-top: -10px;">
  43. <!--<el-input v-model="pageData.approvedQty" type="number" @blur="checkValidApprovedQty"-->
  44. <el-input v-if="this.preItemNo<=0" v-model="pageData.approvedQty" @blur="checkValidApprovedQty" type="number" style="width: 80px;" ></el-input>
  45. <el-input v-if="this.preItemNo>0" disabled class="customer-input-color-red" v-model="pageData.approvedQty" @blur="checkValidApprovedQty" type="number" style="width: 80px;" ></el-input>
  46. </el-form-item>
  47. <el-form-item class="customer-item" :label=labels.defectedQty style="margin-top: -10px;">
  48. <el-input v-model="pageData.defectedQty" :disabled="showNumFlag" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  49. </el-form-item>
  50. <el-form-item class="customer-item" :label=labels.totalQty style="margin-top: -10px;">
  51. <el-input v-model="pageData.totalQty" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  52. </el-form-item>
  53. <el-form-item class="customer-item" :label=labels.otherRollQty style="margin-top: -10px;">
  54. <el-input v-model="pageData.otherRollQty" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  55. </el-form-item>
  56. </fieldset>
  57. <!-- 操作员信息和班次信息 -->
  58. <fieldset class="customer-fieldset"
  59. style="margin-left: 500px; margin-top: -70px; width: 400px;">
  60. <legend>{{labels.operatorScheduleInfo}}</legend>
  61. <el-form-item class="customer-item" :label=labels.operatorId>
  62. <el-input v-model="operatorData.operatorId" disabled="disabled" style="width: 80px;" ></el-input>
  63. </el-form-item>
  64. <el-form-item class="customer-item" :label=labels.operatorName>
  65. <el-input v-model="operatorData.operatorName" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  66. </el-form-item>
  67. <el-form-item class="customer-item" :label=labels.scheduledDate>
  68. <el-input v-model="pageData.scheduledDate" disabled="disabled" style="width: 80px;" ></el-input>
  69. </el-form-item>
  70. <el-form-item class="customer-item" :label=labels.shiftNo>
  71. <el-input v-model="pageData.shiftDesc" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  72. </el-form-item>
  73. <el-button type="info" :disabled="buttonTags.selectShiftFlag" plain @click="selectSchduleShiftModal"
  74. style="margin-left: -10px; margin-top: 10px; height: 20px; padding: 3px 3px;">
  75. <icon-svg name="ellipsis" style="height: 10px; width: 10px;" ></icon-svg>
  76. </el-button>
  77. </fieldset>
  78. </el-form>
  79. <!-- 卷生产时间统计产量报告 -->
  80. <el-form style="margin-top: 5px;">
  81. <fieldset class="customer-fieldset" style="width: 320px; margin-top: 0px;">
  82. <legend>{{labels.rollTimeSum}}</legend>
  83. <!-- 调机时间 -->
  84. <el-row style="margin-top: 0px;">
  85. <el-col :span="24">
  86. <el-form-item :label=labels.totalTuningTime >
  87. <el-input v-model="pageData.totalSetupTime" class="customer-input-color-red" readonly="readonly" style="width: 80px;" ></el-input>
  88. </el-form-item>
  89. <el-form-item :label=labels.totalTuningDownTime >
  90. <el-input v-model="pageData.totalDowntimeTimeSetup" class="customer-input-color-red" readonly="readonly" style="width: 100px;"></el-input>
  91. </el-form-item>
  92. <el-form-item :label=labels.totalPureTuningTime >
  93. <el-input v-model="pageData.totalPureSetupTime" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  94. </el-form-item>
  95. </el-col>
  96. </el-row>
  97. <!-- 生产时间 -->
  98. <el-row>
  99. <el-col :span="24">
  100. <el-form-item :label=labels.totalProdTime>
  101. <el-input v-model="pageData.totalProdTime" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  102. </el-form-item>
  103. <el-form-item :label=labels.totalProdDownTime>
  104. <el-input v-model="pageData.totalDowntimeTimeProd" class="customer-input-color-red" readonly="readonly" style="width: 100px;"></el-input>
  105. </el-form-item>
  106. <el-form-item :label=labels.totalPureProdTime >
  107. <el-input v-model="pageData.totalPureProdTime" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  108. </el-form-item>
  109. </el-col>
  110. </el-row>
  111. <!-- 制造时间 -->
  112. <el-row>
  113. <el-col :span="24">
  114. <el-form-item :label=labels.totalManufTime>
  115. <el-input v-model="pageData.totalManufactureTime" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  116. </el-form-item>
  117. <el-form-item :label=labels.totalManufDownTime>
  118. <el-input v-model="pageData.totalManufactureDowntimeTime" class="customer-input-color-red" readonly="readonly" style="width: 100px;"></el-input>
  119. </el-form-item>
  120. <el-form-item :label=labels.totalPureManufTime>
  121. <el-input v-model="pageData.totalPureManufactureTime" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  122. </el-form-item>
  123. </el-col>
  124. </el-row>
  125. </fieldset>
  126. <!-- 产量报告 -->
  127. <fieldset class="customer-fieldset" style="margin-left: 325px; margin-top: -165px; width: 575px;">
  128. <legend>{{ labels.produceReport }}</legend>
  129. <!-- 开工时间 -->
  130. <el-row>
  131. <el-col :span="24">
  132. <el-form-item :label=labels.startTime>
  133. <el-input v-model="pageData.eventTime" disabled="disabled" style="width: 130px;"></el-input>
  134. </el-form-item>
  135. <el-form-item :label=labels.finishTime>
  136. <el-input v-model="pageData.tillTime" disabled="disabled" style="width: 130px;"></el-input>
  137. </el-form-item>
  138. <el-form-item :label=labels.prodTime >
  139. <el-input v-model="pageData.sfdcProdTime" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  140. </el-form-item>
  141. <el-form-item :label=labels.tuningTime>
  142. <el-input v-model="pageData.sfdcSetupTime" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  143. </el-form-item>
  144. <el-form-item :label=labels.manufTime>
  145. <el-input v-model="pageData.sfdcManufactureTime" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  146. </el-form-item>
  147. </el-col>
  148. </el-row>
  149. <!-- 合格数量 -->
  150. <el-row>
  151. <el-col :span="24">
  152. <el-form-item :label=labels.sfdcApprovedQty>
  153. <el-input v-model="pageData.sfdcApprovedQty" class="customer-input-color-red" readonly="readonly" style="width: 130px;"></el-input>
  154. </el-form-item>
  155. <el-form-item :label=labels.sfdcDefectedQty>
  156. <el-input v-model="pageData.defectedQty" class="customer-input-color-red" readonly="readonly" style="width: 130px;"></el-input>
  157. </el-form-item>
  158. <el-form-item :label=labels.sfdcReportedQty >
  159. <el-input v-model="pageData.sfdcReportedQty" class="customer-input-color-red" readonly="readonly" style="width: 80px;"></el-input>
  160. </el-form-item>
  161. <el-form-item :label=labels.tuningDown>
  162. <el-input v-model="pageData.sfdcSetupDownTime" style="width: 80px;"></el-input>
  163. </el-form-item>
  164. <el-form-item :label=labels.manufTuning >
  165. <el-input v-model="pageData.sfdcProdSetupTime" style="width: 80px;"></el-input>
  166. </el-form-item>
  167. </el-col>
  168. </el-row>
  169. <!-- 备注 -->
  170. <el-row>
  171. <el-col :span="24">
  172. <el-form-item :label=labels.remark>
  173. <el-input v-model="pageData.remark" style="width: 430px;"></el-input>
  174. </el-form-item>
  175. <el-form-item :label=labels.downTime>
  176. <el-input v-model="pageData.sfdcDownTime" style="width: 80px;"></el-input>
  177. </el-form-item>
  178. </el-col>
  179. </el-row>
  180. </fieldset>
  181. </el-form>
  182. <!-- 主材料 -->
  183. <el-form>
  184. <fieldset class="customer-fieldset" style="width: 830px;">
  185. <legend>{{labels.primaryMaterial}}</legend>
  186. <el-table
  187. height="180"
  188. :data="sfdcMaterialList"
  189. border
  190. v-loading="dataListLoading"
  191. style="width: 100%; margin-top: -5px;">
  192. <el-table-column
  193. v-for="(item,index) in columnMaterialArray" :key="index"
  194. :sortable="item.columnSortable"
  195. :prop="item.columnProp"
  196. :header-align="item.headerAlign"
  197. :show-overflow-tooltip="item.showOverflowTooltip"
  198. :align="item.align"
  199. :fixed="item.fixed==''?false:item.fixed"
  200. :width="item.columnWidth"
  201. :label="item.columnLabel">
  202. <template slot-scope="scope">
  203. <!--<el-input type="number" class="table-input" align="right" @blur="checkValidQty(scope.row)"-->
  204. <el-input type="number" class="table-input" align="right" v-if="item.columnHidden"
  205. v-model="scope.row[item.columnProp]"></el-input>
  206. <span v-else>{{scope.row[item.columnProp]}}</span>
  207. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  208. style="width: 100px; height: 80px"/></span>
  209. </template>
  210. </el-table-column>
  211. </el-table>
  212. </fieldset>
  213. </el-form>
  214. </el-form>
  215. </el-dialog>
  216. <!-- 异常原因录入的组件 -->
  217. <comExceptionReason ref="comExceptionReason" :close-on-click-modal="false"
  218. :visible.sync="showExceptionFlag"
  219. @initExceptionReason = "initExceptionReason">
  220. </comExceptionReason>
  221. <!-- 班次选择组件 -->
  222. <comSelectShift ref="comSelectShift" :close-on-click-modal="false"
  223. :visible.sync="showShiftFlag"
  224. @initScheduleShift = "initScheduleShift">
  225. </comSelectShift>
  226. <!--打印卷标签-->
  227. <com-roll-label ref="comRollLabel"></com-roll-label>
  228. <!-- 操作员切换(考勤修改) -->
  229. <comSwitchOperator ref="comSwitchOperator" :close-on-click-modal="false"
  230. :visible.sync="showOperatorFlag">
  231. </comSwitchOperator>
  232. </div>
  233. </template>
  234. <script>
  235. import comRollLabel from "../common/com-roll-label";/*打印卷标签*/
  236. /*添加组件*/
  237. import comExceptionReason from "./com_exception_reason";//异常远远
  238. import comSelectShift from "./com_select_shift";//班次选择的组件
  239. import comSwitchOperator from './com_switch_operator';//操作员切换(考勤修改)
  240. import {
  241. getCurrentRollReportedQty,
  242. countSfdcTimeQty,
  243. getScheduleShiftData,
  244. getSfdcTimeMaxAndMinTime,
  245. getSfdcTimeData,
  246. getSfdcReportedData,
  247. getSfdcMaterialByRollNo,
  248. checkFinishRollWithNoFqc,
  249. finishRollWithNoFqc,
  250. getSORoutingPreviousOperationItemNo,
  251. getSfdcFlowLabelData,/*执行打印的请求*/
  252. } from '@/api/yieldReport/com_finish_roll.js';
  253. /*打印标签专用的js*/
  254. import {
  255. printSfdcLabel,
  256. } from "@/views/modules/yieldReport/print_roll_label.js";
  257. import {
  258. searchSysLanguagePackList,
  259. searchSysLanguageParam,
  260. searchFunctionButtonList,
  261. saveButtonList,
  262. searchSysLanguage,
  263. searchLanguageListByLanguageCode,
  264. saveSysLanguageOne,
  265. searchPageLanguageData,
  266. removerLanguage,
  267. saveSysLanguageList
  268. } from "@/api/sysLanguage.js";
  269. var functionId = 'C10000005';
  270. export default {
  271. name: "com_finish_roll",
  272. data() {
  273. return {
  274. titleCon: '结束卷',
  275. showDefault: false,
  276. showExceptionFlag: false,
  277. showShiftFlag: false,
  278. showOperatorFlag: false,
  279. showNumFlag:false,
  280. sfdcTimeList: [],
  281. preItemNo: 0,
  282. scheduleData: {
  283. site: this.$store.state.user.site,
  284. username: this.$store.state.user.name,
  285. seqNo: '',
  286. orderNo: '',
  287. itemNo: 0,
  288. partNo: '',
  289. workCenterNo: '',
  290. workCenterDesc: '',
  291. resourceDesc: '',
  292. rollNo: '',
  293. partDesc: '',
  294. planStartTime: '',
  295. planFinishTime: '',
  296. qtyRequiredOriginal: 0,
  297. reportedTime: this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'),
  298. scheduledDate: '',
  299. shiftNo: '',
  300. preItemDesc: '',
  301. nextItemDesc: '',
  302. nextItemNo: 0,
  303. operatorId: '',
  304. functionName: '',
  305. currentRollFlag: false
  306. },
  307. pageData: {
  308. site: this.$store.state.user.site,
  309. username: this.$store.state.user.name,
  310. orderNo: '',
  311. itemNo: 0,
  312. seqNo: '',
  313. rollNo: '',
  314. resourceId: '',
  315. scheduledDate: '',
  316. shiftNo: '',
  317. reportedTime: this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'),
  318. reportedFlag: 'N',
  319. approvedQty: 0,
  320. defectedQty: 0,
  321. totalQty: 0,
  322. editNewRollQty: 0,
  323. otherRollQty: '',
  324. shiftDesc: '',
  325. totalSetupTime: 0,
  326. totalDowntimeTimeSetup: 0,
  327. totalPureSetupTime: 0,
  328. totalProdTime: 0,
  329. totalDowntimeTimeProd: 0,
  330. totalPureProdTime: 0,
  331. totalManufactureTime: 0,
  332. totalManufactureDowntimeTime: 0,
  333. totalPureManufactureTime: 0,
  334. sfdcProdTime: 0,//生产时间
  335. sfdcSetupTime: 0,//调机时间
  336. sfdcManufactureTime: 0,//制造时间
  337. sfdcSetupDownTime: 0,//调机停机时间
  338. sfdcProdSetupTime: 0,//生产调机时间
  339. sfdcDownTime: 0,//停机时间
  340. eventTime: '',
  341. tillTime: '',
  342. sfdcApprovedQty: 0,
  343. sfdcDefectedQty: 0,
  344. sfdcReportedQty: 0,
  345. remark: '',
  346. exceptionFlag: 'N',
  347. exceptionReason: '',
  348. operatorId: '',
  349. operatorName: '',
  350. createNewRollFlag: 'N',
  351. },
  352. operatorData: {
  353. site: this.$store.state.user.site,
  354. username: this.$store.state.user.name,
  355. operatorId: '',
  356. operatorName: '',
  357. status: '',
  358. seqNo: '',
  359. showFlag: false
  360. },
  361. sfdcMaterialList: [],
  362. columnMaterialArray: [
  363. {
  364. userId: this.$store.state.user.name,
  365. functionId: 5303,
  366. serialNumber: '5303MaterialReportDate',
  367. tableId: "5303Material",
  368. tableName: "派工单材料",
  369. columnProp: "reportDate",
  370. headerAlign: "center",
  371. align: "center",
  372. columnLabel: "报告时间",
  373. columnWidth: 125,
  374. columnHidden: false,
  375. columnImage: false,
  376. columnSortable: false,
  377. sortLv: 0,
  378. status: true,
  379. fixed: false
  380. },
  381. {
  382. userId: this.$store.state.user.name,
  383. functionId: 5303,
  384. serialNumber: '5303MaterialReportedBy',
  385. tableId: "5303Material",
  386. tableName: "派工单材料",
  387. columnProp: "reportedBy",
  388. headerAlign: "center",
  389. align: "center",
  390. columnLabel: "报告人",
  391. columnWidth: 80,
  392. columnHidden: false,
  393. columnImage: false,
  394. columnSortable: false,
  395. sortLv: 0,
  396. status: true,
  397. fixed: false
  398. },
  399. {
  400. userId: this.$store.state.user.name,
  401. functionId: 5303,
  402. serialNumber: '5303MaterialRmRollNo',
  403. tableId: "5303Material",
  404. tableName: "派工单材料",
  405. columnProp: "rmRollNo",
  406. headerAlign: "center",
  407. align: "center",
  408. columnLabel: "材料卷号",
  409. columnWidth: 100,
  410. columnHidden: false,
  411. columnImage: false,
  412. columnSortable: false,
  413. sortLv: 0,
  414. status: true,
  415. fixed: false
  416. },
  417. {
  418. userId: this.$store.state.user.name,
  419. functionId: 5303,
  420. serialNumber: '5303MaterialPartNo',
  421. tableId: "5303Material",
  422. tableName: "派工单材料",
  423. columnProp: "partNo",
  424. headerAlign: "center",
  425. align: "center",
  426. columnLabel: "零部件编码",
  427. columnWidth: 100,
  428. columnHidden: false,
  429. columnImage: false,
  430. columnSortable: false,
  431. sortLv: 0,
  432. status: true,
  433. fixed: false
  434. },
  435. {
  436. userId: this.$store.state.user.name,
  437. functionId: 5303,
  438. serialNumber: '5303MaterialStartDate',
  439. tableId: "5303Material",
  440. tableName: "派工单材料",
  441. columnProp: "startDate",
  442. headerAlign: "center",
  443. align: "center",
  444. columnLabel: "开始使用时间",
  445. columnWidth: 125,
  446. columnHidden: false,
  447. columnImage: false,
  448. columnSortable: false,
  449. sortLv: 0,
  450. status: true,
  451. fixed: false
  452. },
  453. {
  454. userId: this.$store.state.user.name,
  455. functionId: 5303,
  456. serialNumber: '5303MaterialTransQty',
  457. tableId: "5303Material",
  458. tableName: "派工单材料",
  459. columnProp: "transQty",
  460. headerAlign: "center",
  461. align: "center",
  462. columnLabel: "数量",
  463. columnWidth: 80,
  464. columnHidden: false,
  465. columnImage: false,
  466. columnSortable: false,
  467. sortLv: 0,
  468. status: true,
  469. fixed: false
  470. },
  471. {
  472. userId: this.$store.state.user.name,
  473. functionId: 5303,
  474. serialNumber: '5303MaterialNetIssueQty',
  475. tableId: "5303Material",
  476. tableName: "派工单材料",
  477. columnProp: "netIssueQty",
  478. headerAlign: "center",
  479. align: "center",
  480. columnLabel: "本卷耗用数量",
  481. columnWidth: 100,
  482. columnHidden: false,
  483. columnImage: false,
  484. columnSortable: false,
  485. sortLv: 0,
  486. status: true,
  487. fixed: false
  488. },
  489. {
  490. userId: this.$store.state.user.name,
  491. functionId: 5303,
  492. serialNumber: '5303MaterialKeyRMFlag',
  493. tableId: "5303Material",
  494. tableName: "派工单材料",
  495. columnProp: "keyRMFlag",
  496. headerAlign: "center",
  497. align: "center",
  498. columnLabel: "是否主材",
  499. columnWidth: 80,
  500. columnHidden: false,
  501. columnImage: false,
  502. columnSortable: false,
  503. sortLv: 0,
  504. status: true,
  505. fixed: false
  506. },
  507. {
  508. userId: this.$store.state.user.name,
  509. functionId: 5303,
  510. serialNumber: '5303MaterialSAPBOMItemNo',
  511. tableId: "5303Material",
  512. tableName: "派工单材料",
  513. columnProp: "sAPBOMItemNo",
  514. headerAlign: "center",
  515. align: "center",
  516. columnLabel: "SAP BOM序号",
  517. columnWidth: 100,
  518. columnHidden: false,
  519. columnImage: false,
  520. columnSortable: false,
  521. sortLv: 0,
  522. status: true,
  523. fixed: false
  524. }
  525. ],
  526. buttonTags:{
  527. selectShiftFlag: true,
  528. finishRollFlag: true,
  529. },
  530. dataListLoading: false,
  531. buttons: {
  532. refreshButton: '刷新',
  533. finishRoll: '结束卷',
  534. closeButton: '关闭',
  535. },
  536. buttonList: [
  537. {
  538. functionId: functionId,
  539. languageValue: '刷新',
  540. objectId: 'refreshButton',
  541. objectType: 'button',
  542. tableId: '*'
  543. }, {
  544. functionId: functionId,
  545. languageValue: '结束卷',
  546. objectId: 'finishRoll',
  547. objectType: 'button',
  548. tableId: '*'
  549. }, {
  550. functionId: functionId,
  551. languageValue: '关闭',
  552. objectId: 'closeButton',
  553. objectType: 'button',
  554. tableId: '*'
  555. },
  556. ],
  557. queryButton: {
  558. functionId: functionId,
  559. table_id: '*',
  560. languageCode: this.$i18n.locale,
  561. objectType: 'button'
  562. },
  563. labels: {
  564. titleCon: '结束卷操作 ',
  565. seqNoName: '派工单号:',
  566. currentTime: '当前时间',
  567. rollQtySum: '卷数量统计',
  568. whetherReport: '是否报告产量',
  569. approvedQty: '总良品数量',
  570. defectedQty: '总不良品数量',
  571. totalQty: '总数量',
  572. otherRollQty: '其他卷数量',
  573. operatorScheduleInfo: '人员排程班次信息',
  574. operatorId: '操作员',
  575. operatorName: '操作员姓名',
  576. scheduledDate: '排产日期',
  577. shiftNo: '班次',
  578. rollTimeSum: '卷生产时间统计',
  579. totalTuningTime: '总调机时间',
  580. totalTuningDownTime: '总调机过程停机时间',
  581. totalPureTuningTime: '净调机时间',
  582. totalProdTime: '总生产时间',
  583. totalProdDownTime: '总生产过程停机时间',
  584. totalPureProdTime: '净生产时间',
  585. totalManufTime: '总制造时间',
  586. totalManufDownTime: '总制造过程停机时间 ',
  587. totalPureManufTime: '净制造时间:',
  588. produceReport: '产量报告',
  589. startTime: '开工时间',
  590. finishTime: '完工时间',
  591. prodTime: '生产时间',
  592. tuningTime: '调机时间',
  593. manufTime: '制造时间',
  594. sfdcApprovedQty: '合格数量',
  595. sfdcDefectedQty: '不合格数量',
  596. sfdcReportedQty: '报告数量',
  597. tuningDown: '调机停机',
  598. manufTuning: '生产调机',
  599. remark: '备注',
  600. downTime: '停机时间',
  601. primaryMaterial: '主材料 ',
  602. noShiftNo: '无班次',
  603. materialConsumedCantBeNull: '材料上本卷耗用数量不能为空!',
  604. materialConsumedMustMoreTanZero: '材料耗用数量必须大于0!',
  605. materialConsumedMoreTanDelivery: '材料耗用数量大于发料数量!',
  606. approvedQtyMustMoreTanZero: '良品总数量必须大于等于0!',
  607. noMatchShiftInfo: '该时间段内没有匹配的班次信息,请联系相关人员!',
  608. confirmLabel: '确认',
  609. cancelLabel: '取消',
  610. },
  611. labelsList: [
  612. {
  613. functionId: functionId,
  614. languageValue: '结束卷操作 ',
  615. objectId: 'titleCon',
  616. objectType: 'label',
  617. tableId: '*'
  618. }, {
  619. functionId: functionId,
  620. languageValue: '派工单号:',
  621. objectId: 'seqNoName',
  622. objectType: 'label',
  623. tableId: '*'
  624. }, {
  625. functionId: functionId,
  626. languageValue: '当前时间',
  627. objectId: 'currentTime',
  628. objectType: 'label',
  629. tableId: '*'
  630. }, {
  631. functionId: functionId,
  632. languageValue: '卷数量统计 ',
  633. objectId: 'rollQtySum',
  634. objectType: 'label',
  635. tableId: '*'
  636. }, {
  637. functionId: functionId,
  638. languageValue: '是否报告产量 ',
  639. objectId: 'whetherReport',
  640. objectType: 'label',
  641. tableId: '*'
  642. }, {
  643. functionId: functionId,
  644. languageValue: '总良品数量',
  645. objectId: 'approvedQty',
  646. objectType: 'label',
  647. tableId: '*'
  648. }, {
  649. functionId: functionId,
  650. languageValue: '总不良品数量',
  651. objectId: 'defectedQty',
  652. objectType: 'label',
  653. tableId: '*'
  654. }, {
  655. functionId: functionId,
  656. languageValue: '总数量',
  657. objectId: 'totalQty',
  658. objectType: 'label',
  659. tableId: '*'
  660. }, {
  661. functionId: functionId,
  662. languageValue: '其他卷数量',
  663. objectId: 'otherRollQty',
  664. objectType: 'label',
  665. tableId: '*'
  666. }, {
  667. functionId: functionId,
  668. languageValue: '人员排程班次信息',
  669. objectId: 'operatorScheduleInfo',
  670. objectType: 'label',
  671. tableId: '*'
  672. }, {
  673. functionId: functionId,
  674. languageValue: '操作员',
  675. objectId: 'operatorId',
  676. objectType: 'label',
  677. tableId: '*'
  678. }, {
  679. functionId: functionId,
  680. languageValue: '操作员姓名',
  681. objectId: 'operatorName',
  682. objectType: 'label',
  683. tableId: '*'
  684. }, {
  685. functionId: functionId,
  686. languageValue: '排产日期',
  687. objectId: 'scheduledDate',
  688. objectType: 'label',
  689. tableId: '*'
  690. }, {
  691. functionId: functionId,
  692. languageValue: '班次',
  693. objectId: 'shiftNo',
  694. objectType: 'label',
  695. tableId: '*'
  696. }, {
  697. functionId: functionId,
  698. languageValue: '卷生产时间统计',
  699. objectId: 'rollTimeSum',
  700. objectType: 'label',
  701. tableId: '*'
  702. }, {
  703. functionId: functionId,
  704. languageValue: '总调机时间',
  705. objectId: 'totalTuningTime',
  706. objectType: 'label',
  707. tableId: '*'
  708. }, {
  709. functionId: functionId,
  710. languageValue: '总调机过程停机时间',
  711. objectId: 'totalTuningDownTime',
  712. objectType: 'label',
  713. tableId: '*'
  714. }, {
  715. functionId: functionId,
  716. languageValue: '净调机时间',
  717. objectId: 'totalPureTuningTime',
  718. objectType: 'label',
  719. tableId: '*'
  720. }, {
  721. functionId: functionId,
  722. languageValue: '总生产时间',
  723. objectId: 'totalProdTime',
  724. objectType: 'label',
  725. tableId: '*'
  726. }, {
  727. functionId: functionId,
  728. languageValue: '总生产过程停机时间',
  729. objectId: 'totalProdDownTime',
  730. objectType: 'label',
  731. tableId: '*'
  732. }, {
  733. functionId: functionId,
  734. languageValue: '净生产时间',
  735. objectId: 'totalPureProdTime',
  736. objectType: 'label',
  737. tableId: '*'
  738. }, {
  739. functionId: functionId,
  740. languageValue: '总制造时间',
  741. objectId: 'totalManufTime',
  742. objectType: 'label',
  743. tableId: '*'
  744. }, {
  745. functionId: functionId,
  746. languageValue: '总制造过程停机时间',
  747. objectId: 'totalManufDownTime',
  748. objectType: 'label',
  749. tableId: '*'
  750. }, {
  751. functionId: functionId,
  752. languageValue: '净制造时间',
  753. objectId: 'totalPureManufTime',
  754. objectType: 'label',
  755. tableId: '*'
  756. }, {
  757. functionId: functionId,
  758. languageValue: '产量报告',
  759. objectId: 'roduceReport',
  760. objectType: 'label',
  761. tableId: '*'
  762. }, {
  763. functionId: functionId,
  764. languageValue: '开工时间 ',
  765. objectId: 'startTime',
  766. objectType: 'label',
  767. tableId: '*'
  768. }, {
  769. functionId: functionId,
  770. languageValue: '完工时间:',
  771. objectId: 'finishTime',
  772. objectType: 'label',
  773. tableId: '*'
  774. }, {
  775. functionId: functionId,
  776. languageValue: '生产时间',
  777. objectId: 'prodTime',
  778. objectType: 'label',
  779. tableId: '*'
  780. }, {
  781. functionId: functionId,
  782. languageValue: '调机时间',
  783. objectId: 'tuningTime',
  784. objectType: 'label',
  785. tableId: '*'
  786. }, {
  787. functionId: functionId,
  788. languageValue: '制造时间',
  789. objectId: 'manufTime',
  790. objectType: 'label',
  791. tableId: '*'
  792. }, {
  793. functionId: functionId,
  794. languageValue: '合格数量',
  795. objectId: 'sfdcApprovedQty',
  796. objectType: 'label',
  797. tableId: '*'
  798. }, {
  799. functionId: functionId,
  800. languageValue: '不合格数量',
  801. objectId: 'sfdcDefectedQty',
  802. objectType: 'label',
  803. tableId: '*'
  804. }, {
  805. functionId: functionId,
  806. languageValue: '报告数量',
  807. objectId: 'sfdcReportedQty',
  808. objectType: 'label',
  809. tableId: '*'
  810. }, {
  811. functionId: functionId,
  812. languageValue: '调机停机',
  813. objectId: 'tuningDown',
  814. objectType: 'label',
  815. tableId: '*'
  816. }, {
  817. functionId: functionId,
  818. languageValue: '生产调机 ',
  819. objectId: 'manufTuning',
  820. objectType: 'label',
  821. tableId: '*'
  822. }, {
  823. functionId: functionId,
  824. languageValue: '备注',
  825. objectId: 'remark',
  826. objectType: 'label',
  827. tableId: '*'
  828. }, {
  829. functionId: functionId,
  830. languageValue: '停机时间',
  831. objectId: 'downTime',
  832. objectType: 'label',
  833. tableId: '*'
  834. }, {
  835. functionId: functionId,
  836. languageValue: '主材料',
  837. objectId: 'primaryMaterial',
  838. objectType: 'label',
  839. tableId: '*'
  840. }, {
  841. functionId: functionId,
  842. languageValue: '无班次',
  843. objectId: 'noShiftNo',
  844. objectType: 'label',
  845. tableId: '*'
  846. }, {
  847. functionId: functionId,
  848. languageValue: '材料上本卷耗用数量不能为空!',
  849. objectId: 'materialConsumedCantBeNull',
  850. objectType: 'label',
  851. tableId: '*'
  852. }, {
  853. functionId: functionId,
  854. languageValue: '材料耗用数量必须大于0!',
  855. objectId: 'materialConsumedMustMoreTanZero',
  856. objectType: 'label',
  857. tableId: '*'
  858. }, {
  859. functionId: functionId,
  860. languageValue: '材料耗用数量大于发料数量!',
  861. objectId: 'materialConsumedMoreTanDelivery',
  862. objectType: 'label',
  863. tableId: '*'
  864. }, {
  865. functionId: functionId,
  866. languageValue: '良品总数量必须大于等于0!',
  867. objectId: 'approvedQtyMustMoreTanZero',
  868. objectType: 'label',
  869. tableId: '*'
  870. }, {
  871. functionId: functionId,
  872. languageValue: '该时间段内没有匹配的班次信息,请联系相关人员!',
  873. objectId: 'noMatchShiftInfo',
  874. objectType: 'label',
  875. tableId: '*'
  876. }, {
  877. functionId: functionId,
  878. languageValue: '确认 ',
  879. objectId: 'confirmLabel',
  880. objectType: 'label',
  881. tableId: '*'
  882. }, {
  883. functionId: functionId,
  884. languageValue: '取消',
  885. objectId: 'cancelLabel',
  886. objectType: 'label',
  887. tableId: '*'
  888. },
  889. ],
  890. queryLabel: {
  891. functionId: functionId,
  892. table_id: '*',
  893. languageCode: this.$i18n.locale,
  894. objectType: 'label'
  895. },
  896. isFqc:false,
  897. }
  898. },
  899. components: {
  900. comExceptionReason,/*异常原因的组件*/
  901. comSelectShift,/*班次选择的组件*/
  902. comRollLabel,
  903. comSwitchOperator,/*操作员切换(考勤修改)*/
  904. },
  905. methods: {
  906. sORoutingPreviousOperationItemNo(){
  907. getSORoutingPreviousOperationItemNo( this.pageData).then(({data})=>{
  908. if (data.code==0){
  909. if (data.itemNo>0){
  910. this.showNumFlag = true
  911. }else {
  912. this.showNumFlag = false
  913. }
  914. }
  915. })
  916. },
  917. /*初始化页面参数*/
  918. init(scheduleData, operatorData,isFqc) {
  919. this.isFqc = isFqc?true:false
  920. //初始化参数
  921. this.scheduleData = scheduleData;
  922. //初始化参数
  923. this.pageData.orderNo = scheduleData.orderNo;
  924. this.pageData.itemNo = scheduleData.itemNo;
  925. this.pageData.seqNo = scheduleData.seqNo;
  926. this.pageData.rollNo = scheduleData.rollNo;
  927. this.pageData.scheduledDate = scheduleData.scheduledDate;
  928. this.pageData.shiftNo = scheduleData.shiftNo;
  929. this.pageData.resourceId = scheduleData.resourceId;
  930. this.pageData.operatorId = operatorData.operatorId;
  931. this.pageData.operatorName = operatorData.operatorName;
  932. this.preItemNo = scheduleData.preItemNo
  933. //this.scheduleData.reportedTime = this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
  934. //重置时间
  935. this.pageData.reportedTime = this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
  936. //初始化操作员对象
  937. this.operatorData = JSON.parse(JSON.stringify(operatorData));
  938. //初始化标题
  939. this.titleCon = this.labels.titleCon+this.labels.seqNoName+scheduleData.seqNo;
  940. //判断是否启用多语言
  941. // this.getMultiLanguageList(); //刷新多语言的信息
  942. //处理异常的原因
  943. this.pageData.exceptionFlag = 'N';
  944. this.pageData.exceptionReason = '';
  945. //刷新当前派工单的信息
  946. this.refreshPageData();
  947. },
  948. /*关闭modal*/
  949. closeDialog(){
  950. //刷新报工的页面
  951. this.$emit('refreshPageData');
  952. //关闭当前的页面
  953. this.$emit('update:visible', false);
  954. },
  955. /*生产过程的停机组件*/
  956. exceptionReasonModal() {
  957. //1.首先调用菜单判断方式 打开生产过程的停机的页面
  958. //checkProduceButton('produceDownFlag');
  959. //打开生产过程的工具的页面
  960. this.$nextTick(() => {
  961. this.show = true;
  962. this.$refs.comProduceDown.init(this.scheduleData, this.operatorData)
  963. });
  964. },
  965. /*刷新当前的页面参数*/
  966. async refreshPageData(){
  967. //首先关闭报工按钮
  968. this.buttonTags.finishRollFlag = true;
  969. //1.刷新当前卷的报工数据
  970. await getCurrentRollReportedQty(this.scheduleData).then(({data}) => {
  971. this.pageData.approvedQty = data.row.approvedQty;
  972. this.pageData.defectedQty = data.row.defectedQty;
  973. this.pageData.totalQty = data.row.totalQty;
  974. this.pageData.otherRollQty = data.row.otherRollQty;
  975. })
  976. //2.刷新当前卷的时间信息
  977. await countSfdcTimeQty(this.scheduleData).then(({data}) => {
  978. this.pageData.totalSetupTime = data.row.totalSetupTime;
  979. this.pageData.totalDowntimeTimeSetup = data.row.totalDowntimeTimeSetup;
  980. this.pageData.totalPureSetupTime = data.row.totalPureSetupTime;
  981. this.pageData.totalProdTime = data.row.totalProdTime;
  982. this.pageData.totalDowntimeTimeProd = data.row.totalDowntimeTimeProd;
  983. this.pageData.totalPureProdTime = data.row.totalPureProdTime;
  984. this.pageData.totalManufactureTime = data.row.totalManufactureTime.toFixed(2);
  985. this.pageData.totalManufactureDowntimeTime = data.row.totalManufactureDowntimeTime;
  986. this.pageData.totalPureManufactureTime = data.row.totalPureManufactureTime.toFixed(2);
  987. //先预设一些参数 后期方法再计算
  988. //生产时间=总生产时间
  989. this.pageData.sfdcProdTime = this.pageData.totalProdTime;
  990. //调机时间=总调机时间
  991. this.pageData.sfdcSetupTime = this.pageData.totalSetupTime;
  992. //制造时间=总制造时间
  993. this.pageData.sfdcManufactureTime = this.pageData.totalManufactureTime;
  994. //调机停机=总调机过程停机时间
  995. this.pageData.sfdcSetupDownTime = this.pageData.totalDowntimeTimeSetup;
  996. //生产调机=总生产过程停机时间
  997. this.pageData.sfdcProdSetupTime = this.pageData.totalDowntimeTimeProd;
  998. //停机时间=总制造过程停机时间
  999. this.pageData.sfdcDownTime = this.pageData.totalManufactureDowntimeTime;
  1000. });
  1001. //3.刷新派工单的班次信息
  1002. await getScheduleShiftData(this.pageData).then(({data}) => {
  1003. let specialAuth = 'N';
  1004. //区分是否存在班次
  1005. if(data.code == 500){
  1006. this.pageData.shiftDesc = this.labels.noShiftNo;//重置班次
  1007. this.pageData.scheduledDate = '';//重置排产日期
  1008. this.pageData.shiftNo = '';
  1009. }else{
  1010. this.pageData.shiftDesc = data.row.shiftDesc;//重置班次
  1011. this.pageData.scheduledDate = data.row.scheduledDate.substring(0, 10);//重置排产日期
  1012. this.pageData.shiftNo = data.row.shiftNo;
  1013. //设置结果
  1014. specialAuth = data.row.specialAuth;
  1015. }
  1016. //根据不同设置不同的属性
  1017. if("Y" === specialAuth){
  1018. this.buttonTags.selectShiftFlag = false;
  1019. }else{
  1020. this.buttonTags.selectShiftFlag = true;
  1021. }
  1022. });
  1023. //4.刷新当前卷的最早和最晚时间
  1024. await getSfdcTimeMaxAndMinTime(this.scheduleData).then(({data}) => {
  1025. this.pageData.eventTime = data.row.eventTime;
  1026. this.pageData.tillTime = data.row.tillTime;
  1027. });
  1028. //5.刷新当前卷的Sfdc表的时间
  1029. await getSfdcTimeData(this.scheduleData).then(({data}) => {
  1030. //先判断是否成功查询
  1031. if(data.resultCode == 200){
  1032. //判断是否操作成功
  1033. this.pageData.eventTime = data.row.finishTime;
  1034. this.pageData.sfdcProdTime = data.row.sfdcProdTime;
  1035. this.pageData.sfdcSetupTime = data.row.sfdcSetupTime;
  1036. this.pageData.sfdcManufactureTime = data.row.sfdcManufactureTime;
  1037. this.pageData.sfdcDownTime = data.row.sfdcDownTime;
  1038. this.pageData.sfdcSetupDownTime = data.row.sfdcSetupDownTime;
  1039. this.pageData.sfdcProdSetupTime = data.row.sfdcProdSetupTime;
  1040. }else{
  1041. //暂时不处理数据
  1042. }
  1043. });
  1044. //6.刷新当前卷的报工数据
  1045. await getSfdcReportedData(this.scheduleData).then(({data}) => {
  1046. this.pageData.sfdcApprovedQty = this.pageData.approvedQty - data.row.approveQty;
  1047. this.pageData.sfdcDefectedQty = this.pageData.defectedQty - data.row.defectQty;
  1048. this.pageData.sfdcReportedQty = this.pageData.sfdcApprovedQty + this.pageData.sfdcDefectedQty;
  1049. });
  1050. //刷新当前卷的时间数据
  1051. await getSfdcMaterialByRollNo(this.scheduleData).then(({data}) => {
  1052. this.sfdcMaterialList = data.rows;
  1053. //只有数据全部刷新后 才可以报工
  1054. setTimeout(()=>{
  1055. this.buttonTags.finishRollFlag = false;
  1056. }, 1000);
  1057. });
  1058. },
  1059. /*刷新当前卷的报工数据汇总*/
  1060. refreshCurrentRollReportedQty(){
  1061. getCurrentRollReportedQty(this.scheduleData).then(({data}) => {
  1062. this.pageData.approvedQty = data.row.approvedQty;
  1063. this.pageData.defectedQty = data.row.defectedQty;
  1064. this.pageData.totalQty = data.row.totalQty;
  1065. this.pageData.otherRollQty = data.row.otherRollQty;
  1066. })
  1067. },
  1068. //刷新当前卷的时间信息
  1069. refreshCurrentRollTimeQty(){
  1070. countSfdcTimeQty(this.scheduleData).then(({data}) => {
  1071. this.pageData.totalSetupTime = data.row.totalSetupTime;
  1072. this.pageData.totalDowntimeTimeSetup = data.row.totalDowntimeTimeSetup;
  1073. this.pageData.totalPureSetupTime = data.row.totalPureSetupTime;
  1074. this.pageData.totalProdTime = data.row.totalProdTime;
  1075. this.pageData.totalDowntimeTimeProd = data.row.totalDowntimeTimeProd;
  1076. this.pageData.totalPureProdTime = data.row.totalPureProdTime;
  1077. this.pageData.totalManufactureTime = data.row.totalManufactureTime;
  1078. this.pageData.totalManufactureDowntimeTime = data.row.totalManufactureDowntimeTime;
  1079. this.pageData.totalPureManufactureTime = data.row.totalPureManufactureTime;
  1080. });
  1081. },
  1082. //刷新派工单的班次信息
  1083. refreshScheduleShiftData(){
  1084. getScheduleShiftData(this.scheduleData).then(({data}) => {
  1085. //区分是否存在班次
  1086. if(data.code == 500){
  1087. this.pageData.shiftDesc = data.row.shiftDesc;//重置班次
  1088. this.pageData.scheduledDate = '';//重置排产日期
  1089. this.pageData.shiftNo = '';
  1090. }else{
  1091. this.pageData.shiftDesc = data.row.shiftDesc;//重置班次
  1092. this.pageData.scheduledDate = data.row.scheduledDate.substring(0, 10);//重置排产日期
  1093. this.pageData.shiftNo = data.row.shiftNo;
  1094. }
  1095. });
  1096. },
  1097. //刷新当前卷的时间信息
  1098. refreshCurrentRollMaxAndMinTime(){
  1099. getSfdcTimeMaxAndMinTime(this.scheduleData).then(({data}) => {
  1100. this.pageData.eventTime = data.row.eventTime;
  1101. this.pageData.tillTime = data.row.tillTime;
  1102. });
  1103. },
  1104. //刷新当前卷的Sfdc的信息
  1105. refreshSfdcTimeData(){
  1106. getSfdcTimeData(this.scheduleData).then(({data}) => {
  1107. //判断是否操作成功
  1108. this.pageData.eventTime = data.row.finishTime;
  1109. this.pageData.sfdcProdTime = data.row.sfdcProdTime;
  1110. this.pageData.sfdcSetupTime = data.row.sfdcSetupTime;
  1111. this.pageData.sfdcManufactureTime = data.row.sfdcManufactureTime;
  1112. this.pageData.sfdcDownTime = data.row.sfdcDownTime;
  1113. this.pageData.sfdcSetupDownTime = data.row.sfdcSetupDownTime;
  1114. this.pageData.sfdcProdSetupTime = data.row.sfdcProdSetupTime;
  1115. });
  1116. },
  1117. //刷新当前卷的报工数据
  1118. refreshSfdcData(){
  1119. getSfdcReportedData(this.scheduleData).then(({data}) => {
  1120. this.pageData.sfdcApprovedQty = this.pageData.approvedQty - data.row.approveQty;
  1121. this.pageData.sfdcDefectedQty = this.pageData.defectedQty - data.row.defectQty;
  1122. this.pageData.sfdcReportedQty = this.pageData.sfdcApprovedQty + this.pageData.sfdcDefectedQty;
  1123. });
  1124. },
  1125. //刷新当前卷的时间数据
  1126. refreshSfdcMaterialTable(){
  1127. getSfdcMaterialByRollNo(this.scheduleData).then(({data}) => {
  1128. this.sfdcMaterialList = data.rows;
  1129. });
  1130. },
  1131. /*检查数据是否有效*/
  1132. checkValidQty(row){
  1133. //判断当前是否为空
  1134. if(row.netIssueQty == ''){
  1135. this.$message.error(this.labels.materialConsumedCantBeNull);
  1136. row.netIssueQty = 0;//重新赋值
  1137. return false;
  1138. }
  1139. //判断当前是否有效
  1140. if(row.netIssueQty <= 0){
  1141. this.$message.error(this.labels.materialConsumedMustMoreTanZero);
  1142. return false;
  1143. }
  1144. //判断是否超限
  1145. if(row.netIssueQty > row.transQty){
  1146. this.$message.error(this.materialConsumedMoreTanDelivery);
  1147. row.netIssueQty = 0;//重新赋值
  1148. return false;
  1149. }
  1150. },
  1151. // /*添加定制的css类*/
  1152. // customerCellClassName({row, column, rowIndex, columnIndex}) {
  1153. // if(column.property == 'netIssueQty'){
  1154. // return 'customer-number-cell';
  1155. // }
  1156. // },
  1157. //
  1158. // /*添加定制的cess样式*/
  1159. // customerCellStyle({row, column, rowIndex, columnIndex}) {
  1160. // if(column.property == 'netIssueQty'){
  1161. // return 'padding: 0px 0px;';
  1162. // }
  1163. // },
  1164. /*检验良品的总数量*/
  1165. checkValidApprovedQty(){
  1166. //调用刷新的方法
  1167. this.refreshSfdcData();
  1168. this.pageData.totalQty = parseFloat(this.pageData.approvedQty) + parseFloat(this.pageData.defectedQty);
  1169. },
  1170. /*结束当前的操作*/
  1171. finishRollBun(){
  1172. //首先判断数值是否通过判断
  1173. let approvedQty = this.pageData.approvedQty;
  1174. if(approvedQty == null || approvedQty == ''){
  1175. //this.$message.error('请输入良品总数量!');
  1176. this.pageData.approvedQty = 0;//重新赋值
  1177. approvedQty = 0;
  1178. //return false;
  1179. }
  1180. if(approvedQty < 0){
  1181. this.$message.error(this.labels.approvedQtyMustMoreTanZero);
  1182. this.pageData.approvedQty = 0;//重新赋值
  1183. return false;
  1184. }
  1185. //班次判断
  1186. if(this.pageData.shiftDesc == '无班次'){
  1187. this.$message.error(this.labels.noMatchShiftInfo);
  1188. return false;
  1189. }
  1190. //验证通过提交到后台
  1191. let postData = {'pageData': JSON.stringify(this.pageData), 'materialList': JSON.stringify(this.sfdcMaterialList)};
  1192. //先调用检查方法
  1193. checkFinishRollWithNoFqc(postData).then(({data}) => {
  1194. //判断是否成功
  1195. if(data.code == 500 || data.code == 400){
  1196. this.$message.error(data.msg);
  1197. }else if (data.resultMap.resultCode == '201'){
  1198. //打开异常原因录入的界面
  1199. this.$confirm(data.resultMap.resultMsg, '提示', {
  1200. confirmButtonText: this.labels.confirmLabel,
  1201. celButtonText: this.labels.cancelLabel,
  1202. type: 'warning'
  1203. }).then(() => {
  1204. this.showExceptionReasonModal();
  1205. });
  1206. }else{
  1207. //执行结束卷操作
  1208. this.finishRollOperation();
  1209. }
  1210. });
  1211. },
  1212. /*结束卷的具体操作*/
  1213. finishRollOperation(){
  1214. //验证通过提交到后台
  1215. if(this.isFqc ){
  1216. this.pageData.createNewRollFlag ='Y'
  1217. }
  1218. let postData = {'pageData': JSON.stringify(this.pageData), 'materialList': JSON.stringify(this.sfdcMaterialList)};
  1219. //处理信息
  1220. finishRollWithNoFqc(postData).then(({data}) => {
  1221. //判断操作是否成功
  1222. if(data.code == 500){
  1223. this.$message.error(data.msg);
  1224. }else{
  1225. // //判断是否打印卷标签
  1226. // if(data.rollNo != ''){
  1227. // // 是否是FQC出货标签
  1228. // if(this.isFqc ){
  1229. // this.$nextTick(() => {
  1230. // this.$refs.comRollLabel.init(data.rollNo)
  1231. // });
  1232. // }else {
  1233. // //需要打印标签
  1234. // let printRow = {site: this.pageData.site, orderNo: this.pageData.orderNo,
  1235. // rollNo: data.rollNo};
  1236. // this.printSfdcFlowLabel(printRow);
  1237. // }
  1238. // //延时一秒关闭 --预防没有出标签
  1239. // setTimeout(() => {
  1240. // this.closeDialog();
  1241. // }, 1000);
  1242. // }else{
  1243. //关闭当前的页面
  1244. this.closeDialog();
  1245. // }
  1246. }
  1247. })
  1248. },
  1249. /*打开异常原因录入页面*/
  1250. showExceptionReasonModal(){
  1251. //1.首先调用菜单判断方式 打开生产过程的材料的页面
  1252. //checkProduceButton('produceMaterialFlag');
  1253. //打开生产过程的工具的页面
  1254. this.$nextTick(() => {
  1255. this.showExceptionFlag = true;
  1256. this.$refs.comExceptionReason.init();
  1257. });
  1258. },
  1259. /*处理异常的原因*/
  1260. initExceptionReason(exceptionReason){
  1261. //处理异常的原因
  1262. this.pageData.exceptionFlag = 'Y';
  1263. this.pageData.exceptionReason = exceptionReason;
  1264. //然后提交结束卷的数据
  1265. this.finishRollOperation();
  1266. },
  1267. /*打开班次选择页面*/
  1268. selectSchduleShiftModal(){
  1269. //1.首先调用菜单判断方式 打开生产过程的材料的页面
  1270. //checkProduceButton('produceMaterialFlag');
  1271. //打开生产过程的工具的页面
  1272. this.$nextTick(() => {
  1273. this.showShiftFlag = true;
  1274. this.$refs.comSelectShift.init(this.pageData);
  1275. });
  1276. },
  1277. /*修改页面的班次和排产的时间*/
  1278. initScheduleShift(scheduleDate, shiftDesc, username){
  1279. //重置班次和排产的时间
  1280. this.pageData.scheduledDate = scheduleDate.substring(0, 10);
  1281. this.pageData.shiftDesc = shiftDesc;
  1282. this.pageData.shiftNo = shiftDesc;
  1283. this.pageData.remark = username+"更改了班次."
  1284. },
  1285. /*打开考勤修改对话框*/
  1286. openAttendanceModal() {
  1287. //打开操作员切换功能(考勤修改模式)
  1288. this.showOperatorFlag = true;
  1289. this.$nextTick(() => {
  1290. // 构造派工单信息
  1291. const scheduleRow = {
  1292. site: this.scheduleData.site || this.$store.state.user.site,
  1293. orderNo: this.scheduleData.orderNo,
  1294. itemNo: this.scheduleData.itemNo,
  1295. seqNo: this.scheduleData.seqNo
  1296. };
  1297. // 第三个参数为 true,表示考勤修改模式,不显示添加操作员功能
  1298. this.$refs.comSwitchOperator.init(0, scheduleRow, true);
  1299. });
  1300. },
  1301. /*打印流转标签*/
  1302. printSfdcFlowLabel(sfdcRow){
  1303. //先查询打印的卷信息
  1304. getSfdcFlowLabelData(sfdcRow).then(({data}) => {
  1305. //开始打印标签
  1306. if(data.code == 200){
  1307. let printList = data.printList;
  1308. printSfdcLabel(printList);
  1309. }else{
  1310. this.$message.error(data.msg);
  1311. }
  1312. });
  1313. },
  1314. /// 保存 默认配置 列
  1315. async saveMultiLanguage() {
  1316. // 保存页面 button label title 属性
  1317. let buttons = this.buttonList;
  1318. let labels = this.labelsList;
  1319. await saveButtonList(buttons)
  1320. await saveButtonList(labels)
  1321. },
  1322. getMultiLanguageList() {
  1323. //首先查询当前按钮的多语言
  1324. searchFunctionButtonList(this.queryButton).then(({data}) => {
  1325. if (data && data.code == 0 ) {
  1326. this.buttons = data.data
  1327. } else {
  1328. // saveButtonList(this.buttonList).then(({data}) => {
  1329. // })
  1330. }
  1331. });
  1332. //其次查询当前标签的多语言
  1333. searchFunctionButtonList(this.queryLabel).then(({data}) => {
  1334. if (data && data.code == 0 ) {
  1335. this.labels = data.data
  1336. } else {
  1337. // saveButtonList(this.buttonList).then(({data}) => {
  1338. // })
  1339. }
  1340. });
  1341. },
  1342. },
  1343. created() {
  1344. // this.factoryList()
  1345. // this.getLanguageList()
  1346. }
  1347. }
  1348. </script>
  1349. <style scoped lang="scss">
  1350. /*调节页面button和input的上下间距*/
  1351. .customer-css .customer-button{
  1352. margin-top: 25px;
  1353. }
  1354. /*调节样式*/
  1355. .customer-item{
  1356. margin-top: -10px;
  1357. }
  1358. /*fieldset下table的样式*/
  1359. .customer-fieldset /deep/ .el-table__header th.is-leaf{
  1360. line-height: 16px;
  1361. }
  1362. /deep/ .customer-tab .el-tabs__content{
  1363. padding: 0px !important;
  1364. }
  1365. /*table中input*/
  1366. div.table-input /deep/ input.el-input__inner{
  1367. text-align: right;
  1368. }
  1369. /*当前按钮的通用样式*/
  1370. .customer-css .customer-bun-mid{
  1371. width: 65px;
  1372. text-align: center;
  1373. }
  1374. .customer-css .customer-bun-min{
  1375. width: 50px;
  1376. text-align: center;
  1377. }
  1378. .customer-css .customer-bun-max{
  1379. width: 80px;
  1380. text-align: center;
  1381. }
  1382. /*当前按钮的通用样式*/
  1383. .customer-css .el-button--medium {
  1384. padding: 5px 5px;
  1385. }
  1386. /*统一的input内容颜色样式*/
  1387. .customer-input-color-red /deep/ .el-input__inner {
  1388. color: red;
  1389. }
  1390. </style>