Manualdocuments.vue 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832
  1. <template>
  2. <div>
  3. <!-- 左侧树形结构 -->
  4. <el-container>
  5. <layout-sider :resize-directions="['right']" :width="220" style="margin-right: 10px;">
  6. <div class="JKWTree-tree" style="height: 70vh;">
  7. <h3>手工检验计件单据维护</h3>
  8. <el-tree :data="treeData" highlight-current @node-click="handleNodeClick" />
  9. </div>
  10. </layout-sider>
  11. <el-container>
  12. <el-main>
  13. <!-- 按钮区域 -->
  14. <div class="gva-table-box">
  15. <el-form-item>
  16. <el-input v-model="positionvalue" placeholder="输入工单编号或产品名称" style="width: 180px;" />
  17. <el-button type="primary" class="search" icon="search" @click="onSearch"></el-button>
  18. <el-button type="primary" class="bt" icon="plus" @click="onAdd">新增</el-button>
  19. <!-- <el-button type="primary" class="bt" icon="copy-document" @click="onCountByGdbh">切换显示方式</el-button> -->
  20. <el-button type="primary" class="bt" icon="refresh" @click="onRefresh">刷新质检系数</el-button>
  21. <el-button type="primary" class="bt" icon="delete" @click="onDel">删除</el-button>
  22. <div style="margin-left: auto;">
  23. <el-button type="primary" :icon="Download" @click="exportExcel">导出到Excel</el-button>
  24. </div>
  25. </el-form-item>
  26. <!-- 数据展示 -->
  27. <el-table ref="multipleTable" style="width: 100%" tooltip-effect="dark" :data="tableData"
  28. row-key="ID" highlight-current-row="true" border @selection-change="handleSelectionChange"
  29. @row-click="Click" :show-overflow-tooltip="true" @row-dblclick="doubleClick">
  30. <el-table-column type="selection" width="55" />
  31. <el-table-column align="left" sortable label="工单印件" prop="combinedProp" width="340" />
  32. <el-table-column align="left" sortable label="印件工序" prop="combinedProp2" width="150" />
  33. <el-table-column align="left" sortable label="日期" prop="sczl_rq" width="120" />
  34. <el-table-column align="left" sortable label="产量" prop="sczl_cl" width="77" />
  35. <el-table-column align="left" sortable label="千件工价" prop="千件工价" width="105" />
  36. <el-table-column align="left" sortable label="检验类别" prop="sczl_检验类别" width="105" />
  37. <el-table-column align="left" sortable label="废品率系数" prop="sczl_废品率系数" width="120" />
  38. <el-table-column align="left" sortable label="日定额" prop="日定额" width="91" />
  39. <el-table-column align="left" sortable label="组长编号" prop="sczl_bh0" width="105" />
  40. <el-table-column align="left" sortable label="组长姓名" prop="员工姓名" width="105" />
  41. <el-table-column align="left" sortable label="流程单备注" prop="qczl_NumDesc" width="120" />
  42. <el-table-column align="left" sortable label="创建用户" prop="sys_id" width="120" />
  43. <el-table-column align="left" sortable label="创建时间" prop="sys_rq" width="160" />
  44. <el-table-column align="left" sortable label="修改时间" prop="mod_rq" width="160" />
  45. <el-table-column align="left" sortable label="UNIQID" prop="UniqId" width="120" />
  46. </el-table>
  47. <!-- 分页 -->
  48. <div class="gva-pagination">
  49. <el-pagination layout="total, sizes, prev, pager, next, jumper" v-model:current-page="page"
  50. v-model:page-size="limit" :page-sizes="[10, 30, 50, 100]" :total="total"
  51. @current-change="handleCurrentChange" @size-change="handleSizeChange" />
  52. </div>
  53. </div>
  54. <!-- 弹出框 -->
  55. <el-dialog v-model="dialogFormVisible" :before-close="closeDialog"
  56. :title="type === 'create' ? '添加' : '修改'" destroy-on-close width="1000px">
  57. <el-form :model="formData" label-position="right" ref="elFormRef" :rules="rule"
  58. label-width="70px">
  59. <el-row :gutter="24">
  60. <el-col :span="4">
  61. <el-form-item label="日期" prop="id" class="mab">
  62. <el-input type="date" max="9999-12-31" v-model="formData.sczl_rq" id="日期"
  63. @focus="rqHandleFocus()" @keydown="ent1($event)" style="width: 120px; " />
  64. </el-form-item>
  65. </el-col>
  66. <el-col :span="4">
  67. <el-form-item label="组别" prop="name" label-width="90px" class="mab">
  68. <el-input v-model="formData.sczl_bzdh" id="组别" @keydown="ent1($event)"
  69. @blur="getBzsubmit()" style="width: 80px; " />
  70. </el-form-item>
  71. </el-col>
  72. <el-col :span="8">
  73. <el-form-item label="组长" prop="name" class="mab" label-width="50px">
  74. <el-input v-model="formData.sczl_bh0" id="bh0" @keydown="ent1($event)"
  75. @blur="getygsubmit($event, '0')" style="width: 100px; margin-right: 5px;" />
  76. <el-input v-model="formData.sczl_bh0_name" id="name0" :readonly=true
  77. @keydown="ent1($event)" style="width: 100px; " />
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="4">
  81. <el-form-item label="箱数" prop="name" class="mab" label-width="50px">
  82. <el-input v-model="formData.sczl_cl0" id="箱数" @keydown="ent1($event)"
  83. style="width: 100px; " />
  84. </el-form-item>
  85. </el-col>
  86. <el-col :span="4">
  87. <el-form-item label="每箱数" prop="name" class="mab" label-width="55px">
  88. <el-input v-model="formData.sczl_fp0" id="每箱数" @keydown="ent1($event)"
  89. style="width: 100px;" />
  90. </el-form-item>
  91. </el-col>
  92. </el-row>
  93. <el-row :gutter="24">
  94. <el-col :span="24">
  95. <el-form-item label="工单编号" prop="id" class="mab">
  96. <el-input v-model="formData.sczl_gdbh" id="工单编号" placeholder="Enter回车"
  97. @keydown="ent1($event)" @blur="getGxMcsubmit"
  98. style="width: 118px; margin-right: 5px;" />
  99. <el-input v-model="formData.sczl_yjgx" id="yjgx" :readonly="true"
  100. @keydown="ent1($event)" style="width: 80px; margin-right: 5px;" />
  101. <el-input v-model="formData.sczl_gxmc" id="gxmc" :readonly="true"
  102. @keydown="ent1($event)" style="width: 135px; margin-right: 5px;" />
  103. <el-input v-model="formData.yj_yjmc" id="yjmc" :readonly="true"
  104. @keydown="ent1($event)" style="width: 542px;" />
  105. </el-form-item>
  106. </el-col>
  107. </el-row>
  108. <el-row :gutter="24">
  109. <el-col :span="6">
  110. <el-form-item label="产量合计" prop="id" class="mab">
  111. <el-input v-model="formData.sczl_cl" id="产量合计" @keydown="ent1($event)"
  112. style="width: 150px;" />
  113. </el-form-item>
  114. </el-col>
  115. <el-col :span="6">
  116. <el-form-item label="定额代号" prop="id" label-width="100px" class="mab">
  117. <el-input v-model="formData.sczl_dedh" id="定额代号" @keydown="ent1($event)"
  118. @blur="getDedhsubmit" style="width: 150px;" />
  119. </el-form-item>
  120. </el-col>
  121. <el-col :span="6">
  122. <el-form-item label="检验类别" prop="name" class="mab">
  123. <el-input v-model="formData.sczl_检验类别" id="检验类别" placeholder="Enter回车"
  124. @keydown="ent1($event)" @blur="getLbsubmit" style="width: 150px;" />
  125. </el-form-item>
  126. </el-col>
  127. <el-col :span="6">
  128. <el-form-item label="废品率系数" prop="name" label-width="100px" class="mab">
  129. <el-input v-model="formData.sczl_废品率系数" id="废品率系数" @keydown="ent1($event)"
  130. style="width: 150px;" />
  131. </el-form-item>
  132. </el-col>
  133. </el-row>
  134. <el-row :gutter="24">
  135. <el-col :span="6">
  136. <el-form-item label="计时时数" prop="id" class="mab">
  137. <el-input v-model="formData.sczl_jsss" id="计时时数" @keydown="ent1($event)"
  138. style="width: 100px;" />
  139. </el-form-item>
  140. </el-col>
  141. <el-col :span="6">
  142. <el-form-item label="冲月定额" prop="id" class="mab" label-width="100px">
  143. <el-input v-model="formData.sczl_冲定额" id="冲月定额" placeholder="Enter回车"
  144. @keydown="ent1($event)" @blur="getCdesubmit()" style="width: 100px;" />
  145. </el-form-item>
  146. </el-col>
  147. </el-row>
  148. <el-row :gutter="24">
  149. <el-col :span="17">
  150. <el-form-item label="流程单号" prop="id" class="mab">
  151. <el-input v-model="formData.流程单号1" id="流程单号1" @keydown="ent1($event)"
  152. style="width: 60px; margin-right: 5px;" />
  153. <el-input v-model="formData.流程单号2" id="流程单号2" @keydown="ent1($event)"
  154. style="width: 60px; margin-right: 5px;" />
  155. <el-input v-model="formData.流程单号3" id="流程单号3" @keydown="ent1($event)"
  156. style="width: 60px; margin-right: 5px;" />
  157. <el-input v-model="formData.流程单号4" id="流程单号4" @keydown="ent1($event)"
  158. style="width: 60px; margin-right: 5px;" />
  159. <el-input v-model="formData.流程单号5" id="流程单号5" @keydown="ent1($event)"
  160. style="width: 60px; margin-right: 5px;" />
  161. <el-input v-model="formData.流程单号6" id="流程单号6" @keydown="ent1($event)"
  162. style="width: 60px; margin-right: 5px;" />
  163. <el-input v-model="formData.流程单号7" id="流程单号7" @keydown="ent1($event)"
  164. style="width: 60px; margin-right: 5px;" />
  165. <el-input v-model="formData.流程单号8" id="流程单号8" @keydown="ent1($event)"
  166. style="width: 60px; margin-right: 5px;" />
  167. <el-input v-model="formData.流程单号9" id="流程单号9" @keydown="ent1($event)"
  168. style="width: 60px;" />
  169. </el-form-item>
  170. </el-col>
  171. <el-col :span="7">
  172. <el-form-item label="备注" prop="id" label-width="50px">
  173. <el-input v-model="formData.qczl_NumDesc" id="备注" @keydown="ent1($event)" />
  174. </el-form-item>
  175. </el-col>
  176. </el-row>
  177. <el-row :gutter="19" style="margin-bottom: 5px; margin-left: 30px;">
  178. <span style="margin-left: 25px; margin-right: 50px;">员工编号</span>
  179. <span style="margin-right: 50px;">员工姓名</span>
  180. <span style="margin-right: 50px;">&nbsp;&nbsp;箱数&nbsp;&nbsp;</span>
  181. <span style="margin-right: 120px;">每箱数量</span>
  182. <span style="margin-right: 50px;">员工编号</span>
  183. <span style="margin-right: 50px;">员工姓名</span>
  184. <span style="margin-right: 50px;">&nbsp;&nbsp;箱数&nbsp;&nbsp;</span>
  185. <span>每箱数量</span>
  186. </el-row>
  187. <el-row :gutter="24" style="margin-bottom: 5px; margin-left: 30px;">
  188. <div style="width: 450px;margin-right: 30px;">
  189. <div v-for="index in 6" :key="index">
  190. <el-input style="width: 100px; margin-right: 5px;" placeholder="Enter回车"
  191. v-model="formData['sczl_bh' + index]" :id="'bh' + index"
  192. @keydown="ent($event, index.toString())" />
  193. <el-input style="width: 100px; margin-right: 5px; color: red;" :readonly="true"
  194. v-model="formData['sczl_bh' + index + '_name']" :id="'name' + index"
  195. @keydown="ent1($event)" />
  196. <el-input style="width: 100px; margin-right: 5px;"
  197. v-model="formData['sczl_cl' + index]" :id="'cl' + index"
  198. @keydown="ent1($event)" />
  199. <el-input style="width: 100px;" v-model="formData['sczl_fp' + index]"
  200. :id="'fp' + index" @keydown="ent1($event)" />
  201. </div>
  202. </div>
  203. <div style="width: 450px;">
  204. <div v-for="index in 6" :key="index + 6">
  205. <el-input style="width: 100px; margin-right: 5px;"
  206. v-model="formData['sczl_bh' + (index + 6)]" :id="'bh' + (index + 6)"
  207. @keydown="ent($event, (index + 6).toString())" />
  208. <el-input style="width: 100px; margin-right: 5px; color: red;" :readonly="true"
  209. v-model="formData['sczl_bh' + (index + 6) + '_name']"
  210. :id="'name' + (index + 6)" @keydown="ent1($event)" />
  211. <el-input style="width: 100px; margin-right: 5px;"
  212. v-model="formData['sczl_cl' + (index + 6)]" :id="'cl' + (index + 6)"
  213. @keydown="ent1($event)" />
  214. <el-input style="width: 100px;" v-model="formData['sczl_fp' + (index + 6)]"
  215. :id="'fp' + (index + 6)" @keydown="ent1($event)" />
  216. </div>
  217. </div>
  218. </el-row>
  219. <el-row :gutter="24">
  220. <el-col :span="24">
  221. <el-form-item label="其他备注" prop="id" class="mab">
  222. <el-input v-model="formData.sczl_desc" id="其他备注" @keydown="ent1($event)" />
  223. </el-form-item>
  224. </el-col>
  225. </el-row>
  226. </el-form>
  227. <el-dialog v-model="BzVisible" title="选择" destroy-on-close width="200px"
  228. @keydown="selectBZ($event)">
  229. <el-table tooltip-effect="dark" :data="selectDataBz" row-key="ID"
  230. highlight-current-row="true" border style="width:100%" @row-dblclick="SelectClickBz"
  231. ref="table">
  232. <el-table-column prop="sczl_bzdh" label="班组" width="150" />
  233. </el-table>
  234. </el-dialog>
  235. <el-dialog v-model="CdeVisible" title="选择" destroy-on-close width="200px"
  236. @keydown="selectCde($event)">
  237. <el-table tooltip-effect="dark" :data="selectDataCde" row-key="ID"
  238. highlight-current-row="true" border style="width:100%" :row-style="{ height: '30px' }"
  239. @row-dblclick="SelectClickCde" ref="tableCde">
  240. <el-table-column prop="sczl_冲定额" width="150" />
  241. </el-table>
  242. </el-dialog>
  243. <el-dialog v-model="dialogSelectVisible" title="选择" destroy-on-close width="800px"
  244. @keydown="selectGX($event)">
  245. <el-table tooltip-effect="dark" :data="selectData" row-key="ID" highlight-current-row="true"
  246. border style="width:100%" @row-dblclick="handleSelectClick" ref="table2">
  247. <el-table-column prop="Gd_cpmc" label="印件名称" width="450" />
  248. <el-table-column prop="jyGx" label="检验工序" width="85" />
  249. <el-table-column prop="Gy0_gxmc" label="工序名称" width="225" />
  250. </el-table>
  251. </el-dialog>
  252. <template #footer>
  253. <div class="dialog-footer">
  254. <el-button @click="closeDialog">取 消</el-button>
  255. <el-button type="primary" @click="enterDialog">确 定</el-button>
  256. </div>
  257. </template>
  258. </el-dialog>
  259. <el-dialog v-model="GetDedhVisible" title="选择" destroy-on-close width="600px">
  260. <el-aside width="250px">
  261. <div class="JKWTree-tree">
  262. <el-tree :data="GetDedhtreeData" :props="defaultProps" highlight-current="true"
  263. @node-click="GetDedhhandleNodeClick"
  264. @node-dblclick="handleNodeDoubleClick"></el-tree>
  265. </div>
  266. </el-aside>
  267. </el-dialog>
  268. <el-dialog v-model="LbVisible" title="选择" destroy-on-close width="200px"
  269. @keydown="selectJY($event)">
  270. <el-table tooltip-effect="dark" :data="selectDataLb" row-key="ID" highlight-current-row="true"
  271. border style="width:100%" :row-style="{ height: '30px' }" @row-dblclick="SelectClickLb"
  272. ref="table3">
  273. <el-table-column prop="sczl_检验类别" label="可选名称" width="150" />
  274. </el-table>
  275. </el-dialog>
  276. <!-- 员工选择 -->
  277. <el-dialog v-model="dialogSelectVisible_Yg" title="选择" destroy-on-close width="300px"
  278. @keydown="selectGX_Yg($event)">
  279. <el-table tooltip-effect="dark" :data="selectData_Yg" row-key="ID" highlight-current-row="true"
  280. border style="width:100%" @row-dblclick="handleSelectClick_Yg" ref="table_Yg">
  281. <el-table-column prop="员工编号" label="员工编号" width="100" />
  282. <el-table-column prop="ygxm" label="员工姓名" width="200" />
  283. </el-table>
  284. </el-dialog>
  285. </el-main>
  286. </el-container>
  287. </el-container>
  288. </div>
  289. </template>
  290. <script setup>
  291. import {
  292. getDateList,
  293. getInspectCount,
  294. shougonglocate,
  295. shougonggetInfo,
  296. shougonggetGxMc,
  297. shougonggetDedh,
  298. shougonggetScrapFactor,
  299. shougongedit,
  300. shougongdel,
  301. getYg,
  302. getInspectCountByGdbh,
  303. inspectadd
  304. } from '@/api/jixiaoguanli/jitairibaobiao'
  305. // 全量引入格式化工具 请按需保留
  306. import {
  307. getDictFunc,
  308. formatDate,
  309. formatBoolean,
  310. filterDict,
  311. ReturnArrImg,
  312. onDownloadFile
  313. } from '@/utils/format'
  314. import {
  315. ElMessage,
  316. ElMessageBox
  317. } from 'element-plus'
  318. import {
  319. Search,
  320. Refresh,
  321. Download
  322. } from '@element-plus/icons-vue'
  323. import {
  324. ref,
  325. reactive,
  326. nextTick,
  327. onMounted,
  328. onBeforeMount
  329. } from 'vue'
  330. import {
  331. getPackingSideTable,
  332. getPackingTable
  333. } from '@/api/mes_api_gty/myapi'
  334. import {
  335. Layout,
  336. LayoutContent,
  337. LayoutHeader,
  338. LayoutSider
  339. } from '@arco-design/web-vue'
  340. import {
  341. useUserStore
  342. } from '@/pinia/modules/user'
  343. const userStore = useUserStore()
  344. const sys_id = '[' + userStore.userInfo.userName + '/' + userStore.userInfo.nickName + ']'
  345. defineOptions({
  346. name: '06-packingDocuments'
  347. })
  348. // 侧边栏数据请求
  349. const treeData = reactive([]);
  350. const getTabdata = async () => {
  351. //接口调用函数
  352. const response = await getInspectCount();
  353. const transformedData = response.data.map(item => ({
  354. label: `${item.date.replace(/-/g, '.')}【单据数: ${item.counts}张】`,
  355. children: item.sys.map(sysItem => ({
  356. label: `${sysItem.sys_id} 【记录数: ${sysItem.count}张】`,
  357. params: {
  358. date: item.date.replace(/-/g, '.'),
  359. sys_id: sysItem.sys_id,
  360. total: sysItem.count,
  361. },
  362. })),
  363. }));
  364. treeData.splice(0, treeData.length, ...transformedData);
  365. displayMod.value = 'date'
  366. }
  367. getTabdata();
  368. // 自动化生成的字典(可能为空)以及字段
  369. const formData = ref({
  370. sczl_rq: '',
  371. sczl_bzdh: '',
  372. sczl_bh0: '',
  373. sczl_bh0_name: '',
  374. sczl_cl0: '',
  375. sczl_fp0: '',
  376. sczl_gdbh: '',
  377. sczl_yjgx: '',
  378. sczl_gxmc: '',
  379. yj_yjmc: '',
  380. sczl_cl: '',
  381. sczl_dedh: '',
  382. sczl_检验类别: '',
  383. sczl_废品率系数: '',
  384. sczl_jsss: '',
  385. sczl_冲定额: '',
  386. 流程单号1: '',
  387. 流程单号2: '',
  388. 流程单号3: '',
  389. 流程单号4: '',
  390. 流程单号5: '',
  391. 流程单号6: '',
  392. 流程单号7: '',
  393. 流程单号8: '',
  394. 流程单号9: '',
  395. qczl_NumDesc: '',
  396. sczl_desc: '',
  397. sczl_bh1: '',
  398. sczl_bh2: '',
  399. sczl_bh3: '',
  400. sczl_bh4: '',
  401. sczl_bh5: '',
  402. sczl_bh6: '',
  403. sczl_bh7: '',
  404. sczl_bh8: '',
  405. sczl_bh9: '',
  406. sczl_bh10: '',
  407. sczl_bh11: '',
  408. sczl_bh12: '',
  409. sczl_bh1_name: '',
  410. sczl_bh2_name: '',
  411. sczl_bh3_name: '',
  412. sczl_bh4_name: '',
  413. sczl_bh5_name: '',
  414. sczl_bh6_name: '',
  415. sczl_bh7_name: '',
  416. sczl_bh8_name: '',
  417. sczl_bh9_name: '',
  418. sczl_bh10_name: '',
  419. sczl_bh11_name: '',
  420. sczl_bh12_name: '',
  421. sczl_cl1: '',
  422. sczl_cl2: '',
  423. sczl_cl3: '',
  424. sczl_cl4: '',
  425. sczl_cl5: '',
  426. sczl_cl6: '',
  427. sczl_cl7: '',
  428. sczl_cl8: '',
  429. sczl_cl9: '',
  430. sczl_cl10: '',
  431. sczl_cl11: '',
  432. sczl_cl12: '',
  433. sczl_fp1: '',
  434. sczl_fp2: '',
  435. sczl_fp3: '',
  436. sczl_fp4: '',
  437. sczl_fp5: '',
  438. sczl_fp6: '',
  439. sczl_fp7: '',
  440. sczl_fp8: '',
  441. sczl_fp9: '',
  442. sczl_fp10: '',
  443. sczl_fp11: '',
  444. sczl_fp12: '',
  445. })
  446. // 验证规则
  447. const rule = reactive({})
  448. const elFormRef = ref()
  449. const elSearchFormRef = ref()
  450. // =========== 表格控制部分 ===========
  451. const tableData = reactive([])
  452. const detailData = reactive([])
  453. const total = ref(0)
  454. const page = ref(1)
  455. const limit = ref(10)
  456. const searchInfo = ref('')
  457. const params = {
  458. type: '',
  459. date: '',
  460. sys_id: '',
  461. gdbh: '',
  462. }
  463. // 分页设置
  464. const handleSizeChange = (val) => {
  465. switch (params.type) {
  466. case 'getTableData':
  467. getTableData()
  468. break
  469. case 'getLocateTable':
  470. GetLocate()
  471. break
  472. default:
  473. break
  474. }
  475. }
  476. // 页面跳转
  477. const handleCurrentChange = (val) => {
  478. switch (params.type) {
  479. case 'getTableData':
  480. getTableData()
  481. break
  482. case 'getLocateTable':
  483. GetLocate()
  484. break
  485. default:
  486. break
  487. }
  488. console.log(params.type)
  489. }
  490. const getTableData = async () => {
  491. // const response = await getDateList(params);
  492. // console.log(response)
  493. // if (response.code === 0) {
  494. // const processedData = response.data.data.map(item => {
  495. // return {
  496. // ...item,
  497. // combinedProp: item.sczl_gdbh + '--'+item.yj_yjmc,
  498. // combinedProp2: item.sczl_yjgx + '-'+item.sczl_gxmc
  499. // };
  500. // });
  501. // tableData.splice(0, tableData.length, ...processedData);
  502. // }
  503. const response = await getDateList({
  504. date: params.date,
  505. sys_id: params.sys_id,
  506. page: page.value.toString(),
  507. limit: limit.value.toString(),
  508. })
  509. if (response.code === 0) {
  510. const processedData = response.data.data.map(item => {
  511. return {
  512. ...item,
  513. combinedProp: item.sczl_gdbh + '--' + item.yj_yjmc,
  514. combinedProp2: item.sczl_yjgx + '-' + item.sczl_gxmc
  515. };
  516. });
  517. tableData.splice(0, tableData.length, ...processedData);
  518. }
  519. }
  520. const handleNodeClick = (node, check) => {
  521. //存放当前节点的nodeId
  522. if (node.params) {
  523. params.date = node.params.date.replace(/\./g, '-');
  524. params.sys_id = node.params.sys_id;
  525. params.type = 'getTableData'
  526. total.value = node.params.total;
  527. page.value = 1
  528. getTableData();
  529. }
  530. }
  531. //定位
  532. const GetLocate = async () => {
  533. const response = await shougonglocate({
  534. gdbh: params.gdbh,
  535. page: page.value.toString(),
  536. limit: limit.value.toString(),
  537. })
  538. if (response.code === 0) {
  539. const processedData = response.data.rows.map(item => {
  540. return {
  541. ...item,
  542. combinedProp: item.sczl_gdbh + '--' + item.yj_yjmc,
  543. combinedProp2: item.sczl_yjgx + '-' + item.sczl_gxmc
  544. };
  545. });
  546. total.value = response.data.total
  547. tableData.splice(0, tableData.length, ...processedData);
  548. }
  549. }
  550. let positionvalue = ref()
  551. // 搜索
  552. function onSearch() {
  553. params.gdbh = positionvalue.value
  554. params.type = 'getLocateTable'
  555. page.value = 1
  556. GetLocate()
  557. }
  558. //获取详细信息
  559. const GetInfo = async (value) => {
  560. const response = await shougonggetInfo({ UniqId: value });
  561. if (response.code === 0) {
  562. formData.value = response.data;
  563. }
  564. }
  565. //键盘 input框跳转
  566. const ent1 = (event) => {
  567. const inputs = document.getElementsByTagName('input');
  568. const currentIndex = Array.from(inputs).indexOf(event.target);
  569. if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
  570. if (event.target.id == '其他备注') {
  571. ElMessageBox.confirm('数据存盘?', '提示', {
  572. confirmButtonText: '确定',
  573. cancelButtonText: '取消',
  574. type: 'warning'
  575. }).then(() => {
  576. enterDialog()
  577. })
  578. }
  579. for (let i = currentIndex + 1; i < inputs.length; i++) {
  580. if (!inputs[i].readOnly) {
  581. nextTick(() => {
  582. inputs[i].focus();
  583. inputs[i].select();
  584. })
  585. break;
  586. }
  587. }
  588. if (event.target.id.substring(0, 2) == 'cl' || event.target.id.substring(0, 2) == 'fp') {
  589. ent_sum()
  590. }
  591. } else if (event.keyCode === 38) { // 向上箭头
  592. for (let i = currentIndex - 1; i >= 0; i--) {
  593. if (!inputs[i].readOnly) {
  594. nextTick(() => {
  595. inputs[i].focus();
  596. inputs[i].select();
  597. })
  598. break;
  599. }
  600. }
  601. if (event.target.id.substring(0, 2) == 'cl' || event.target.id.substring(0, 2) == 'fp') {
  602. ent_sum()
  603. }
  604. } else if (event.keyCode === 8) { // 删除箭头
  605. if (event.target.selectionStart === 0) {
  606. for (let i = currentIndex - 1; i >= 0; i--) {
  607. if (!inputs[i].readOnly) {
  608. nextTick(() => {
  609. inputs[i].focus();
  610. inputs[i].setSelectionRange(0, 0);
  611. })
  612. break;
  613. }
  614. }
  615. if (event.target.id.substring(0, 2) == 'cl' || event.target.id.substring(0, 2) == 'fp') {
  616. ent_sum()
  617. }
  618. }
  619. } else if (event.keyCode === 37) { // 向左箭头
  620. if (event.target.selectionStart === 0) {
  621. for (let i = currentIndex - 1; i >= 0; i--) {
  622. if (!inputs[i].readOnly) {
  623. nextTick(() => {
  624. inputs[i].focus();
  625. inputs[i].select();
  626. })
  627. break;
  628. }
  629. }
  630. if (event.target.id.substring(0, 2) == 'cl' || event.target.id.substring(0, 2) == 'fp') {
  631. ent_sum()
  632. }
  633. }
  634. } else if (event.keyCode === 39) { // 向右箭头
  635. if (event.target.id == '其他备注') {
  636. ElMessageBox.confirm('数据存盘?', '提示', {
  637. confirmButtonText: '确定',
  638. cancelButtonText: '取消',
  639. type: 'warning'
  640. }).then(() => {
  641. enterDialog()
  642. })
  643. }
  644. if (event.target.selectionStart === event.target.value.length) {
  645. for (let i = currentIndex + 1; i < inputs.length; i++) {
  646. if (!inputs[i].readOnly) {
  647. nextTick(() => {
  648. inputs[i].focus();
  649. inputs[i].select();
  650. })
  651. break;
  652. }
  653. }
  654. }
  655. if (event.target.id.substring(0, 2) == 'cl' || event.target.id.substring(0, 2) == 'fp') {
  656. ent_sum()
  657. }
  658. }
  659. }
  660. //追加字体颜色和不可输入
  661. const setColorReadonly = (id) => {
  662. const newInput = document.getElementById(id)
  663. newInput.style.color = 'red';
  664. newInput.setAttribute('readonly', true);
  665. }
  666. //追加字体颜色和可输入
  667. const unsetColorReadonly = (id) => {
  668. const newInput = document.getElementById(id)
  669. newInput.style.color = 'black';
  670. newInput.removeAttribute('readonly');
  671. }
  672. //日期获得焦点事件
  673. const rqHandleFocus = () => {
  674. if (formData.value.sczl_rq == '') {
  675. formData.value.sczl_rq = new Date().toISOString().split('T')[0]
  676. }
  677. }
  678. const num = ref(0)
  679. //班组失去焦点事件
  680. const getBzsubmit = () => {
  681. //弹出选择
  682. const data = [{
  683. 'sczl_bzdh': 'A班'
  684. }, {
  685. 'sczl_bzdh': 'B班'
  686. }]
  687. selectDataBz.splice(0, selectDataBz.length, ...data)
  688. BzVisible.value = true
  689. setCurrent(data[0])
  690. }
  691. const table = ref()
  692. const setCurrent = (row) => {
  693. setTimeout(() => {
  694. table.value?.setCurrentRow(row)
  695. const {
  696. sczl_bzdh
  697. } = row
  698. formData.value.sczl_bzdh = row.sczl_bzdh
  699. })
  700. }
  701. //班组选择
  702. const selectDataBz = reactive([])
  703. const BzVisible = ref(false)
  704. const SelectClickBz = (row, column, event) => {
  705. const {
  706. sczl_bzdh
  707. } = row
  708. formData.value.sczl_bzdh = row.sczl_bzdh
  709. BzVisible.value = false
  710. }
  711. const selectBZ = (event) => {
  712. if (event.keyCode === 40) { // Enter 或向下箭头
  713. setCurrent(selectDataBz[1]);
  714. } else if (event.keyCode === 38) {
  715. setCurrent(selectDataBz[0]);
  716. } else if (event.keyCode === 13) {
  717. BzVisible.value = false
  718. }
  719. }
  720. //冲定额失去焦点事件
  721. const getCdesubmit = () => {
  722. //弹出选择
  723. const data = [{
  724. 'sczl_冲定额': ''
  725. }, {
  726. 'sczl_冲定额': '是'
  727. }]
  728. selectDataCde.splice(0, selectDataCde.length, ...data)
  729. CdeVisible.value = true
  730. setCdeCurrent(data[0])
  731. }
  732. const tableCde = ref()
  733. const setCdeCurrent = (row) => {
  734. setTimeout(() => {
  735. tableCde.value?.setCurrentRow(row)
  736. const {
  737. sczl_冲定额
  738. } = row
  739. formData.value.sczl_冲定额 = row.sczl_冲定额
  740. })
  741. }
  742. //冲定额选择
  743. const selectDataCde = reactive([])
  744. const CdeVisible = ref(false)
  745. const SelectClickCde = (row, column, event) => {
  746. const {
  747. sczl_冲定额
  748. } = row
  749. formData.value.sczl_冲定额 = row.sczl_冲定额
  750. CdeVisible.value = false
  751. }
  752. const selectCde = (event) => {
  753. if (event.keyCode === 40) { // Enter 或向下箭头
  754. setCdeCurrent(selectDataCde[1]);
  755. } else if (event.keyCode === 38) {
  756. setCdeCurrent(selectDataCde[0]);
  757. } else if (event.keyCode === 13) {
  758. CdeVisible.value = false
  759. }
  760. }
  761. //员工编号失去焦点事件
  762. const getygsubmit = async (event, inputName) => {
  763. let combinedString = 'sczl_bh' + inputName;
  764. let value = eval('formData.value.' + combinedString);
  765. if (value) {
  766. const response = await getYg({
  767. sczl_bh: value
  768. });
  769. console.log(response)
  770. if (response.code === 0) {
  771. let Bname = 'sczl_bh' + inputName + '_name';
  772. formData.value[Bname] = response.data[0].ygxm;
  773. //设置姓名样式
  774. if (inputName > 0) {
  775. unsetColorReadonly('cl' + inputName)
  776. unsetColorReadonly('fp' + inputName)
  777. }
  778. }
  779. }
  780. }
  781. const ent_sum = () => {
  782. let sum = 0;
  783. for (var i = 1; i <= 12; i++) {
  784. sum += formData.value['sczl_cl' + i] * formData.value['sczl_fp' + i]
  785. }
  786. formData.value.sczl_cl = sum
  787. }
  788. let Bname = '';
  789. let Bbh = '';
  790. let input_name = '';
  791. //员工编号键盘事件
  792. const ent = (event, inputName) => {
  793. input_name = inputName;
  794. let combinedString = 'sczl_bh' + inputName;
  795. let value = eval('formData.value.' + combinedString);
  796. if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
  797. if (value) {
  798. getYg({ sczl_bh: value }).then(response => {
  799. if (response.code == 0) {
  800. Bname = 'sczl_bh' + inputName + '_name';
  801. Bbh = 'sczl_bh' + inputName;
  802. if (response.data.length == 1) {
  803. formData.value[Bname] = response.data[0].ygxm
  804. formData.value[Bbh] = response.data[0].员工编号
  805. //设置姓名样式
  806. unsetColorReadonly('cl' + inputName)
  807. unsetColorReadonly('fp' + inputName)
  808. document.getElementById('cl' + inputName).focus()
  809. document.getElementById('cl' + inputName).select()
  810. } else if (response.data.length > 1) {
  811. selectData_Yg.splice(0, selectData_Yg.length, ...response.data)
  812. setGXCurrent_Yg(selectData_Yg[0])
  813. dialogSelectVisible_Yg.value = true
  814. } else {
  815. ElMessage({
  816. type: 'warning',
  817. message: '未查询到该员工'
  818. })
  819. formData.value['sczl_bh' + inputName + '_name'] = '';
  820. formData.value['sczl_cl' + inputName] = '0';
  821. formData.value['sczl_fp' + inputName] = '0';
  822. //设置姓名样式
  823. setColorReadonly('cl' + inputName);
  824. setColorReadonly('fp' + inputName);
  825. if (inputName != 12) {
  826. document.getElementById('bh' + (parseInt(inputName) + 1)).focus()
  827. document.getElementById('bh' + (parseInt(inputName) + 1)).select()
  828. } else {
  829. document.getElementById('其他备注').focus()
  830. document.getElementById('其他备注').select()
  831. }
  832. }
  833. // formData.value[Bname] = response.data[0].ygxm;
  834. // formData.value[Bbh] = response.data[0].员工编号;
  835. // //设置姓名样式
  836. // unsetColorReadonly('cl' + inputName)
  837. // unsetColorReadonly('fp' + inputName)
  838. // document.getElementById('cl' + inputName).focus()
  839. // document.getElementById('cl' + inputName).select()
  840. } else {
  841. formData.value['sczl_bh' + inputName + '_name'] = '';
  842. formData.value['sczl_cl' + inputName] = '0';
  843. formData.value['sczl_fp' + inputName] = '0';
  844. //设置姓名样式
  845. setColorReadonly('cl' + inputName);
  846. setColorReadonly('fp' + inputName);
  847. if (inputName != 12) {
  848. document.getElementById('bh' + (parseInt(inputName) + 1)).focus()
  849. document.getElementById('bh' + (parseInt(inputName) + 1)).select()
  850. } else {
  851. document.getElementById('其他备注').focus()
  852. document.getElementById('其他备注').select()
  853. }
  854. }
  855. });
  856. } else {
  857. formData.value['sczl_bh' + inputName + '_name'] = '';
  858. formData.value['sczl_cl' + inputName] = '0';
  859. formData.value['sczl_fp' + inputName] = '0';
  860. //设置姓名样式
  861. setColorReadonly('cl' + inputName);
  862. setColorReadonly('fp' + inputName);
  863. if (inputName != 12) {
  864. document.getElementById('bh' + (parseInt(inputName) + 1)).focus()
  865. document.getElementById('bh' + (parseInt(inputName) + 1)).select()
  866. } else {
  867. document.getElementById('其他备注').focus()
  868. document.getElementById('其他备注').select()
  869. }
  870. }
  871. ent_sum()
  872. } else if (event.keyCode === 38) { // 向上箭头
  873. if (inputName != 1) {
  874. if (document.getElementById('fp' + (parseInt(inputName) - 1)).readOnly) {
  875. document.getElementById('bh' + (parseInt(inputName) - 1)).focus()
  876. document.getElementById('bh' + (parseInt(inputName) - 1)).select()
  877. } else {
  878. document.getElementById('fp' + (parseInt(inputName) - 1)).focus()
  879. document.getElementById('fp' + (parseInt(inputName) - 1)).select()
  880. }
  881. } else {
  882. document.getElementById('备注').focus()
  883. document.getElementById('备注').select()
  884. }
  885. ent_sum()
  886. } else if (event.keyCode === 8) { // 删除箭头
  887. if (event.target.selectionStart === 0) {
  888. if (inputName != 1) {
  889. if (document.getElementById('fp' + (parseInt(inputName) - 1)).readOnly) {
  890. document.getElementById('bh' + (parseInt(inputName) - 1)).focus()
  891. document.getElementById('bh' + (parseInt(inputName) - 1)).setSelectionRange(0, 0)
  892. } else {
  893. document.getElementById('fp' + (parseInt(inputName) - 1)).focus()
  894. document.getElementById('fp' + (parseInt(inputName) - 1)).setSelectionRange(0, 0)
  895. }
  896. } else {
  897. document.getElementById('备注').focus()
  898. document.getElementById('备注').setSelectionRange(0, 0)
  899. }
  900. ent_sum()
  901. }
  902. } else if (event.keyCode === 37) { // 向左箭头
  903. if (event.target.selectionStart === 0) {
  904. if (inputName != 1) {
  905. if (document.getElementById('fp' + (parseInt(inputName) - 1)).readOnly) {
  906. document.getElementById('bh' + (parseInt(inputName) - 1)).focus()
  907. document.getElementById('bh' + (parseInt(inputName) - 1)).select()
  908. } else {
  909. document.getElementById('fp' + (parseInt(inputName) - 1)).focus()
  910. document.getElementById('fp' + (parseInt(inputName) - 1)).select()
  911. }
  912. } else {
  913. document.getElementById('备注').focus()
  914. document.getElementById('备注').select()
  915. }
  916. ent_sum()
  917. }
  918. } else if (event.keyCode === 39) { // 向右箭头
  919. if (event.target.selectionStart === event.target.value.length) {
  920. if (inputName != 12) {
  921. document.getElementById('bh' + (parseInt(inputName) + 1)).focus()
  922. document.getElementById('bh' + (parseInt(inputName) + 1)).select()
  923. } else {
  924. document.getElementById('其他备注').focus()
  925. document.getElementById('其他备注').select()
  926. }
  927. ent_sum()
  928. }
  929. }
  930. }
  931. //员工选择
  932. const dialogSelectVisible_Yg = ref(false)
  933. const selectData_Yg = reactive([])
  934. // 处理选择框
  935. const handleSelectClick_Yg = (row, column, event) => {
  936. formData.value[Bname] = row.ygxm
  937. formData.value[Bbh] = row.员工编号
  938. //设置姓名样式
  939. unsetColorReadonly('cl' + input_name)
  940. unsetColorReadonly('fp' + input_name)
  941. document.getElementById('cl' + input_name).focus()
  942. document.getElementById('cl' + input_name).select()
  943. ent_sum()
  944. dialogSelectVisible_Yg.value = false
  945. }
  946. const currentIndex_Yg = ref(0);
  947. const GXCurrent_Yg = ref(0);
  948. const selectGX_Yg = (event) => {
  949. if (event.keyCode === 40) { // 向下箭头
  950. if (currentIndex_Yg.value < selectData_Yg.length - 1) {
  951. currentIndex_Yg.value++;
  952. setGXCurrent_Yg(selectData_Yg[currentIndex_Yg.value]);
  953. } else {
  954. currentIndex_Yg.value = 0;
  955. setGXCurrent_Yg(selectData_Yg[currentIndex_Yg.value]); // 到达最后一行时回到第一行
  956. }
  957. } else if (event.keyCode === 38) { // 向上箭头
  958. if (currentIndex_Yg.value > 0) {
  959. currentIndex_Yg.value--;
  960. setGXCurrent_Yg(selectData_Yg[currentIndex_Yg.value]);
  961. } else {
  962. currentIndex_Yg.value = selectData_Yg.length - 1;
  963. setGXCurrent_Yg(selectData_Yg[currentIndex_Yg.value]); // 到达第一行时回到最后一行
  964. }
  965. } else if (event.keyCode === 13) { // 回车键
  966. dialogSelectVisible_Yg.value = false;
  967. }
  968. }
  969. const table_Yg = ref()
  970. const setGXCurrent_Yg = (row) => {
  971. setTimeout(() => {
  972. table_Yg.value?.setCurrentRow(row)
  973. formData.value[Bname] = row.ygxm
  974. formData.value[Bbh] = row.员工编号
  975. //设置姓名样式
  976. unsetColorReadonly('cl' + input_name)
  977. unsetColorReadonly('fp' + input_name)
  978. document.getElementById('cl' + input_name).focus()
  979. document.getElementById('cl' + input_name).select()
  980. ent_sum()
  981. })
  982. }
  983. const getGxMcsubmit = async () => {
  984. if (formData.value.sczl_gdbh != '') {
  985. const response = await shougonggetGxMc({
  986. gdbh: formData.value.sczl_gdbh
  987. });
  988. if (response.code === 0) {
  989. if (response.data.length == 0) {
  990. ElMessage({
  991. type: 'error',
  992. message: '查无此编号的工单,请仔细检查后重新输入'
  993. })
  994. //设置输入框的值为空
  995. formData.value.sczl_gdbh = ''
  996. formData.value.sczl_yjgx = ''
  997. formData.value.sczl_gxmc = ''
  998. formData.value.yj_yjmc = ''
  999. } else if (response.data.length == 1) {
  1000. const {
  1001. Gd_cpmc,
  1002. Gy0_yjno,
  1003. Gy0_gxh,
  1004. Gy0_gxmc,
  1005. jyGx
  1006. } = response.data[0]
  1007. formData.value.yj_yjmc = Gd_cpmc
  1008. formData.value.sczl_gxmc = Gy0_gxmc
  1009. formData.value.sczl_yjgx = jyGx
  1010. setColorReadonly('yjgx');
  1011. setColorReadonly('gxmc');
  1012. setColorReadonly('yjmc');
  1013. } else {
  1014. if (GetDedhVisible.value) {
  1015. return false
  1016. }
  1017. selectData.splice(0, selectData.length, ...response.data)
  1018. dialogSelectVisible.value = true
  1019. setGXCurrent(selectData[0])
  1020. }
  1021. }
  1022. } else {
  1023. ElMessage({
  1024. type: 'error',
  1025. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  1026. })
  1027. formData.value.sczl_yjgx = ''
  1028. formData.value.sczl_gxmc = ''
  1029. formData.value.yj_yjmc = ''
  1030. }
  1031. }
  1032. const dialogSelectVisible = ref(false)
  1033. const selectData = reactive([])
  1034. // 工单选择框
  1035. const handleSelectClick = (row, column, event) => {
  1036. const {
  1037. Gd_cpmc,
  1038. Gy0_yjno,
  1039. Gy0_gxh,
  1040. Gy0_gxmc,
  1041. jyGx
  1042. } = row
  1043. formData.value.yj_yjmc = Gd_cpmc
  1044. formData.value.sczl_gxmc = Gy0_gxmc
  1045. formData.value.sczl_yjgx = jyGx
  1046. setColorReadonly('yjgx');
  1047. setColorReadonly('gxmc');
  1048. setColorReadonly('yjmc');
  1049. dialogSelectVisible.value = false
  1050. }
  1051. const currentIndex = ref(0);
  1052. const GXCurrent = ref(0);
  1053. const selectGX = (event) => {
  1054. if (event.keyCode === 40) { // 向下箭头
  1055. if (currentIndex.value < selectData.length - 1) {
  1056. currentIndex.value++;
  1057. setGXCurrent(selectData[currentIndex.value]);
  1058. } else {
  1059. currentIndex.value = 0;
  1060. setGXCurrent(selectData[currentIndex.value]); // 到达最后一行时回到第一行
  1061. }
  1062. } else if (event.keyCode === 38) { // 向上箭头
  1063. if (currentIndex.value > 0) {
  1064. currentIndex.value--;
  1065. setGXCurrent(selectData[currentIndex.value]);
  1066. } else {
  1067. currentIndex.value = selectData.length - 1;
  1068. setGXCurrent(selectData[currentIndex.value]); // 到达第一行时回到最后一行
  1069. }
  1070. } else if (event.keyCode === 13) { // 回车键
  1071. dialogSelectVisible.value = false;
  1072. }
  1073. }
  1074. const table2 = ref()
  1075. const setGXCurrent = (row) => {
  1076. setTimeout(() => {
  1077. table2.value?.setCurrentRow(row)
  1078. const {
  1079. Gd_cpmc,
  1080. Gy0_yjno,
  1081. Gy0_gxh,
  1082. Gy0_gxmc,
  1083. jyGx
  1084. } = row
  1085. formData.value.yj_yjmc = Gd_cpmc
  1086. formData.value.sczl_gxmc = Gy0_gxmc
  1087. formData.value.sczl_yjgx = jyGx
  1088. })
  1089. }
  1090. //定额代号回车事件
  1091. const getDedhsubmit = () => {
  1092. if (dialogSelectVisible.value) {
  1093. return false
  1094. }
  1095. if (LbVisible.value) {
  1096. return false
  1097. }
  1098. GetDedh()
  1099. }
  1100. let GetDedhtreeData = reactive([]);
  1101. const GetDedhVisible = ref(false)
  1102. //获取定额代号
  1103. const GetDedh = async (value) => {
  1104. const response = await shougonggetDedh();
  1105. const treeData = {};
  1106. // const data = [];
  1107. // data[0] = response.data;
  1108. // //判断值是否在选项中存在
  1109. // const buildTree1 = (node) => {
  1110. // const arr = [];
  1111. // // 如果存在子节点,递归地添加它们
  1112. // if (node.bh_mc && Array.isArray(node.bh_mc)) {
  1113. // node.bh_mc.forEach(childNode => {
  1114. // arr.push(...buildTree1(childNode)); // 递归调用
  1115. // });
  1116. // }else{
  1117. // arr.push(node.sys_bh)
  1118. // }
  1119. // return arr;
  1120. // };
  1121. // // 构建树形结构的根节点
  1122. // const Data = data.map(buildTree1);
  1123. if (response.code == 0) {
  1124. const data = [];
  1125. data[0] = response.data;
  1126. // 递归函数来构建树形结构
  1127. const buildTree = (node) => {
  1128. const treeNode = {
  1129. label: node.sys_bh + '【' + node.sys_mc + '】',
  1130. children: []
  1131. };
  1132. // 如果存在子节点,递归地添加它们
  1133. if (node.bh_mc && Array.isArray(node.bh_mc)) {
  1134. node.bh_mc.forEach(childNode => {
  1135. treeNode.children.push(buildTree(childNode)); // 递归调用
  1136. });
  1137. }
  1138. return treeNode;
  1139. };
  1140. // 构建树形结构的根节点
  1141. const treeData = data.map(buildTree);
  1142. GetDedhtreeData = treeData;
  1143. GetDedhVisible.value = true
  1144. }
  1145. }
  1146. //定额代号树形结构单机
  1147. const GetDedhhandleNodeClick = (nodeData, node, component) => {
  1148. //存放当前节点的nodeId
  1149. if (!nodeData.children || nodeData.children.length === 0) {
  1150. // 点击的是子节点
  1151. formData.value.sczl_dedh = nodeData.label.split("【")[0]
  1152. GetDedhVisible.value = false
  1153. }
  1154. // 执行相应的父节点单击事件处理逻辑
  1155. }
  1156. //检验类别失去焦点事件
  1157. const getLbsubmit = () => {
  1158. if (GetDedhVisible.value) {
  1159. return false
  1160. }
  1161. //弹出选择
  1162. const data = [{
  1163. 'sczl_检验类别': ''
  1164. }, {
  1165. 'sczl_检验类别': '正品板'
  1166. }, {
  1167. 'sczl_检验类别': '次品板'
  1168. }, {
  1169. 'sczl_检验类别': '废品板'
  1170. }]
  1171. selectDataLb.splice(0, selectDataLb.length, ...data)
  1172. setJYCurrent(selectDataLb[0])
  1173. LbVisible.value = true
  1174. }
  1175. //检验类别选择
  1176. const selectDataLb = reactive([])
  1177. const LbVisible = ref(false)
  1178. const SelectClickLb = (row, column, event) => {
  1179. const {
  1180. sczl_检验类别
  1181. } = row
  1182. formData.value.sczl_检验类别 = row.sczl_检验类别
  1183. //查询废品系数
  1184. if (row.sczl_检验类别 != '') {
  1185. var value = {
  1186. 'gdbh': formData.value.sczl_gdbh,
  1187. 'yjno': parseInt(formData.value.sczl_yjgx.split('-')[0]),
  1188. 'gxh': parseInt(formData.value.sczl_yjgx.split('-')[1]),
  1189. 'type': formData.value.sczl_检验类别
  1190. }
  1191. shougonggetScrapFactor(value).then(response => {
  1192. if (response.code == 0) {
  1193. if (response.data != null) {
  1194. formData.value.sczl_废品率系数 = response.data.num;
  1195. }
  1196. setColorReadonly('废品率系数')
  1197. }
  1198. });
  1199. } else {
  1200. unsetColorReadonly('废品率系数')
  1201. }
  1202. LbVisible.value = false
  1203. }
  1204. const table3 = ref()
  1205. const setJYCurrent = (row) => {
  1206. setTimeout(() => {
  1207. table3.value?.setCurrentRow(row)
  1208. const {
  1209. sczl_检验类别
  1210. } = row
  1211. formData.value.sczl_检验类别 = row.sczl_检验类别
  1212. //查询废品系数
  1213. if (row.sczl_检验类别 != '') {
  1214. var value = {
  1215. 'gdbh': formData.value.sczl_gdbh,
  1216. 'yjno': parseInt(formData.value.sczl_yjgx.split('-')[0]),
  1217. 'gxh': parseInt(formData.value.sczl_yjgx.split('-')[1]),
  1218. 'type': formData.value.sczl_检验类别
  1219. }
  1220. shougonggetScrapFactor(value).then(response => {
  1221. if (response.code == 0) {
  1222. if (response.data != null) {
  1223. formData.value.sczl_废品率系数 = response.data.num;
  1224. }
  1225. setColorReadonly('废品率系数')
  1226. }
  1227. });
  1228. } else {
  1229. unsetColorReadonly('废品率系数')
  1230. }
  1231. })
  1232. }
  1233. const JYIndex = ref(0);
  1234. const JYCurrent = ref(0);
  1235. const selectJY = (event) => {
  1236. if (event.keyCode === 40) { // 向下箭头
  1237. if (JYIndex.value < selectDataLb.length - 1) {
  1238. JYIndex.value++;
  1239. setJYCurrent(selectDataLb[JYIndex.value]);
  1240. } else {
  1241. JYIndex.value = 0;
  1242. setJYCurrent(selectDataLb[JYIndex.value]); // 到达最后一行时回到第一行
  1243. }
  1244. } else if (event.keyCode === 38) { // 向上箭头
  1245. if (JYIndex.value > 0) {
  1246. JYIndex.value--;
  1247. setJYCurrent(selectDataLb[JYIndex.value]);
  1248. } else {
  1249. JYIndex.value = selectDataLb.length - 1;
  1250. setJYCurrent(selectDataLb[JYIndex.value]); // 到达第一行时回到最后一行
  1251. }
  1252. } else if (event.keyCode === 13) { // 回车键
  1253. LbVisible.value = false
  1254. }
  1255. }
  1256. //刷新废品率系数
  1257. const GetScrapFactor = async (value) => {
  1258. const response = await shougonggetScrapFactor(value);
  1259. if (response.code == 0) {
  1260. const rowIndex = tableData.findIndex(row => row.UniqId === lastCellValue);
  1261. tableData[rowIndex].sczl_废品率系数 = response.data.num;
  1262. ElMessage({
  1263. type: 'success',
  1264. message: '刷新成功',
  1265. })
  1266. } else {
  1267. ElMessage({
  1268. type: 'error',
  1269. message: '刷新失败',
  1270. })
  1271. }
  1272. // console.log(response)
  1273. // const rowIndex = tableData.findIndex(row => row.UniqId === 123);
  1274. }
  1275. const ADD = ref('0')
  1276. //新增
  1277. function onAdd() {
  1278. ADD.value = '新增'
  1279. type.value = 'create'
  1280. if (typeof(lastCellValue) == 'number') {
  1281. shougonggetInfo({ UniqId: lastCellValue }).then(response=>{
  1282. if (response.code === 0) {
  1283. formData.value = response.data;
  1284. formData.value.sczl_废品率系数 = ''
  1285. formData.value.sczl_cl1 = 0
  1286. formData.value.sczl_cl2 = 0
  1287. formData.value.sczl_cl3 = 0
  1288. formData.value.sczl_cl4 = 0
  1289. formData.value.sczl_cl5 = 0
  1290. formData.value.sczl_cl6 = 0
  1291. formData.value.sczl_cl7 = 0
  1292. formData.value.sczl_cl8 = 0
  1293. formData.value.sczl_cl9 = 0
  1294. formData.value.sczl_cl10 = 0
  1295. formData.value.sczl_cl11 = 0
  1296. formData.value.sczl_cl12 = 0
  1297. formData.value.sczl_fp1 = 0
  1298. formData.value.sczl_fp2 = 0
  1299. formData.value.sczl_fp3 = 0
  1300. formData.value.sczl_fp4 = 0
  1301. formData.value.sczl_fp5 = 0
  1302. formData.value.sczl_fp6 = 0
  1303. formData.value.sczl_fp7 = 0
  1304. formData.value.sczl_fp8 = 0
  1305. formData.value.sczl_fp9 = 0
  1306. formData.value.sczl_fp10 = 0
  1307. formData.value.sczl_fp11 = 0
  1308. formData.value.sczl_fp12 = 0
  1309. }
  1310. });
  1311. }
  1312. dialogFormVisible.value = true
  1313. // Productionadd()
  1314. }
  1315. const ScrapFactor = {
  1316. gdbh: '',
  1317. yjno: '',
  1318. gxh: '',
  1319. type: '',
  1320. }
  1321. // 刷新废品率系数
  1322. function onRefresh() {
  1323. if (params.date == '' || ScrapFactor.gdbh == '') {
  1324. ElMessage({
  1325. type: 'warning',
  1326. message: '未选中记录',
  1327. })
  1328. return
  1329. }
  1330. if (ScrapFactor.type == '') {
  1331. ElMessage({
  1332. type: 'warning',
  1333. message: '该记录检验类别为空',
  1334. })
  1335. return
  1336. }
  1337. GetScrapFactor(ScrapFactor)
  1338. }
  1339. // 更新数据
  1340. const updateDetailData = async () => {
  1341. const restoredData = {
  1342. UniqId: lastCellValue,
  1343. sczl_rq: formData.value.sczl_rq,
  1344. sczl_bzdh: formData.value.sczl_bzdh,
  1345. sczl_bh0: formData.value.sczl_bh0,
  1346. sczl_cl0: formData.value.sczl_cl0,
  1347. sczl_fp0: formData.value.sczl_fp0,
  1348. sczl_gdbh: formData.value.sczl_gdbh,
  1349. sczl_yjgx: formData.value.sczl_yjgx,
  1350. sczl_gxmc: formData.value.sczl_gxmc,
  1351. sczl_cl: formData.value.sczl_cl,
  1352. sczl_dedh: formData.value.sczl_dedh,
  1353. sczl_检验类别: formData.value.sczl_检验类别,
  1354. sczl_废品率系数: formData.value.sczl_废品率系数,
  1355. sczl_jsss: formData.value.sczl_jsss,
  1356. sczl_冲定额: formData.value.sczl_冲定额,
  1357. qczl_Num: formData.value.流程单号1,
  1358. qczl_NumDesc1: formData.value.流程单号2,
  1359. qczl_NumDesc2: formData.value.流程单号3,
  1360. qczl_NumDesc3: formData.value.流程单号4,
  1361. qczl_NumDesc4: formData.value.流程单号5,
  1362. qczl_NumDesc5: formData.value.流程单号6,
  1363. qczl_NumDesc6: formData.value.流程单号7,
  1364. qczl_NumDesc7: formData.value.流程单号8,
  1365. qczl_NumDesc8: formData.value.流程单号9,
  1366. qczl_NumDesc: formData.value.qczl_NumDesc,
  1367. sczl_desc: formData.value.sczl_desc,
  1368. sczl_bh1: formData.value.sczl_bh1,
  1369. sczl_bh2: formData.value.sczl_bh2,
  1370. sczl_bh3: formData.value.sczl_bh3,
  1371. sczl_bh4: formData.value.sczl_bh4,
  1372. sczl_bh5: formData.value.sczl_bh5,
  1373. sczl_bh6: formData.value.sczl_bh6,
  1374. sczl_bh7: formData.value.sczl_bh7,
  1375. sczl_bh8: formData.value.sczl_bh8,
  1376. sczl_bh9: formData.value.sczl_bh9,
  1377. sczl_bh10: formData.value.sczl_bh10,
  1378. sczl_bh11: formData.value.sczl_bh11,
  1379. sczl_bh12: formData.value.sczl_bh12,
  1380. sczl_cl1: formData.value.sczl_cl1,
  1381. sczl_cl2: formData.value.sczl_cl2,
  1382. sczl_cl3: formData.value.sczl_cl3,
  1383. sczl_cl4: formData.value.sczl_cl4,
  1384. sczl_cl5: formData.value.sczl_cl5,
  1385. sczl_cl6: formData.value.sczl_cl6,
  1386. sczl_cl7: formData.value.sczl_cl7,
  1387. sczl_cl8: formData.value.sczl_cl8,
  1388. sczl_cl9: formData.value.sczl_cl9,
  1389. sczl_cl10: formData.value.sczl_cl10,
  1390. sczl_cl11: formData.value.sczl_cl11,
  1391. sczl_cl12: formData.value.sczl_cl12,
  1392. sczl_fp1: formData.value.sczl_fp1,
  1393. sczl_fp2: formData.value.sczl_fp2,
  1394. sczl_fp3: formData.value.sczl_fp3,
  1395. sczl_fp4: formData.value.sczl_fp4,
  1396. sczl_fp5: formData.value.sczl_fp5,
  1397. sczl_fp6: formData.value.sczl_fp6,
  1398. sczl_fp7: formData.value.sczl_fp7,
  1399. sczl_fp8: formData.value.sczl_fp8,
  1400. sczl_fp9: formData.value.sczl_fp9,
  1401. sczl_fp10: formData.value.sczl_fp10,
  1402. sczl_fp11: formData.value.sczl_fp11,
  1403. sczl_fp12: formData.value.sczl_fp12,
  1404. sys_id: sys_id,
  1405. }
  1406. if (ADD.value == '新增') {
  1407. const response = await inspectadd(restoredData);
  1408. // ADD.value='1'
  1409. // console.log(ADD.value)
  1410. ADD.value = '0'
  1411. console.log(response)
  1412. if (response.code == 0) {
  1413. ElMessage({
  1414. type: 'success',
  1415. message: '新增成功',
  1416. })
  1417. //刷新侧边栏
  1418. getTabdata()
  1419. if (params.date != '') {
  1420. //刷新页面
  1421. getTableData()
  1422. }
  1423. dialogFormVisible.value = false
  1424. }
  1425. } else {
  1426. const response = await shougongedit(restoredData);
  1427. if (response.code == 0) {
  1428. ElMessage({
  1429. type: 'success',
  1430. message: '更新成功',
  1431. })
  1432. }
  1433. dialogFormVisible.value = false
  1434. }
  1435. }
  1436. // 删除
  1437. function onDel() {
  1438. Del()
  1439. }
  1440. //删除
  1441. const Del = () => {
  1442. if (typeof(lastCellValue) == 'object') {
  1443. ElMessage({
  1444. type: 'warning',
  1445. message: '未选中记录',
  1446. })
  1447. return
  1448. }
  1449. ElMessageBox.confirm(
  1450. `确认删除这条数据么?`,
  1451. '警告', {
  1452. confirmButtonText: '确认',
  1453. cancelButtonText: '取消',
  1454. type: 'warning',
  1455. }
  1456. ).then(async () => {
  1457. const response = await shougongdel({
  1458. UniqId: lastCellValue
  1459. });
  1460. if (response.code === 0) {
  1461. ElMessage({
  1462. type: 'success',
  1463. message: '删除成功',
  1464. })
  1465. //刷新侧边栏
  1466. getTabdata()
  1467. //刷新页面
  1468. getTableData()
  1469. }
  1470. })
  1471. }
  1472. const displayMod = ref('')
  1473. // 按工单显示
  1474. function onCountByGdbh() {
  1475. console.log(displayMod.value)
  1476. if (displayMod.value === 'date') {
  1477. displayMod.value = 'gd'
  1478. CountByGdbh()
  1479. console.log(displayMod.value)
  1480. } else {
  1481. getTabdata()
  1482. }
  1483. // CountByGdbh()
  1484. }
  1485. //按工单显示
  1486. const CountByGdbh = async () => {
  1487. const response = await getInspectCountByGdbh();
  1488. // console.log(response)
  1489. if (response.code === 0) {
  1490. console.log(response)
  1491. const transformedData = response.data.map(item => ({
  1492. label: `${item.sczl_gdbh+item.cpmc}`,
  1493. children: item.sys.map(sysItem => ({
  1494. label: `${sysItem.sys_id} 【记录数: ${sysItem.count}张】`,
  1495. params: {
  1496. date: item.sczl_gdbh,
  1497. sys_id: sysItem.sys_id,
  1498. total: sysItem.count,
  1499. },
  1500. })),
  1501. }));
  1502. treeData.splice(0, treeData.length, ...transformedData);
  1503. }
  1504. // getTableData()
  1505. }
  1506. // ============== 表格控制部分结束 ===============
  1507. // 获取需要的字典 可能为空 按需保留
  1508. const setOptions = async () => {}
  1509. // 获取需要的字典 可能为空 按需保留
  1510. setOptions()
  1511. // 多选数据
  1512. const multipleSelection = ref([])
  1513. // 多选
  1514. const handleSelectionChange = (val) => {
  1515. if (val.length > 0) {
  1516. multipleSelection.value = val
  1517. const lenth = val.length
  1518. ScrapFactor.gdbh = val[lenth - 1].combinedProp.split('-')[0];
  1519. const parts = val[lenth - 1].combinedProp2.split('-')
  1520. ScrapFactor.yjno = parts[0];
  1521. ScrapFactor.gxh = parts[1];
  1522. // ScrapFactor.type=val[lenth-1].sczl_检验类别
  1523. ScrapFactor.type = '正品板'
  1524. console.log(ScrapFactor)
  1525. lastCellValue = val[lenth - 1].UniqId
  1526. console.log(ScrapFactor)
  1527. val.splice(0, val.length); // 清空 val 数组
  1528. console.log(lastCellValue)
  1529. }
  1530. }
  1531. // 批量删除控制标记
  1532. const deleteVisible = ref(false)
  1533. // 多选删除
  1534. const onDelete = async () => {
  1535. const ids = []
  1536. if (multipleSelection.value.length === 0) {
  1537. ElMessage({
  1538. type: 'warning',
  1539. message: '请选择要删除的数据'
  1540. })
  1541. return
  1542. }
  1543. multipleSelection.value &&
  1544. multipleSelection.value.map(item => {
  1545. ids.push(item.ID)
  1546. })
  1547. const res = await deleteCompanyByIds({
  1548. ids
  1549. })
  1550. if (res.code === 0) {
  1551. ElMessage({
  1552. type: 'success',
  1553. message: '删除成功'
  1554. })
  1555. if (tableData.value.length === ids.length && page.value > 1) {
  1556. page.value--
  1557. }
  1558. deleteVisible.value = false
  1559. getTableData()
  1560. }
  1561. }
  1562. // 行为控制标记(弹窗内部需要增还是改)
  1563. const type = ref('')
  1564. // 更新行
  1565. const updateCompanyFunc = async (row) => {
  1566. const res = await findCompany({
  1567. ID: row.ID
  1568. })
  1569. type.value = 'update'
  1570. if (res.code === 0) {
  1571. formData.value = res.data.recompany
  1572. dialogFormVisible.value = true
  1573. }
  1574. }
  1575. // 弹窗控制标记
  1576. const dialogFormVisible = ref(false)
  1577. // 打开弹窗
  1578. const openDialog = () => {
  1579. type.value = 'create'
  1580. dialogFormVisible.value = true
  1581. }
  1582. // 关闭弹窗
  1583. const closeDialog = () => {
  1584. dialogFormVisible.value = false
  1585. formData.value = {
  1586. address: '',
  1587. image: '',
  1588. name: '',
  1589. }
  1590. }
  1591. // 弹窗确定
  1592. const enterDialog = async () => {
  1593. ElMessageBox.confirm('数据存盘?', '提示', {
  1594. confirmButtonText: '确定',
  1595. cancelButtonText: '取消',
  1596. type: 'warning'
  1597. }).then(() => {
  1598. if (formData.value.sczl_rq == '') {
  1599. ElMessage({
  1600. type: 'error',
  1601. message: '请填写日期'
  1602. });
  1603. document.getElementById('日期').focus()
  1604. document.getElementById('日期').select()
  1605. return;
  1606. }
  1607. if (formData.value.sczl_gdbh == '') {
  1608. ElMessage({
  1609. type: 'error',
  1610. message: '请填写工单编号'
  1611. });
  1612. document.getElementById('工单编号').focus()
  1613. document.getElementById('工单编号').select()
  1614. return;
  1615. }
  1616. if (formData.value.sczl_bzdh == '') {
  1617. ElMessage({
  1618. type: 'error',
  1619. message: '请选择班组'
  1620. });
  1621. document.getElementById('组别').focus()
  1622. document.getElementById('组别').select()
  1623. return;
  1624. }
  1625. if (formData.value.sczl_dedh == '') {
  1626. ElMessage({
  1627. type: 'error',
  1628. message: '请选择定额代号'
  1629. });
  1630. document.getElementById('定额代号').focus()
  1631. document.getElementById('定额代号').select()
  1632. return;
  1633. }
  1634. updateDetailData()
  1635. });
  1636. }
  1637. let tables = ref(5);
  1638. let lastCellValue = ref()
  1639. // 双击表格操作
  1640. function doubleClick(row, column, event) {
  1641. type.value = 'update';
  1642. lastCellValue = row['UniqId'];
  1643. tables.value = lastCellValue
  1644. dialogFormVisible.value = true
  1645. GetInfo(tables.value)
  1646. }
  1647. // 单击表格操作
  1648. function Click(row, column, event) {
  1649. lastCellValue = row['UniqId'];
  1650. console.log(row)
  1651. const parts = row['sczl_yjgx'].split('-')
  1652. ScrapFactor.yjno = parts[0]
  1653. ScrapFactor.gdbh = row['sczl_gdbh']
  1654. ScrapFactor.type = row['sczl_检验类别']
  1655. ScrapFactor.gxh = parts[1]
  1656. console.log(lastCellValue)
  1657. }
  1658. // 导出excel
  1659. function exportExcel() {
  1660. console.log('导出到excel');
  1661. }
  1662. // 生命周期钩子
  1663. onMounted(async () => {});
  1664. </script>
  1665. <style>
  1666. .JKWTree-container {
  1667. display: flex;
  1668. }
  1669. .JKWTree-tree {
  1670. width: 300px;
  1671. background-color: #fff;
  1672. padding: 10px;
  1673. margin-right: 20px;
  1674. }
  1675. .JKWTree-tree h3 {
  1676. font-size: 15px;
  1677. font-weight: 700;
  1678. margin: 10px 0;
  1679. }
  1680. .JKWTree-content {
  1681. flex: 1;
  1682. }
  1683. /* 选中某行时的背景色*/
  1684. .el-table__body tr.current-row>td {
  1685. background: #ff80ff !important;
  1686. /* 背景颜色 */
  1687. }
  1688. </style>
  1689. <style scoped>
  1690. :deep(.el-table td .cell) {
  1691. line-height: 20px !important;
  1692. }
  1693. :deep(.el-tabs__header) {
  1694. margin-bottom: 0;
  1695. }
  1696. .search {
  1697. margin-left: 0px !important;
  1698. margin-right: 10px !important;
  1699. }
  1700. .bt {
  1701. margin-left: 2px !important;
  1702. padding: 3px !important;
  1703. font-size: 12px;
  1704. }
  1705. .el-tabs__header {
  1706. margin: 0px !important;
  1707. }
  1708. .gva-table-box {
  1709. padding: 0px !important;
  1710. }
  1711. .mab {
  1712. margin-bottom: 5px;
  1713. }
  1714. </style>