gongdanshengchan.vue 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181
  1. <template>
  2. <div>
  3. <layout>
  4. <layout-header>
  5. <div class="">
  6. <!-- 按钮部分-->
  7. <el-form ref="elSearchFormRef" :model="searchInfo" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
  8. <el-form-item>
  9. <!--按钮-->
  10. <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 180px;"></el-input>
  11. <el-button type="primary" icon="search" @click="onSubmit"></el-button>
  12. <div v-if="treeType === 'customTree'">
  13. <el-button type="primary" icon="edit" @click="onStatusClick" class="bt">状态设置</el-button>
  14. <el-button type="primary" icon="edit" @click="ongxztgzClick" class="bt">工序状态更正</el-button>
  15. </div>
  16. <div v-else>
  17. <el-button type="primary" icon="edit" @click="onjrpcClick" class="bt">加入排产</el-button>
  18. <el-button type="primary" icon="edit" @click="onztwgClick" class="bt">暂停排产</el-button>
  19. <el-button type="primary" icon="edit" @click="ongxwgClick" class="bt">工序完工</el-button>
  20. <!-- <el-button type="primary" icon="edit" disabled @click="onjztzClick" style="margin: 5px">机组调整</el-button>-->
  21. <!-- <el-button type="primary" icon="edit" disabled @click="oncjsbpcClick" style="margin: 5px">车间设备排程</el-button>-->
  22. </div>
  23. <!-- <el-button type="primary" icon="edit" disabled @click="onprintClick" style="margin: 5px">工单打印</el-button>-->
  24. <!-- <el-button type="primary" icon="edit" disabled @click="ongxclhcClick" style="margin: 5px">工序产量核查</el-button>-->
  25. <!-- <el-button type="primary" icon="edit" disabled @click="onlcdlistClick" style="margin: 5px">流程单查询</el-button>-->
  26. </el-form-item>
  27. </el-form>
  28. <!-- 状态设置【弹窗】-->
  29. <el-dialog v-model="onstatuslist" title="工单状态设置" width="30%" style="top: 15%">
  30. <div style="width: 100%;height: 100%;">
  31. <div style="width: 100%; display: flex; align-items: center;">
  32. <el-form-item label="工单编号 :" prop="currentProcess">
  33. <el-input v-model="statusformData['gdbh']" placeholder="" />
  34. </el-form-item>
  35. </div>
  36. <div style="width: 100%; display: flex; align-items: center; margin-top: 30px;">
  37. <span>状态设置:</span>
  38. <el-radio-group v-model="status" style="margin-left: 10px;">
  39. <el-radio label="计划中">计划中</el-radio>
  40. <el-radio label="生产中">生产中</el-radio>
  41. <el-radio label="已完工">已完工</el-radio>
  42. </el-radio-group>
  43. </div>
  44. <div class="dialog-footer" style="text-align: right; margin-top: 40px;">
  45. <el-button @click="handleCancel">取消</el-button>
  46. <el-button type="primary" @click="handleConfirm">确认</el-button>
  47. </div>
  48. </div>
  49. </el-dialog>
  50. <!-- 工序状态更正【弹窗】-->
  51. <el-dialog v-model="gxztgzzlist" title="工序状态更正" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
  52. <el-button type="" @click="gxztgzzCancel">退出</el-button>
  53. <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
  54. <el-form-item label="关键字 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
  55. <el-input v-model="gxztgzzformData['gdbh']" @keyup.enter="gxztgzzgetProductValue" placeholder="" style="width: 500px;"/>
  56. </el-form-item>
  57. </div>
  58. <el-table ref="multipleTable"
  59. :show-overflow-tooltip="true"
  60. :row-style="{ height: '0px' }"
  61. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
  62. :header-cell-style="{ padding: '0px' }"
  63. style="width: 100%;height: 710px" border tooltip-effect="dark"
  64. :data="gxztgzztableData" row-key="ID" @selection-change="handleSelectionChange">
  65. <el-table-column v-slot="scope" align="left" label=印件及工序 width="600" >
  66. <el-input disabled v-model="scope.row.印件及工序" :clearable="false"/>
  67. </el-table-column>
  68. <el-table-column v-slot="scope" align="left" label=计划产量/已完成 width="590" >
  69. <el-input disabled v-model="scope.row['计划产量/已完成']" :clearable="false"/>
  70. </el-table-column>
  71. <el-table-column v-slot="scope" align="left" label=完成率 width="240" >
  72. <el-input disabled v-model="scope.row.完成率" :clearable="false"/>
  73. </el-table-column>
  74. <el-table-column v-slot="scope" align="left" label=完工时间 width="210" >
  75. <el-input disabled v-model="scope.row.完工时间" :clearable="false"/>
  76. </el-table-column>
  77. <el-table-column v-slot="scope" align="left" label=设备代号 width="240" >
  78. <el-input disabled v-model="scope.row.设备代号" :clearable="false"/>
  79. </el-table-column>
  80. </el-table>
  81. </el-dialog>
  82. <!--加入排产【弹窗】-->
  83. <!--暂停完工【弹窗】-->
  84. <!--暂停完工【弹窗】-->
  85. <!--机组调整【弹窗】-->
  86. <!--车间设备排程【弹窗】-->
  87. <el-dialog v-model="cjsbpclist" title="车间设备排程" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
  88. <el-button type="" icon="edit" @click="oneditpcClick">更新排程</el-button>
  89. <el-button type="" @click="cjsbpcCancel">退出</el-button>
  90. <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; ">
  91. <div style="width: 100%; height: 60px; padding: 0px; display: flex; align-items: center;">
  92. <el-form-item label="设备代号 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
  93. <el-input v-model="cjsbpcformData['sbdh']" disabled placeholder="" />
  94. </el-form-item>
  95. <el-form-item label="班次选择:" prop="originalName" style="margin-left: 20px;">
  96. <el-select v-model="cjsbpcformData.banci" placeholder="请选择" allow-create filterable>
  97. <el-option
  98. v-for="(option, index) in cjsbpcformData.bancis"
  99. :key="index"
  100. :label="option.label"
  101. :value="option.value"
  102. />
  103. </el-select>
  104. </el-form-item>
  105. <el-form-item label="" prop="isBanciSelected" style="margin-left: 20px;">
  106. <el-checkbox v-model="cjsbpcformData.isBanciSelected">所有班次</el-checkbox>
  107. </el-form-item>
  108. </div>
  109. <el-table ref="paichengRef"
  110. :show-overflow-tooltip="true"
  111. :row-style="{ height: '0px' }"
  112. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
  113. :header-cell-style="{ padding: '0px' }"
  114. style="width: 100%;height: 74vh" border tooltip-effect="dark"
  115. :data="paichengData" row-key="ID" >
  116. <!-- <el-table-column v-slot="scope" align="left" label=优先次序 width="120" >-->
  117. <!-- <el-input disabled v-model="scope.row.优先次序" :clearable="false"/>-->
  118. <!-- </el-table-column>-->
  119. <!-- <el-table-column v-slot="scope" align="left" label=工单编号 width="200" >-->
  120. <!-- <el-input disabled v-model="scope.row.工单编号" :clearable="false"/>-->
  121. <!-- </el-table-column>-->
  122. <!-- <el-table-column v-slot="scope" align="left" label=印件名称 width="220" >-->
  123. <!-- <el-input disabled v-model="scope.row.印件名称" :clearable="false"/>-->
  124. <!-- </el-table-column>-->
  125. <!-- <el-table-column v-slot="scope" align="left" label=接货数 width="110" >-->
  126. <!-- <el-input disabled v-model="scope.row.接货数" :clearable="false"/>-->
  127. <!-- </el-table-column>-->
  128. <!-- <el-table-column v-slot="scope" align="left" label=小时产能 width="110" >-->
  129. <!-- <el-input disabled v-model="scope.row.小时产能" :clearable="false"/>-->
  130. <!-- </el-table-column>-->
  131. <!-- <el-table-column v-slot="scope" align="left" label=产能系数 width="110" >-->
  132. <!-- <el-input disabled v-model="scope.row.产能系数" :clearable="false"/>-->
  133. <!-- </el-table-column>-->
  134. <!-- <el-table-column v-slot="scope" align="left" label=生产工时 width="110" >-->
  135. <!-- <el-input disabled v-model="scope.row.生产工时" :clearable="false"/>-->
  136. <!-- </el-table-column>-->
  137. <!-- <el-table-column v-slot="scope" align="left" label=生产工时 width="110" >-->
  138. <!-- <el-input disabled v-model="scope.row.生产工时" :clearable="false"/>-->
  139. <!-- </el-table-column>-->
  140. <!-- <el-table-column v-slot="scope" align="left" label=辅助工时 width="110" >-->
  141. <!-- <el-input disabled v-model="scope.row.辅助工时" :clearable="false"/>-->
  142. <!-- </el-table-column>-->
  143. <!-- <el-table-column v-slot="scope" align="left" label=班次安排 width="110" >-->
  144. <!-- <el-input disabled v-model="scope.row.班次安排" :clearable="false"/>-->
  145. <!-- </el-table-column>-->
  146. <!-- <el-table-column v-slot="scope" align="left" label=排单备注 width="110" >-->
  147. <!-- <el-input disabled v-model="scope.row.排单备注" :clearable="false"/>-->
  148. <!-- </el-table-column>-->
  149. <!-- <el-table-column v-slot="scope" align="left" label=最早开工时间 width="110" >-->
  150. <!-- <el-input disabled v-model="scope.row.最早开工时间" :clearable="false"/>-->
  151. <!-- </el-table-column>-->
  152. <!-- <el-table-column v-slot="scope" align="left" label=计划开工时间 width="110" >-->
  153. <!-- <el-input disabled v-model="scope.row.计划开工时间" :clearable="false"/>-->
  154. <!-- </el-table-column>-->
  155. <!-- <el-table-column v-slot="scope" align="left" label=计划完工时间 width="110" >-->
  156. <!-- <el-input disabled v-model="scope.row.计划完工时间" :clearable="false"/>-->
  157. <!-- </el-table-column>-->
  158. <!-- <el-table-column v-slot="scope" align="left" label=销售订单号 width="110" >-->
  159. <!-- <el-input disabled v-model="scope.row.销售订单号" :clearable="false"/>-->
  160. <!-- </el-table-column>-->
  161. <!-- <el-table-column v-slot="scope" align="left" label=印件/工序 width="110" >-->
  162. <!-- <el-input disabled v-model="scope.row.印件/工序" :clearable="false"/>-->
  163. <!-- </el-table-column>-->
  164. </el-table>
  165. </div>
  166. </el-dialog>
  167. <!--工单打印【弹窗】-->
  168. <!--工序产量核查【弹窗】-->
  169. <el-dialog v-model="gxclhclist" title="工序产量核查" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
  170. <el-button type="" @click="gxclhcCancel">退出</el-button>
  171. <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
  172. <div style="width: 100%; height: 60px; padding: 0px; display: flex; align-items: center;">
  173. <el-form-item label="工单编号" prop="currentProcess" style="margin-right: 20px; padding: 0px">
  174. <el-input v-model="gxclhcformData['gdbh']" @keyup.enter="gxclhcProductValue" placeholder="" />
  175. </el-form-item>
  176. <el-form-item label="" prop="currentProcess" style="margin-right: 20px; padding: 0px">
  177. <el-input v-model="gxclhcformData['gdmc']" disabled placeholder="" style="width: 340px;"/>
  178. </el-form-item>
  179. </div>
  180. </div>
  181. </el-dialog>
  182. </div>
  183. </layout-header>
  184. <layout>
  185. <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
  186. <div class="JKWTree-tree" style="height: 200px">
  187. <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
  188. </div>
  189. </layout-sider>
  190. <layout-content>
  191. <el-main>
  192. <div class="gva-table-box" v-if="treeType === 'customTree'">
  193. <el-table ref="multipleTable" style="width: 100%;height: 25vh"
  194. :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  195. :header-cell-style="{ padding: '0px' }" border
  196. tooltip-effect="dark" :data="tableData" row-key="ID"
  197. :highlight-current-row="true" size="small" @row-click="gdtableRowClick"
  198. @selection-change="handleSelectionChange" :show-overflow-tooltip="true">
  199. <template v-for="item in tableFields[currentNode]">
  200. <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
  201. </template>
  202. </el-table>
  203. </div>
  204. <el-tabs v-model="activeName" @tab-click="handleClick" v-if="(currentNode == '计划中' || currentNode == '已完工') && treeType === 'customTree'">
  205. <el-tab-pane label="工艺资料" @click="showTable('工艺资料')" name="first">
  206. <el-table ref="multipleTable" :show-overflow-tooltip="true" :row-style="{ height: '20px' }"
  207. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  208. :header-cell-style="{ padding: '0px' }" highlight-current-row="true"
  209. style="width: 100%;height: 40vh" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
  210. <el-table-column align="left" label="工单编号" prop="工单编号" width="90"/>
  211. <el-table-column align="left" label="重点工序" prop="重点工序" width="90"/>
  212. <el-table-column align="left" label="印件工序及名称" prop="印件工序及名称" width="500"/>
  213. <el-table-column align="left" label="工序备注" prop="工序备注" width="150"/>
  214. <el-table-column align="left" label="机组" prop="机组" width="80"/>
  215. <el-table-column align="left" label="小时产能" prop="小时产能" width="90"/>
  216. <el-table-column align="left" label="生产工时" prop="生产工时" width="90"/>
  217. <el-table-column align="left" label="辅助工时" prop="辅助工时" width="90"/>
  218. <el-table-column align="left" label="印刷方式" prop="印刷方式" width="90"/>
  219. <el-table-column align="left" label="版距" prop="版距" width="70"/>
  220. <el-table-column align="left" label="创建用户" prop="创建用户" width="100"/>
  221. <el-table-column align="left" label="创建时间" prop="创建时间" width="110"/>
  222. <el-table-column align="left" label="修改时间" prop="修改时间" width="110"/>
  223. <el-table-column align="left" label="UNIQID" prop="UNIQID" width="90"/>
  224. </el-table>
  225. </el-tab-pane>
  226. <el-tab-pane label="印件资料" @click="showTable('印件资料')" name="second">
  227. <el-table ref="multipleTable" :row-style="{ height: '20px' }"
  228. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  229. :header-cell-style="{ padding: '0px' }" :show-overflow-tooltip="true"
  230. :highlight-current-row="true"
  231. style="width: 100%;height: 40vh" border tooltip-effect="dark" :data="yjtableData" row-key="ID" @selection-change="handleSelectionChange">
  232. <el-table-column align="left" label="工单编号" prop="工单编号" width="90"/>
  233. <el-table-column align="left" label="印件号" prop="印件号" width="70"/>
  234. <el-table-column align="left" label="印件代号" prop="印件代号" width="100"/>
  235. <el-table-column align="left" label="印件名称" prop="印件名称" width="240"/>
  236. <el-table-column align="left" label="纸张名称" prop="纸张名称" width="230"/>
  237. <el-table-column align="left" label="投料规格" prop="投料规格" width="100"/>
  238. <el-table-column align="left" label="成品数量" prop="成品数量" width="90"/>
  239. <el-table-column align="left" label="实际投料" prop="实际投料" width="90"/>
  240. <el-table-column align="left" label="投料单位" prop="投料单位" width="85"/>
  241. <el-table-column align="left" label="平张投料" prop="平张投料" width="90"/>
  242. <el-table-column align="left" label="联数" prop="联数" width="70"/>
  243. <el-table-column align="left" label="开数" prop="开数" width="70"/>
  244. <el-table-column align="left" label="创建用户" prop="创建用户" width="110"/>
  245. <el-table-column align="left" label="创建时间" prop="创建时间" width="110"/>
  246. <el-table-column align="left" label="修改时间" prop="修改时间" width="110"/>
  247. <el-table-column align="left" label="UNIQID" prop="UNIQID" width="90"/>
  248. </el-table>
  249. </el-tab-pane>
  250. </el-tabs>
  251. <div v-if="treeType === 'customTree'">
  252. <el-table ref="multipleTable2"
  253. v-if="['排程中', '制程中'].includes(currentNode)"
  254. :show-overflow-tooltip="true" :row-style="{ height: '20px' }"
  255. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  256. :header-cell-style="{ padding: '0px' }" :highlight-current-row="true"
  257. style="width: 100%;height: 40vh" border tooltip-effect="dark" :data="bottomData" row-key="ID" @selection-change="handleSelectionChange">
  258. <template v-for="item in bottomTableF[currentNode]">
  259. <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
  260. </template>
  261. </el-table>
  262. </div>
  263. <div v-if="treeType === 'dataTree'">
  264. <el-table ref="chejianRef"
  265. :show-overflow-tooltip="true" :row-style="{ height: '20px' }"
  266. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  267. :header-cell-style="{ padding: '0px' }" :highlight-current-row="true" @row-click="chejianRowClick"
  268. style="width: 100%;height: 40vh" border tooltip-effect="dark" :data="chejianData" row-key="ID" @selection-change="PC_handleChange">
  269. <el-table-column type="selection" width="55" />
  270. <template v-for="item in [
  271. { align:'center', title: '工单编号', prop: '工单编号', width: 160 },
  272. { align:'center', title: '销售订单号', prop: '销售订单号', width: 200 },
  273. { align:'center', title: '印件名称', prop: '印件名称', width: 320 },
  274. { align:'center', title: '印件工序及名称', prop: '印件工序及名称', width: 200 },
  275. { align:'center', title: '工序产量', prop: '工序产量', width: 120 },
  276. { align:'center', title: '已完成产量', prop: '已完成产量', width: 160 },
  277. { align:'center', title: '产品名称', prop: '产品名称', width: 320 },
  278. { align:'center', title: '订单数量', prop: '订单数量', width: 120 },
  279. { align:'center', title: '计量单位', prop: '计量单位', width: 120 },
  280. { align:'center', title: '交货日期', prop: '交货日期', width: 140 },
  281. { align:'center', title: '产品代号', prop: '产品代号', width: 140 },
  282. { align:'center', title: '工序名称', prop: '工序名称', width: 120 },
  283. { align:'center', title: '机组', prop: '机组', width: 120 },
  284. { align:'center', title: '设备编号', prop: '设备编号', width: 120 },
  285. { align:'center', title: 'UNIQID', prop: 'UNIQID', width: 140 },
  286. { align:'center', title: '印件号', prop: '印件号', width: 100 },
  287. { align:'center', title: '工序号', prop: '工序号', width: 100 },
  288. ]">
  289. <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
  290. </template>
  291. </el-table>
  292. <el-table ref="chejianfuRef"
  293. :show-overflow-tooltip="true" :row-style="{ height: '20px' }"
  294. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  295. :header-cell-style="{ padding: '0px' }" :highlight-current-row="true" @row-click="chejianfuRowClick"
  296. style="width: 100%;height: 40vh;margin-top: 10px" border tooltip-effect="dark" :data="chejianfuData" row-key="ID" @selection-change="ZP_handleChange">
  297. <el-table-column type="selection" width="55" />
  298. <template v-for="item in [
  299. { align:'center', title: '工单编号', prop: '工单编号', width: 160 },
  300. { align:'center', title: '销售订单号', prop: '销售订单号', width: 200 },
  301. { align:'center', title: '印件名称', prop: '印件名称', width: 320 },
  302. { align:'center', title: '印件工序及名称', prop: '印件工序及名称', width: 200 },
  303. { align:'center', title: '工序产量', prop: '工序产量', width: 120 },
  304. { align:'center', title: '已完成产量', prop: '已完成产量', width: 160 },
  305. { align:'center', title: '小时产能', prop: '小时产能', width: 120 },
  306. { align:'center', title: '产能系数', prop: '产能系数', width: 120 },
  307. { align:'center', title: '生产工时', prop: '生产工时', width: 120 },
  308. { align:'center', title: '辅助工时', prop: '辅助工时', width: 140 },
  309. { align:'center', title: '最早开工时间', prop: '最早开工时间', width: 160 },
  310. { align:'center', title: '计划开工时间', prop: '计划开工时间', width: 160 },
  311. { align:'center', title: '计划完工时间', prop: '计划完工时间', width: 160 },
  312. { align:'center', title: '班次安排', prop: '班次安排', width: 120 },
  313. { align:'center', title: '排单备注', prop: '排单备注', width: 120 },
  314. { align:'center', title: '产品名称', prop: '产品名称', width: 180 },
  315. { align:'center', title: '订单数量', prop: '订单数量', width: 120 },
  316. { align:'center', title: '计量单位', prop: '计量单位', width: 120 },
  317. { align:'center', title: '交货日期', prop: '交货日期', width: 140 },
  318. { align:'center', title: '优先次序', prop: '优先次序', width: 140 },
  319. { align:'center', title: '产品代号', prop: '产品代号', width: 140 },
  320. { align:'center', title: '工序名称', prop: '工序名称', width: 120 },
  321. { align:'center', title: '设备编号', prop: '设备编号', width: 120 },
  322. { align:'center', title: '车间名称', prop: '车间名称', width: 120 },
  323. { align:'center', title: 'GYUID', prop: 'GYUID', width: 140 },
  324. { align:'center', title: '印件号', prop: '印件号', width: 100 },
  325. { align:'center', title: '工序号', prop: '工序号', width: 100 },
  326. ]">
  327. <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
  328. </template>
  329. </el-table>
  330. </div>
  331. </el-main>
  332. </layout-content>
  333. </layout>
  334. </layout>
  335. </div>
  336. </template>
  337. <script>
  338. //点击按钮显示下方表格
  339. export default {
  340. data() {
  341. return {
  342. currentTable: '',
  343. activeName: 'first',
  344. // 其他表格数据...
  345. };
  346. },
  347. methods: {
  348. showTable(tableName) {
  349. // console.log("点击了".tableName)
  350. // 根据点击的按钮设置当前展示的表格
  351. this.currentTable = tableName;
  352. },
  353. showTableChange() {
  354. // 处理表格选中事件
  355. },
  356. // 其他方法...
  357. }
  358. };
  359. </script>
  360. <script setup>
  361. // 全量引入格式化工具 请按需保留
  362. import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
  363. import {createCompany, deleteCompany, deleteCompanyByIds, updateCompany, findCompany, getCompanyList} from '@/api/company'
  364. import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
  365. import { ElMessage, ElMessageBox } from 'element-plus'
  366. import { ref, reactive } from 'vue'
  367. import {
  368. DataList, getProduct, getProductData,scheduleProcess,ProductionSchedulingAdd,
  369. Project, StatusEdit, EquipmentScheduling, ScheduleSelection,MachineWorkOrderList,
  370. projectCraft, ProcessStatusCorrection,ProductionSchedulingPause,
  371. projectPrint, setProductStatus, workbench, ProcessFlow, Schedule,complete
  372. } from "@/api/yunyin/yunying";
  373. defineOptions({name: 'Company'})
  374. const chejianData = ref([])
  375. const chejianfuData = ref([])
  376. // =========== 左侧树侧形结构 ===========
  377. const sctreeData = ref([
  378. {
  379. label: '排产进程及参数设置',
  380. children:[
  381. {label: '1.计划中工单', number: "计划中", type: '__customer'},
  382. {label: '2.排程中工单', number: "排程中",type: '__customer'},
  383. {label: '3.制程中工单', number: "制程中", type: '__customer'},
  384. {label: '4.已完工工单', number: "已完工", type: '__customer'}
  385. ],
  386. }
  387. ]);
  388. //上方表格
  389. const tableFields = ref(
  390. {
  391. "计划中": [
  392. { title:'获取状态', prop: 'statusColumn', width: 80, align:'center'},
  393. { title:'生产分类', prop: '生产分类', width: 80, align:'left', },
  394. { title: '工单编号', prop: '工单编号', width: 80, align:'center', },
  395. { title: '产品代号', prop: '产品代号', width: 90, align:'center', },
  396. { title: '产品名称', prop: '产品名称', width: 280, align:'left', },
  397. { title: '接单日期', prop: '接单日期', width: 110, align:'left', },
  398. { title: '交货日期', prop: '交货日期', width: 110, align:'left', },
  399. { title: '订单数量', prop: '订单数量', width: 90, align:'left', },
  400. { title: '计量单位', prop: '计量单位', width: 120, align:'center', },
  401. { title: '客户名称', prop: '客户名称', width: 200, align:'left', },
  402. { title: '客户编号', prop: '客户编号', width: 80, align:'center', },
  403. { title: '备注', prop: '备注', width: 230, align:'left', },
  404. { title: '客户料号', prop: '客户料号', width: 120, align:'left', },
  405. { title: '创建用户', prop: '创建用户', width: 110, align:'left', },
  406. { title: '创建时间', prop: '创建时间', width: 110, align:'left', },
  407. { title: '修改时间', prop: '修改时间', width: 110, align:'left', },
  408. { title: 'UNIQID', prop: 'UNIQID', width: 80 , align:'left', },
  409. { title: '投料率', prop: '投料率', width: 100, align:'left', },
  410. { title: '销售订单号', prop: '销售订单号', width: 120, align:'left', },
  411. ],
  412. "排程中": [
  413. // { title: '最早开工时间', prop: '最早开工时间', width: 120, align:'left', },
  414. { title: '工单编号', prop: '工单编号', width: 80, align:'left', },
  415. { title: '产品代号', prop: '产品代号', width: 90, align:'left', },
  416. { title: '产品名称', prop: '产品名称', width: 340, align:'left', },
  417. { title: '接单日期', prop: '接单日期', width: 110, align:'left', },
  418. { title: '交货日期', prop: '交货日期', width: 110, align:'left', },
  419. { title: '订单数量', prop: '订单数量', width: 120, align:'left', },
  420. { title: '计量单位', prop: '计量单位', width: 120, align:'left', },
  421. { title: '销售订单号', prop: '销售订单号', width: 200, align:'left', },
  422. // { title: '排程类型', prop: '排程类型', width: 120, align:'left', },
  423. { title: '客户编号', prop: '客户编号', width: 120, align:'left', },
  424. { title: '客户名称', prop: '客户名称', width: 230, align:'left', },
  425. { title: '创建用户', prop: '创建用户', width: 120, align:'left', },
  426. // { title: 'GDUID', prop: 'GDUID', width: 120, align:'left', },
  427. { title: 'GYUID', prop: 'GYUID', width: 100, align:'left', },
  428. ],
  429. "制程中": [
  430. // { title: '最早开工时间', prop: '最早开工时间', width: 120, align:'left', },
  431. { title: '工单编号', prop: '工单编号', width: 80, align:'left', },
  432. { title: '产品代号', prop: '产品代号', width: 90, align:'left', },
  433. { title: '产品名称', prop: '产品名称', width: 340, align:'left', },
  434. { title: '接单日期', prop: '接单日期', width: 110, align:'left', },
  435. { title: '交货日期', prop: '交货日期', width: 110, align:'left', },
  436. { title: '订单数量', prop: '订单数量', width: 120, align:'left', },
  437. { title: '计量单位', prop: '计量单位', width: 120, align:'left', },
  438. { title: '销售订单号', prop: '销售订单号', width: 200, align:'left', },
  439. // { title: '排程类型', prop: '排程类型', width: 120, align:'left', },
  440. { title: '客户编号', prop: '客户编号', width: 120, align:'left', },
  441. { title: '客户名称', prop: '客户名称', width: 120, align:'left', },
  442. { title: '客户料号', prop: '客户料号', width: 160, align:'left', },
  443. // { title: 'GDUID', prop: 'GDUID', width: 120, align:'left', },
  444. { title: 'GYUID', prop: 'GYUID', width: 100, align:'left', },
  445. ],
  446. "已完工": [
  447. { title: '工单编号', prop: '工单编号', width: 80, align:'left', },
  448. { title: '产品代号', prop: '产品代号', width: 110, align:'left', },
  449. { title: '产品名称', prop: '产品名称', width: 340, align:'left', },
  450. { title: '接单日期', prop: '接单日期', width: 110, align:'left', },
  451. { title: '交货日期', prop: '交货日期', width: 110, align:'left', },
  452. { title: '订单数量', prop: '订单数量', width: 90, align:'left', },
  453. { title: '计量单位', prop: '计量单位', width: 120, align:'left', },
  454. { title: '销售订单号', prop: '销售订单号', width: 120, align:'left', },
  455. { title: '客户编号', prop: '客户编号', width: 80, align:'left', },
  456. { title: '客户名称', prop: '客户名称', width: 120, align:'left', },
  457. { title: '客户料号', prop: '客户料号', width: 120, align:'left', },
  458. // { title: '排程类型', prop: '排程类型', width: 120, align:'left', },
  459. { title: 'GDUID', prop: 'GDUID', width: 80, align:'left', },
  460. ]
  461. }
  462. )
  463. //下方表格
  464. const bottomTableF = ref({
  465. "排程中": [
  466. { title:'工单编号', prop: '工单编号', width: 90, align:'left', },
  467. { title:'印件工序及名称', prop: '印件工序及名称', width: 160, align:'left', },
  468. { title:'机组', prop: '机组', width: 120, align:'left', },
  469. { title:'设备编号', prop: '设备编号', width: 120, align:'left', },
  470. { title:'工序产量', prop: '工序产量', width: 120, align:'left', },
  471. { title:'已完成产量', prop: '已完成产量', width: 120, align:'left', },
  472. { title:'剩余产量', prop: '剩余产量', width: 120, align:'left', },
  473. { title:'小时产能', prop: '小时产能', width: 120, align:'left', },
  474. { title:'产能系数', prop: '产能系数', width: 120, align:'left', },
  475. { title:'生产工时', prop: '生产工时', width: 120, align:'left', },
  476. { title:'辅助工时', prop: '辅助工时', width: 120, align:'left', },
  477. { title:'最早开工时间', prop: '最早开工时间', width: 120, align:'left', },
  478. { title:'计划开工时间', prop: '计划开工时间', width: 120, align:'left', },
  479. { title:'计划完工时间', prop: '计划完工时间', width: 120, align:'left', },
  480. { title:'班次安排', prop: '班次安排', width: 120, align:'left', },
  481. { title:'设备名称', prop: '设备名称', width: 120, align:'left', },
  482. { title:'排单备注', prop: '排单备注', width: 120, align:'left', },
  483. { title:'工序完工', prop: '工序完工', width: 120, align:'left', },
  484. { title:'UNIQID', prop: 'UNIQID', width: 120, align:'left', },
  485. ],
  486. "制程中": [
  487. { title:'工单编号', prop: '工单编号', width: 90, align:'left', },
  488. { title:'印件工序及名称', prop: '印件工序及名称', width: 160, align:'left', },
  489. { title:'机组', prop: '机组', width: 120, align:'left', },
  490. { title:'设备编号', prop: '设备编号', width: 120, align:'left', },
  491. { title:'工序产量', prop: '工序产量', width: 120, align:'left', },
  492. { title:'已完成产量', prop: '已完成产量', width: 120, align:'left', },
  493. { title:'剩余产量', prop: '剩余产量', width: 120, align:'left', },
  494. { title:'小时产能', prop: '小时产能', width: 120, align:'left', },
  495. { title:'产能系数', prop: '产能系数', width: 120, align:'left', },
  496. { title:'生产工时', prop: '生产工时', width: 120, align:'left', },
  497. { title:'辅助工时', prop: '辅助工时', width: 120, align:'left', },
  498. { title:'最早开工时间', prop: '最早开工时间', width: 120, align:'left', },
  499. { title:'计划开工时间', prop: '计划开工时间', width: 120, align:'left', },
  500. { title:'计划完工时间', prop: '计划完工时间', width: 120, align:'left', },
  501. { title:'班次安排', prop: '班次安排', width: 120, align:'left', },
  502. { title:'设备名称', prop: '设备名称', width: 120, align:'left', },
  503. { title:'排单备注', prop: '排单备注', width: 120, align:'left', },
  504. { title:'工序完工', prop: '工序完工', width: 120, align:'left', },
  505. { title:'UNIQID', prop: 'UNIQID', width: 120, align:'left', },
  506. ],
  507. })
  508. //左侧左边栏
  509. const treeData = ref([]);
  510. //默认显示计划中表格
  511. const currentNode = ref("计划中")
  512. //计划中、已完工下方印件资料
  513. const yjtableData = ref([])
  514. //计划中、已完工下方工艺资料
  515. const gytableData = ref([])
  516. //排程中、制程中下方表格
  517. const bottomData = ref([])
  518. //工单侧边栏 设备定额及分配参数设置
  519. const schandleNodeClick = async (node) => {
  520. currentNode.value = node.number
  521. bottomData.value = []
  522. yjtableData.value = []
  523. gytableData.value = []
  524. switch (node.number) {
  525. case "计划中":
  526. console.log(currentNode.value)
  527. const jhz_Projectdata = await Project({status:currentNode.value});
  528. console.log(jhz_Projectdata)
  529. for (let i = 0; i < jhz_Projectdata.data.length; i++) {
  530. const item = jhz_Projectdata.data[i];
  531. if (item.status === 0) {
  532. item.statusColumn = "*";
  533. }
  534. // 如果 status 为 1,可以在相应列中添加其他内容
  535. else if (item.status === 1) {
  536. item.statusColumn = "";
  537. }
  538. }
  539. tableData.value = jhz_Projectdata.data;
  540. break;
  541. case "排程中":
  542. console.log(currentNode.value)
  543. // /Manufacture/Schedule
  544. const pc_Schedule = await Schedule({status:currentNode.value,search:''});
  545. console.log(pc_Schedule)
  546. tableData.value = pc_Schedule.data;
  547. break;
  548. case "制程中":
  549. console.log(currentNode.value)
  550. const zc_Schedule = await Schedule({status:currentNode.value,search:''});
  551. console.log(zc_Schedule)
  552. tableData.value = zc_Schedule.data;
  553. break;
  554. case "已完工":
  555. console.log(currentNode.value)
  556. const ywg_Project = await Project({status:currentNode.value});
  557. for (let i = 0; i < ywg_Project.data.length; i++) {
  558. const item = ywg_Project.data[i];
  559. // 如果 status 为 0,在某一列(比如 statusColumn)中添加 "*"
  560. if (item.status === 0) {
  561. item.statusColumn = "*";
  562. }
  563. else if (item.status === 1) {
  564. item.statusColumn = "";
  565. }
  566. }
  567. tableData.value = ywg_Projectdata.data;
  568. break;
  569. }
  570. };
  571. //车间侧边栏 进入页面自动加载【车间】数据
  572. const workbenchdata = async () => {
  573. try {
  574. const data = await workbench();
  575. const rawData = data.data;
  576. const dataArray =Object.keys(rawData).map(key => ({
  577. label: key,
  578. children: Object.keys(rawData[key]).map(subKey => ({
  579. label: subKey,
  580. children: rawData[key][subKey].map(item => ({
  581. label: item
  582. }))
  583. }))
  584. }));
  585. treeData.value = dataArray;
  586. treeData.value.unshift(sctreeData.value[0])
  587. } catch (error) {
  588. console.error(error);
  589. }
  590. };
  591. workbenchdata();
  592. //全局获取工单编号
  593. const _Gd_gdbh = ref(null)
  594. //点击表格 通过【工单编号】获取下方表格数据
  595. const gdtableRowClick = async (row) => {
  596. _Gd_gdbh.value = row.工单编号;
  597. console.log(_Gd_gdbh.value);
  598. if (currentNode.value == "计划中") {
  599. if(row['statusColumn'] === "*"){
  600. gytableData.value = [];
  601. yjtableData.value = [];
  602. return false;
  603. }else{
  604. //计划中工单->工艺资料接口
  605. const gyres = await projectCraft({Gd_gdbh: _Gd_gdbh.value});
  606. //工艺资料表格
  607. gytableData.value.splice(0, gytableData.value.length, ...gyres.data);
  608. //计划中工单->印件资料接口
  609. const yjres = await projectPrint({Gd_gdbh: _Gd_gdbh.value});
  610. //印件资料表格
  611. yjtableData.value.splice(0, yjtableData.value.length, ...(yjres?.data ?? []));
  612. }
  613. }
  614. if (currentNode.value == "排程中") {
  615. const pc_scheduleProcess = await scheduleProcess({Gd_gdbh: _Gd_gdbh.value});
  616. bottomData.value = pc_scheduleProcess.data;
  617. }
  618. if (currentNode.value == "制程中") {
  619. const zc_scheduleProcess = await scheduleProcess({Gd_gdbh: _Gd_gdbh.value});
  620. bottomData.value = zc_scheduleProcess.data;
  621. }
  622. if (currentNode.value == "已完工") {
  623. //工艺资料
  624. const ywg_gyres = await projectCraft({Gd_gdbh: _Gd_gdbh.value});
  625. gytableData.value.splice(0, gytableData.value.length, ...ywg_gyres.data);
  626. //印件资料
  627. const ywg_yjres = await projectPrint({Gd_gdbh: _Gd_gdbh.value});
  628. yjtableData.value.splice(0, yjtableData.value.length, ...ywg_yjres.data);
  629. }
  630. };
  631. //点击左侧树形获取表格列表
  632. const tableData = ref([]);
  633. const _machine = ref(null);
  634. const treeType = ref('customTree') // dataTree // 计划中,排产中 ,dataTree 车间
  635. const handleNodeClick = async (node) => {
  636. if (node.type && node.type === '__customer') {
  637. treeType.value = 'customTree'
  638. schandleNodeClick(node)
  639. } else if (!node.children) {
  640. treeType.value = 'dataTree'
  641. const custom_code = node.label;
  642. // 使用字符串分割获取#前面的数据
  643. const dataBeforeHash = custom_code.split('#')[0].trim();
  644. const machine = dataBeforeHash + '#';
  645. console.log(machine)
  646. _machine.value = machine;
  647. const zhubiao = await MachineWorkOrderList({ machine, status: '排程' })
  648. const fubiao = await MachineWorkOrderList({ machine, status: '制程' })
  649. // console.log(zhubiao, fubiao)
  650. chejianData.value = zhubiao.data;
  651. chejianfuData.value = fubiao.data;
  652. }
  653. };
  654. //计划中已完工搜索
  655. const searchInfo = ref('');
  656. // 提交搜索
  657. const onSubmit = () => {
  658. if(searchInfo.value === '' || searchInfo.value.length < 6 ){
  659. tableData.value = [];
  660. }else{
  661. if(currentNode.value === '计划中' || currentNode.value === '已完工'){
  662. _Project();
  663. }else if(currentNode.value === '排程中' || currentNode.value === '制程中'){
  664. _Schedule();
  665. }else{
  666. ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
  667. }
  668. }
  669. };
  670. // 搜索计划中、已完工一条工单
  671. const _Project = async () => {
  672. const status = currentNode.value;
  673. const search = searchInfo.value;
  674. console.log(status)
  675. console.log(search)
  676. const Project_search = await Project({status:status,search:search});
  677. console.log(Project_search);
  678. if(Project_search.code === 0){
  679. tableData.value = Project_search.data;
  680. }else{
  681. tableData.value = [];
  682. return false;
  683. }
  684. };
  685. // 搜索排程、制程一条工单
  686. const _Schedule = async () => {
  687. const status = currentNode.value;
  688. const search = searchInfo.value;
  689. console.log(status)
  690. console.log(search)
  691. const Schedule_search = await Schedule({status:status,search:search});
  692. console.log(Schedule_search);
  693. if(Schedule_search.code === 0){
  694. tableData.value = Schedule_search.data;
  695. }else{
  696. tableData.value = [];
  697. return false;
  698. }
  699. };
  700. // const paichengForm = ref([])
  701. // const paichengData = ref([
  702. // {
  703. // 优先次序: 1, 工单编号: 1000, 印件名称: 'test',接货数: 111,
  704. // 小时产能: 1, 产能系数: 1.5, 生产工时: 333, 辅助工时: 222,
  705. // 班次安排: '1111', 排单备注: '备注备注', 最早开工时间: '2023-01-01 08:08:08',
  706. // 计划开工时间: '2023-01-01 08:08:08', 计划完工时间: '2023-01-01 08:08:08',
  707. // 销售订单号: '3335555', '印件/工序': '321312',
  708. // }
  709. // ])
  710. // =========== 【工序状态更正】 ===========
  711. const gxztgzzlist = ref(false);
  712. const gxztgzzformData = reactive({gdbh: '',});
  713. const gxztgzztableData = ref([]);
  714. //工序状态更正【按钮】
  715. const ongxztgzClick = () => {
  716. if(_Gd_gdbh.value == null){
  717. gxztgzzlist.value = false;
  718. ElMessage({type: 'warning',message: '请选择树形后,再操作此功能'})
  719. }else{
  720. gxztgzzformData['gdbh'] = _Gd_gdbh.value;
  721. _ProcessStatusCorrection();
  722. gxztgzzlist.value = true;
  723. }
  724. };
  725. //工序状态更正【回车】
  726. const gxztgzzgetProductValue = () => {
  727. _ProcessStatusCorrection();
  728. };
  729. //工序状态更正
  730. const _ProcessStatusCorrection = async (row) => {
  731. const workOrder = gxztgzzformData['gdbh'];
  732. console.log(workOrder)
  733. const ProcessStatusCorrectiondata = await ProcessStatusCorrection({workOrder:workOrder});
  734. gxztgzztableData.value = ProcessStatusCorrectiondata.data;
  735. };
  736. //工序状态更正【退出】
  737. const gxztgzzCancel = () => {
  738. gxztgzzlist.value = false;
  739. };
  740. //点击车间表格【获取车间工单编号】
  741. // const _PC_gdbh = ref(null)
  742. // const chejianRowClick = (row) => {
  743. // // console.log(row['工单编号'])
  744. // _PC_gdbh.value = row['工单编号'];
  745. // };
  746. //加入排产【按钮】
  747. const onjrpcClick = async () => {
  748. if(_PC_gdbh.value == null || _PC_gdbh.value == ''){
  749. ElMessage({type: 'warning',message: '请选择排程中工单'})
  750. }else{
  751. let params = {}
  752. // params.workOrder = '2311116';
  753. // params.machine = 'JY01#';
  754. params.workOrder = _PC_gdbh.value;
  755. params.machine = _machine.value;
  756. params.printCode = 1;
  757. params.processCode = 1;
  758. console.log(params)
  759. const ProductionSchedulingAdd_add = await ProductionSchedulingAdd(params);
  760. console.log(ProductionSchedulingAdd_add)
  761. if (ProductionSchedulingAdd_add .code === 0) {
  762. const fubiao = await MachineWorkOrderList({ machine:_machine.value, status: '制程' });
  763. chejianfuData.value = fubiao.data;
  764. ElMessage({type: 'success',message: '加入排产 更新成功'});
  765. } else {
  766. ElMessage({ type: 'error',message: '更新失败'})
  767. }
  768. }
  769. };
  770. // const _ZC_gdbh = ref(null)
  771. // const chejianfuRowClick = (row) => {
  772. // // console.log(row['工单编号'])
  773. // _ZC_gdbh.value = row['工单编号'];
  774. // };
  775. //暂停排产【按钮】
  776. const onztwgClick = async () => {
  777. if(_ZC_gdbh.value == null || _ZC_gdbh.value == ''){
  778. ElMessage({type: 'warning', message: '请选择制程中工单'})
  779. }else{
  780. let params = {}
  781. // params.workOrder = '2311116';
  782. // params.machine = 'JY01#';
  783. params.workOrder = _ZC_gdbh.value;
  784. params.machine = _machine.value;
  785. params.printCode = 1;
  786. params.processCode = 1;
  787. console.log(params)
  788. const ProductionSchedulingAdd_stop = await ProductionSchedulingPause(params);
  789. console.log(ProductionSchedulingAdd_stop)
  790. if (ProductionSchedulingAdd_stop .code === 0) {
  791. const zhubiao = await MachineWorkOrderList({ machine:_machine.value, status: '排程' });
  792. chejianData.value = zhubiao.data;
  793. ElMessage({type: 'success',message: '暂停排产 更新成功'});
  794. } else {
  795. console.log(ygjbzledit_eddt);
  796. ElMessage({ type: 'error',message: '更新失败'})
  797. }
  798. }
  799. };
  800. //工序完工【按钮】
  801. const ongxwgClick = async () => {
  802. if(_ZC_gdbh.value == null || _ZC_gdbh.value == ''){
  803. onstatuslist.value = false;
  804. ElMessage({
  805. type: 'warning',
  806. message: '请选择制程中工单'
  807. })
  808. }else{
  809. // let combinedValue = `${_ZC_gdbh.value},${_PC_gdbh.value}`;
  810. // console.log(combinedValue);
  811. let params = {}
  812. params.workOrder = _ZC_gdbh.value;
  813. params.processCode = _gxh.value;
  814. console.log(params)
  815. const complete_get = await complete(params);
  816. console.log(complete_get)
  817. if (complete_get .code === 0) {
  818. const fubiao = await MachineWorkOrderList({ machine:_machine.value, status: '制程' });
  819. chejianfuData.value = fubiao.data;
  820. ElMessage({type: 'success',message: '工序完工 更新成功'})
  821. } else {
  822. ElMessage({ type: 'error',message: '更新失败'})
  823. }
  824. }
  825. };
  826. //加入排程【上面到下面】
  827. const _PC_gdbh = ref(null)
  828. const PC_handleChange = (arr) => {
  829. let str = arr.map((val) => val['工单编号']).join(",");
  830. console.log(str);
  831. _PC_gdbh.value = str;
  832. }
  833. //加入制程【下面到上面】
  834. const _ZC_gdbh = ref(null)
  835. const _gxh = ref(null)
  836. const ZP_handleChange = (arr) => {
  837. console.log(arr)
  838. let str = arr.map((val) => val['工单编号']).join(",");
  839. let gxh = arr.map((val) => val['gxh']).join(",");
  840. console.log(str);
  841. console.log(gxh);
  842. _ZC_gdbh.value = str;
  843. _gxh.value = gxh;
  844. }
  845. //机组调整【按钮】
  846. const onjztzClick = async () => {
  847. };
  848. //工序产量核查【按钮】
  849. const onprintClick = async () => {
  850. };
  851. //=========工序产量核查===========
  852. const gxclhclist = ref(false);
  853. const gxclhcformData = reactive({
  854. gdbh: '',
  855. gdmc: '',
  856. });
  857. //工序产量核查【按钮】
  858. const ongxclhcClick = async () => {
  859. gxclhclist.value = true;
  860. };
  861. //工序产量核查【回车】
  862. const _gxclhcgdbh = ref(null)
  863. const gxclhcProductValue = () => {
  864. if(fjformData['dqprocessName'] === ''){
  865. fjformData['dqprocessName'] = '';
  866. }
  867. _gxclhcgdbh.value = gxclhcformData['gdbh'];
  868. _ongetProductclick();
  869. }
  870. //工序产量核查【退出】
  871. const gxclhcCancel = async () => {
  872. gxclhclist.value = false;
  873. };
  874. //流程单查询【按钮】
  875. const onlcdlistClick = async () => {
  876. };
  877. //状态设置【按钮】
  878. const onstatuslist = ref(false);
  879. const statusformData = reactive({gdbh: '',});
  880. const status = ref('计划中'); // 默认选择在产
  881. const onStatusClick = () => {
  882. if(_Gd_gdbh.value == null){
  883. onstatuslist.value = false;
  884. ElMessage({
  885. type: 'warning',
  886. message: '请选择树形后,再操作此功能'
  887. })
  888. }else{
  889. statusformData['gdbh'] = _Gd_gdbh.value;
  890. onstatuslist.value = true;
  891. }
  892. };
  893. //工单状态设置【放弃按钮】
  894. const handleCancel = () => {
  895. onstatuslist.value = false;
  896. };
  897. //工单状态设置【执行按钮】
  898. const handleConfirm = async () => {
  899. //工单编号
  900. let workOrder = statusformData['gdbh'];
  901. //状态
  902. let statusCode;
  903. if (status.value === '计划中') {
  904. statusCode = "1-计划中";
  905. } else if (status.value === '生产中') {
  906. statusCode = "2-生产中";
  907. }else if (status.value === '已完工') {
  908. statusCode = "3-已完工";
  909. }
  910. const StatusEditdata = await StatusEdit({workOrder:workOrder,status:statusCode});
  911. if (StatusEditdata.code === 0) {
  912. ElMessage({
  913. type: 'success',
  914. message: '更新成功'
  915. })
  916. } else {
  917. ElMessage({
  918. type: 'error',
  919. message: '更新成功'
  920. })
  921. }
  922. onstatuslist.value = false;
  923. };
  924. // handleCancel(_stacode);
  925. const page = ref(1)
  926. const total = ref(0)
  927. const pageSize = ref(10)
  928. // 分页
  929. const handleSizeChange = (val) => {
  930. pageSize.value = val
  931. getTableData()
  932. }
  933. // 修改页面容量
  934. const handleCurrentChange = (val) => {
  935. page.value = val
  936. getTableData()
  937. }
  938. // 查询
  939. const getTableData = async() => {
  940. }
  941. getTableData()
  942. // ============== 表格控制部分结束 ===============
  943. // 获取需要的字典 可能为空 按需保留
  944. const setOptions = async () =>{
  945. }
  946. // 获取需要的字典 可能为空 按需保留
  947. setOptions()
  948. // 多选数据
  949. const multipleSelection = ref([])
  950. // 多选
  951. const handleSelectionChange = (val) => {
  952. multipleSelection.value = val
  953. }
  954. // 行为控制标记(弹窗内部需要增还是改)
  955. const type = ref('')
  956. //修改
  957. const updateCompanyFunc = async (row) => {
  958. console.log(row);
  959. dialogFormVisible.value = true;
  960. };
  961. // 打开弹窗
  962. const openDialog = () => {
  963. dialogFormVisible.value = true
  964. }
  965. // 弹窗确定
  966. const enterDialog = async () => {
  967. console.log("弹窗确定")
  968. }
  969. // 关闭弹窗
  970. const closeDialog = () => {dialogFormVisible.value = false}
  971. const cjsbpclist = ref(false);
  972. const cjsbpcformData = reactive({
  973. //设备代号
  974. sbdh: '',
  975. // 下拉框选项数据
  976. bancis: [],
  977. // 设置默认值
  978. banci: '',
  979. isBanciSelected: false,
  980. });
  981. //=============车间设备排程================
  982. //车间设备排程【按钮】
  983. const oncjsbpcClick = () => {
  984. cjsbpcformData['sbdh'] = 'WY01#';
  985. _EquipmentSchedulingdata();
  986. _ScheduleSelectiondata();
  987. cjsbpclist.value = true;
  988. };
  989. //班次选择列表
  990. const _ScheduleSelectiondata = async ()=>{
  991. try {
  992. const ScheduleSelectiondata = await ScheduleSelection();
  993. // 清空之前的数据
  994. cjsbpcformData.bancis = [];
  995. // 循环遍历数组并将每个班次的detail添加到bancis数组中
  996. for (const option of ScheduleSelectiondata.data) {
  997. cjsbpcformData.bancis.push({ label: option.detail, value: option.detail.split('||')[0], rename:option.detail});
  998. }
  999. console.log("赋值后的数据:", cjsbpcformData.bancis);
  1000. } catch (error) {
  1001. console.error(error);
  1002. }
  1003. }
  1004. //车间设备排程->数据展示
  1005. const _EquipmentSchedulingdata = async ()=>{
  1006. let machine = 'WY01#';
  1007. try {
  1008. const EquipmentSchedulingdata = await EquipmentScheduling({machine:machine});
  1009. console.log(EquipmentSchedulingdata)
  1010. } catch (error) {
  1011. console.error(error);
  1012. }
  1013. }
  1014. //车间设备排程->数据编辑
  1015. //车间设备排程【更新排程】
  1016. const oneditpcClick = () => {
  1017. console.log("更新排程")
  1018. cjsbpclist.value = true;
  1019. };
  1020. //车间设备排程【退出】
  1021. const cjsbpcCancel = () => {
  1022. cjsbpclist.value = false;
  1023. };
  1024. </script>
  1025. <style scoped>
  1026. :deep(.el-tabs__header){
  1027. margin-bottom: 0;
  1028. }
  1029. :deep(.el-table td .cell) {
  1030. line-height: 30px !important;
  1031. }
  1032. .JKWTree-container {
  1033. display: flex;
  1034. }
  1035. .JKWTree-tree {
  1036. width: 300px;
  1037. background-color: #fff;
  1038. padding: 10px;
  1039. margin-right: 20px;
  1040. }
  1041. .JKWTree-tree h3 {
  1042. font-size: 15px;
  1043. font-weight: 700;
  1044. margin: 10px 0;
  1045. }
  1046. .JKWTree-content {
  1047. flex: 1;
  1048. }
  1049. /* 选中某行时的背景色 */
  1050. :deep(.el-table__body tr.current-row) > td {
  1051. background: #ff80ff !important;
  1052. }
  1053. </style>
  1054. <style scoped>
  1055. :deep(.el-tabs__header){
  1056. margin-bottom: 0;
  1057. }
  1058. .search{
  1059. margin-left: 0px !important;
  1060. margin-right: 10px !important;
  1061. }
  1062. .bt{
  1063. margin-left: 2px !important;
  1064. padding: 3px !important;
  1065. font-size: 12px;
  1066. }
  1067. .el-tabs__header{
  1068. margin: 0px !important;
  1069. }
  1070. .gva-table-box{
  1071. padding: 0px !important;
  1072. }
  1073. .mab{
  1074. margin-bottom: 5px;
  1075. }
  1076. </style>
  1077. <style scoped>
  1078. :deep(.el-table td .cell) {
  1079. line-height: 20px !important;
  1080. }
  1081. :deep(.el-tabs__header){
  1082. margin-bottom: 0;
  1083. }
  1084. .search{
  1085. margin-left: 0px !important;
  1086. margin-right: 10px !important;
  1087. }
  1088. .bt{
  1089. margin-left: 2px !important;
  1090. padding: 3px !important;
  1091. font-size: 12px;
  1092. }
  1093. .el-tabs__header{
  1094. margin: 0px !important;
  1095. }
  1096. .gva-table-box{
  1097. padding: 0px !important;
  1098. }
  1099. .mab{
  1100. margin-bottom: 5px;
  1101. }
  1102. </style>