chafengbaogong.vue 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625
  1. <template>
  2. <div>
  3. <layout>
  4. <layout-content>
  5. <div class="gva-table-box">
  6. <h1 style="margin: 0%;margin-bottom: 10px;">车缝完工报工</h1>
  7. <el-row :gutter="10" style="align-items: center; margin-bottom: 20px;">
  8. <!-- 子订单编号输入框 -->
  9. <el-col :span="4" style="padding: 0px;margin: 0px;">
  10. <el-input v-model="add_searchInfo" placeholder="请扫描子订单编号"@keyup.enter="add_onSubmit" id="searchInput" style="width: 100%; height: 50px;"/>
  11. </el-col>
  12. <!-- 查询按钮 -->
  13. <el-col :span="1.5" style="padding: 0px;margin: 0px;">
  14. <el-button type="primary" icon="search" @click="add_onSubmit"style="height: 50px;width: 80px;">查询</el-button>
  15. </el-col>
  16. <el-col :span="1.5" style="padding: 0px;margin: 0px;">
  17. <el-text style="font-size: 30px;">机台号</el-text>
  18. </el-col>
  19. <!-- 机台号输入框 -->
  20. <el-col :span="2"><el-input v-model="add_formData['机台号']" readonly style="width: 100%; height: 40px;"/></el-col>
  21. <el-col :span="1.5" style="padding: 0px;margin: 0px;">
  22. <el-text style="font-size: 30px;">工序</el-text>
  23. </el-col>
  24. <!-- 工序输入框 -->
  25. <el-col :span="2"><el-input v-model="add_formData['工序']" readonly style="width: 100%; height: 40px;" /></el-col>
  26. <el-col :span="1.5" style="padding: 0px;margin: 0px;">
  27. <el-text style="font-size: 30px;">组别</el-text>
  28. </el-col>
  29. <!-- 组别输入框 -->
  30. <el-col :span="2"><el-input v-model="add_formData['组别']" readonly style="width: 100%; height: 40px;" /></el-col>
  31. <el-col :span="1.5" style="padding: 0px;margin: 0px;">
  32. <el-text style="font-size: 30px;">人员</el-text>
  33. </el-col>
  34. <!-- 人员输入框 -->
  35. <el-col :span="2"><el-input v-model="add_formData['人员']" readonly style="width: 100%; height: 40px;"/></el-col>
  36. </el-row>
  37. <!-- 是否尾包 -->
  38. <el-row :gutter="10" style="align-items: center; margin-bottom: 20px;">
  39. <!-- 是否尾包文本 -->
  40. <el-col :span="2.5">
  41. <el-text style="font-size: 30px;">是否尾包</el-text>
  42. </el-col>
  43. <!-- 是否尾包按钮 -->
  44. <el-col :span="5">
  45. <el-button
  46. :type="activeButton === 'yes' ? 'info' : 'primary'"
  47. @click="setActiveButton('yes')"
  48. :style="activeButton === 'yes' ? activeButtonStyle : defaultButtonStyle"
  49. style="height: 45px; width: 60px; margin-right: 10px; font-size: 24px;"
  50. >
  51. </el-button>
  52. <el-button
  53. :type="activeButton === 'no' ? 'info' : 'primary'"
  54. @click="setActiveButton('no')"
  55. :style="activeButton === 'no' ? activeButtonStyle : defaultButtonStyle"
  56. style="height: 45px; width: 60px; margin-right: 10px; font-size: 24px;"
  57. >
  58. </el-button>
  59. </el-col>
  60. </el-row>
  61. <el-row :gutter="0">
  62. <el-col :span="2.5">
  63. <el-text style="font-size: 24px; margin-left: 45px;">尺 码&nbsp;</el-text>
  64. </el-col>
  65. <!-- 动态生成输入框 -->
  66. <el-col
  67. v-for="(item, index) in 10"
  68. :key="index"
  69. :span="1"
  70. :style="{
  71. padding: '0',
  72. margin:
  73. index < 2 ? '0' :
  74. index < 3 ? '0px 9px 0px 0px':
  75. index < 4 ? '0px 19px 0px 0px':
  76. index < 5 ? '0px 29px 0px 0px':
  77. index < 6 ? '0px 30px 0px 0px':
  78. index < 7 ? '0px 40px 0px 0px':
  79. '0px 20px 0px 0px'
  80. }"
  81. >
  82. <el-input
  83. v-model="cmformdata[`cm${index + 1}`]"
  84. :id="`cm${index + 1}`"
  85. readonly
  86. :style="{
  87. width:
  88. index < 2 ? '70px' :
  89. index < 3 ? '73px' :
  90. index < 4 ? '75px' :
  91. '100px',
  92. height: '40px'
  93. }"
  94. />
  95. </el-col>
  96. <!-- 总输入框 -->
  97. <el-col :span="1">
  98. <el-input v-model="cmformdata.cmtotal" id="cmtotal" readonly style="width: 65px; height: 40px;" />
  99. </el-col>
  100. <!-- 删除报工按钮 -->
  101. <el-col :span="2">
  102. <el-button
  103. type="danger"
  104. icon="delete"
  105. @click="del_delclick"
  106. v-if="delall === true"
  107. :disabled="Selection === ''"
  108. :style="{
  109. backgroundColor: Selection === '' ? '' : 'red',
  110. borderColor: Selection === '' ? '' : 'red',
  111. color: Selection === '' ? '' : '#fff'
  112. }"
  113. style="width: 130px; height: 40px; font-size: 20px; margin-left: 20px;">
  114. 删除报工
  115. </el-button>
  116. </el-col>
  117. </el-row>
  118. <el-row :gutter="0">
  119. <el-col :span="2.5">
  120. <el-text style="font-size: 24px; margin-left: 35px;">制单数</el-text>
  121. </el-col>
  122. <el-col v-for="(item, index) in 10" :key="index" :span="1"
  123. :style="{
  124. padding: '0',
  125. margin:
  126. index < 2 ? '0' :
  127. index < 3 ? '0px 9px 0px 0px':
  128. index < 4 ? '0px 19px 0px 0px':
  129. index < 5 ? '0px 29px 0px 0px':
  130. index < 6 ? '0px 30px 0px 0px':
  131. index < 7 ? '0px 40px 0px 0px':
  132. '0px 20px 0px 0px'
  133. }"
  134. >
  135. <el-input v-model="zdslformdata[`cmsl${index + 1}`]" :id="`cm${index + 1}`" readonly
  136. :style="{
  137. width:
  138. index < 2 ? '70px' :
  139. index < 3 ? '73px' :
  140. index < 4 ? '75px' :
  141. '100px',
  142. height: '40px'
  143. }"
  144. />
  145. </el-col>
  146. <el-col :span="1"><el-input v-model="zdslformdata.zdtotal" id="zdtotal" readonly style="width: 65px;height: 40px;" /></el-col>
  147. <el-button type="primary" @click="cp_gdprintonClick" style="width: 130px; height: 40px; font-size: 20px; margin-left: 20px;" > 子订单详情页 </el-button>
  148. </el-row>
  149. <el-row :gutter="0">
  150. <el-col :span="2.5">
  151. <el-text style="font-size: 24px; margin-left: 35px;">实裁数</el-text>
  152. </el-col>
  153. <el-col v-for="(item, index) in 10" :key="index" :span="1"
  154. :style="{
  155. padding: '0',
  156. margin:
  157. index < 2 ? '0' :
  158. index < 3 ? '0px 9px 0px 0px':
  159. index < 4 ? '0px 19px 0px 0px':
  160. index < 5 ? '0px 29px 0px 0px':
  161. index < 6 ? '0px 30px 0px 0px':
  162. index < 7 ? '0px 40px 0px 0px':
  163. '0px 20px 0px 0px'
  164. }"
  165. >
  166. <el-input v-model="scslformdata[`scsl${index + 1}`]" :id="`scsl${index + 1}`" readonly
  167. :style="{
  168. width:
  169. index < 2 ? '70px' :
  170. index < 3 ? '73px' :
  171. index < 4 ? '75px' :
  172. '100px',
  173. height: '40px'
  174. }"
  175. />
  176. </el-col>
  177. <el-col :span="1"><el-input v-model="scslformdata.sctotal" id="sctotal" readonly style="width: 65px;height: 40px;" /></el-col>
  178. </el-row>
  179. <el-row :gutter="0">
  180. <el-col :span="2.5"><el-text style="font-size: 24px;margin-left: 10px;">上报数量</el-text></el-col>
  181. <el-col :span="1" style="padding-right: 0px;margin: 0px 1px 0px 0px;">
  182. <el-input v-model="slformdata.sl1" id="sl1" :readonly="!scslformdata.scsl1" @input="updateTotal" style="width: 70px;height: 40px;" /></el-col>
  183. <el-col :span="1" style="padding-right: 0px;margin: 0px 0px 0px 0px;">
  184. <el-input v-model="slformdata.sl2" id="sl2" :readonly="!scslformdata.scsl2" @input="updateTotal" style="width: 70px;height: 40px;" /></el-col>
  185. <el-col :span="1" style="padding-right: 0px;margin: 0px 9px 0px 0px;">
  186. <el-input v-model="slformdata.sl3" id="sl3" :readonly="!scslformdata.scsl3" @input="updateTotal" style="width: 73px;height: 40px;" /></el-col>
  187. <el-col :span="1" style="padding-right: 0px;margin: 0px 20px 0px 0px;">
  188. <el-input v-model="slformdata.sl4" id="sl4" :readonly="!scslformdata.scsl4" @input="updateTotal" style="width: 75px;height: 40px;" /></el-col>
  189. <el-col :span="1" style="padding-right: 0px;margin: 0px 30px 0px 0px;">
  190. <el-input v-model="slformdata.sl5" id="sl5" :readonly="!scslformdata.scsl5" @input="updateTotal" style="width: 100px;height: 40px;" /></el-col>
  191. <el-col :span="1" style="padding-right: 0px;margin: 0px 30px 0px 0px;">
  192. <el-input v-model="slformdata.sl6" id="sl6" :readonly="!scslformdata.scsl6" @input="updateTotal" style="width: 100px;height: 40px;" /></el-col>
  193. <el-col :span="1" style="padding-right: 0px;margin: 0px 39px 0px 0px;">
  194. <el-input v-model="slformdata.sl7" id="sl7" :readonly="!scslformdata.scsl7" @input="updateTotal" style="width: 100px;height: 40px;" /></el-col>
  195. <el-col :span="1" style="padding-right: 0px;margin: 0px 20px 0px 0px;">
  196. <el-input v-model="slformdata.sl8" id="sl8" :readonly="!scslformdata.scsl8" @input="updateTotal" style="width: 100px;height: 40px;" /></el-col>
  197. <el-col :span="1" style="padding-right: 0px;margin: 0px 20px 0px 0px;">
  198. <el-input v-model="slformdata.sl9" id="sl9" :readonly="!scslformdata.scsl9" @input="updateTotal" style="width: 100px;height: 40px;" /></el-col>
  199. <el-col :span="1" style="padding-right: 0px;margin: 0px 20px 0px 0px;">
  200. <el-input v-model="slformdata.sl10" id="sl10" :readonly="!scslformdata.scsl10" @input="updateTotal" style="width: 100px;height: 40px;" /></el-col>
  201. <el-col :span="1"><el-input v-model="slformdata.sctotal" id="cm11" readonly style="width: 65px;height: 40px;" /></el-col>
  202. <el-col :span="2">
  203. <el-button type="primary" @click="add_Dialog" style="width: 130px; height: 40px; font-size: 20px; margin-left: 20px;" >报工</el-button>
  204. </el-col>
  205. </el-row>
  206. <!-- 表格数据 -->
  207. <el-tabs v-model="activeName">
  208. <el-tab-pane label="报工历史记录" name="first">
  209. <el-table
  210. ref="multipleTable"
  211. style="width: 100%; height: 52vh"
  212. tooltip-effect="dark"
  213. :row-style="{ height: '50px' }"
  214. :header-cell-style="{ padding: '5px', fontSize: '20px' }"
  215. :cell-style="{ padding: '10px', fontSize: '20px' }"
  216. :header-row-style="{ height: '20px' }"
  217. :data="add_tableData"
  218. border
  219. row-key="ID"
  220. size="small"
  221. highlight-current-row="true"
  222. @row-dblclick="updateCompanyFunc"
  223. @row-click="tableRowClick"
  224. :show-overflow-tooltip="true"
  225. @selection-change="selectionChange"
  226. >
  227. <el-table-column type="selection" width="60" />
  228. <!-- 操作列 -->
  229. <el-table-column align="left" label="操作" width="150">
  230. <template v-slot="scope">
  231. <!-- 当 sys_rq、组别和 serial 不为空时显示按钮 -->
  232. <el-button
  233. v-if="scope.row.sys_rq && scope.row.组别 && scope.row.serial"
  234. type="primary"
  235. @click="add_bdprintxp(scope.row)"
  236. style="width: 110px; height: 40px; font-size: 20px;"
  237. >
  238. 补打小票
  239. </el-button>
  240. </template>
  241. </el-table-column>
  242. <!-- 报工时间 -->
  243. <el-table-column align="center" label="报工时间" prop="sys_rq" width="150" />
  244. <!-- 子订单编号 -->
  245. <el-table-column align="center" label="子订单编号" prop="子订单编号" width="110" />
  246. <!-- 组别 -->
  247. <el-table-column align="center" label="组别" prop="组别" width="80" />
  248. <!-- 尺码列表 -->
  249. <el-table-column
  250. v-for="item in sizeDatas"
  251. :key="item"
  252. align="center"
  253. :label="item"
  254. width="100"
  255. :cell-style="cellStyle"
  256. >
  257. <template v-slot="scope">
  258. <div
  259. :class="{ 'highlight-cell': isCellHighlighted(scope.$index, item) }"
  260. style="margin-left: -5px; width: 80px;"
  261. @click="handleSizeClick(scope.$index, item, scope.row)"
  262. >
  263. {{ scope.row[item] || '—' }}
  264. </div>
  265. </template>
  266. </el-table-column>
  267. <!-- 数量 -->
  268. <el-table-column align="left" sortable label="数量" prop="数量" width="100" />
  269. <!-- 流水号 -->
  270. <el-table-column align="center" label="流水号" width="150">
  271. <template v-slot="scope">
  272. <!-- 当 sys_rq、组别和 serial 不为空时显示流水号 -->
  273. <div v-if="scope.row.sys_rq && scope.row.组别 && scope.row.serial">
  274. 第{{ scope.row.serial }}包
  275. </div>
  276. </template>
  277. </el-table-column>
  278. </el-table>
  279. </el-tab-pane>
  280. <el-tab-pane label="订单资料附件" name="third">
  281. <el-table ref="multipleTable"
  282. :row-style="{ height: '30px' }"
  283. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
  284. :header-cell-style="{ padding: '0px' }"
  285. :show-overflow-tooltip="true"
  286. :cell-class-name="planUsageCellClass"
  287. highlight-current-row="true"
  288. @row-dblclick="gdbomupdateCompanyFunc"
  289. style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
  290. @selection-change="fjSelectionChange">
  291. <el-table-column align="left" label="关联编号" prop="关联编号" width="115"/>
  292. <el-table-column align="left" label="备注" prop="附件备注" width="110"/>
  293. <el-table-column align="left" label="文件类型" prop="附件类型" width="100"/>
  294. <el-table-column align="left" label="建档时间" prop="sys_rq" width="160"/>
  295. <el-table-column align="left" label="建档用户" prop="sys_id" width="200"/>
  296. <el-table-column align="left" label="操作"width="100"fixed="right">
  297. <template #default="scope">
  298. <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button>
  299. </template>
  300. </el-table-column>
  301. </el-table>
  302. </el-tab-pane>
  303. <el-tab-pane label="技术附件" @click="showTable('技术附件')" name="fourth">
  304. <el-table ref="multipleTable"
  305. :row-style="{ height: '30px' }"
  306. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
  307. :header-cell-style="{ padding: '0px' }"
  308. :show-overflow-tooltip="true"
  309. :cell-class-name="planUsageCellClass"
  310. highlight-current-row="true"
  311. @row-dblclick="ExcelShow"
  312. style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="fjSelectionChange">
  313. <el-table-column align="left" label="关联编号" prop="关联编号" width="115"/>
  314. <el-table-column align="left" label="备注" prop="附件备注" width="110"/>
  315. <el-table-column align="left" label="文件类型" prop="附件类型" width="100"/>
  316. <el-table-column align="left" label="建档时间" prop="sys_rq" width="160"/>
  317. <el-table-column align="left" label="建档用户" prop="sys_id" width="200"/>
  318. <el-table-column align="left" label="操作"width="100"fixed="right">
  319. <template #default="scope">
  320. <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button>
  321. </template>
  322. </el-table-column>
  323. </el-table>
  324. </el-tab-pane>
  325. </el-tabs>
  326. </div>
  327. <!-- 是否订单尾包确认弹窗 -->
  328. <el-dialog v-model="DialogVisible" title="是否订单尾包" destroy-on-close width="30%" style="top: 20%;">
  329. <h3>请再次确认是否该订单产品已全部报工,该批为订单尾包?</h3>
  330. <div class="dialog-footer" style="text-align: right;">
  331. <el-button @click="confirmDialogVisible">取消</el-button>
  332. <el-button type="primary" @click="handleConfirm">确认</el-button>
  333. </div>
  334. </el-dialog>
  335. <SubOrderPage ref="SubOrderPageRef" />
  336. <PrintPage ref="printPageRef" />
  337. <!-- 子订单详情页 -->
  338. <luckyexcelPage ref="luckyexcelPageRef" />
  339. </layout-content>
  340. </layout>
  341. </div>
  342. </template>
  343. <script>
  344. export default {
  345. data() {
  346. return {
  347. currentTable: '', // 当前展示的表格
  348. activeName: 'first',
  349. };
  350. },
  351. methods: {
  352. handleKeyDown(event, prevId, currentId, nextId) {
  353. const currentElement = document.getElementById(currentId);
  354. const isEmpty = currentElement.value === '';
  355. const atStart = currentElement.selectionStart === 0;
  356. const atEnd = currentElement.selectionStart === currentElement.value.length;
  357. switch (event.keyCode) {
  358. case 13: // Enter
  359. case 40: // 向下箭头
  360. if (nextId) {
  361. document.getElementById(nextId).focus();
  362. }
  363. break;
  364. case 38: // 向上箭头
  365. if (prevId) {
  366. document.getElementById(prevId).focus();
  367. }
  368. break;
  369. case 8: // 删除键
  370. if (prevId && (isEmpty || atStart)) {
  371. document.getElementById(prevId).focus();
  372. }
  373. break;
  374. case 37: // 向左箭头
  375. if (prevId && atStart) {
  376. document.getElementById(prevId).focus();
  377. }
  378. break;
  379. case 39: // 向右箭头
  380. if (nextId && atEnd) {
  381. document.getElementById(nextId).focus();
  382. }
  383. break;
  384. default:
  385. break;
  386. }
  387. },
  388. },
  389. };
  390. </script>
  391. <script setup>
  392. // 全量引入格式化工具 请按需保留
  393. import $script from 'scriptjs'
  394. import $ from 'jquery';
  395. import LuckyExcel from 'luckyexcel';
  396. import {Layout,LayoutSider,LayoutContent} from '@arco-design/web-vue';
  397. import {hiprint} from "vue-plugin-hiprint";
  398. import {ref,reactive,nextTick,watch,setBlockTracking} from 'vue'
  399. import {getSpotList,search,SubWorkOrderStatusList,getTab,OrderAttachments,getTabByGdbh,processAdd,spotcheckdel,Mabaolist} from '@/api/mes/job'
  400. import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
  401. import {getMac} from '@/api/jixiaoguanli/baogong'
  402. import {ElMessage} from "element-plus";
  403. import {get} from 'scriptjs';
  404. import PrintPage from '../yunyin/shengchanguanli/components/print.vue'
  405. import luckyexcelPage from '../yunyin/shengchanguanli/components/luckyexcel.vue';
  406. import SubOrderPage from '../yunyin/shengchanguanli/components/SubOrder.vue';
  407. import { useUserStore } from '@/pinia/modules/user';
  408. defineOptions({name: 'Company'})
  409. const path = `${import.meta.env.VITE_BASE_PATH}:${import.meta.env.VITE_UPLOADS_PORT}`
  410. console.log(path)
  411. //定义跳转页面
  412. const SubOrderPageRef = ref()//子订单详情页
  413. const printPageRef = ref()//打印预览
  414. const luckyexcelPageRef = ref()//pdf预览
  415. //子订单详情页
  416. const cp_gdprintonClick = async () => {
  417. if(add_searchInfo.value === '' || add_searchInfo.value === null){
  418. ElMessage({ type: 'warning', message: '请扫描子订单(条码)后再查看' });
  419. return false;
  420. }
  421. SubOrderPageRef.value.open(add_searchInfo.value,add_formData['工序'])
  422. }
  423. //获取登录用户信息
  424. const userStore = useUserStore()
  425. const _username = ref('')
  426. _username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
  427. console.log('获取用户名称',_username.value)
  428. //全局获取当前日期
  429. const today = new Date();
  430. const year = today.getFullYear();
  431. const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
  432. const day = String(today.getDate()).padStart(2, '0');
  433. const hours = String(today.getHours()).padStart(2, '0');
  434. const minutes = String(today.getMinutes()).padStart(2, '0');
  435. const seconds = String(today.getSeconds()).padStart(2, '0');
  436. const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  437. const currentDates = `${year}-${month}-${day}`;
  438. //全局获取code,接口接收code
  439. const _code = '车缝'
  440. //全局接口接受的物理地址
  441. const Machine = ref('')
  442. //全局获取UniqId
  443. const UniqId = ref('')
  444. //物理地址获取机台编号
  445. const getMachineMacdata = async () => {
  446. console.log("车缝机台获取物理地址", Machine.value)
  447. try {
  448. const data = await getMachineMac({sys_sbID: Machine.value});
  449. if (data.data === null) {
  450. // ElMessage({
  451. // type: 'error',
  452. // message: '未获取到机台编号请确认MAC地址或与管理员联系'
  453. // })
  454. add_formData['机台号'] = '测试机台'
  455. add_formData['工序'] = _code
  456. add_formData['组别'] = "测试"
  457. add_formData['人员'] = "测试"
  458. return;
  459. } else {
  460. add_formData['机台号'] = data.data['机台号']
  461. add_formData['工序'] = data.data['生产工序']
  462. add_formData['工序名称'] = data.data['生产工序']
  463. add_formData['组别'] = data.data['组别']
  464. add_formData['人员'] = data.data['组长']
  465. setTimeout(() => {
  466. const inputElement = document.getElementById('searchInput');
  467. if (inputElement) {
  468. inputElement.focus();
  469. }
  470. }, 100); // 延迟100毫秒
  471. }
  472. } catch (error) {
  473. console.error(error)
  474. }
  475. }
  476. //自动获取物理地址
  477. const GetAddr = () => {
  478. var xmlhttp = null;
  479. var res;
  480. if (window.XMLHttpRequest) {
  481. xmlhttp = new XMLHttpRequest();
  482. } else if (window.ActiveXObject) {
  483. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  484. }
  485. // 2. 设置回调函数
  486. xmlhttp.onreadystatechange = function() {
  487. if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
  488. res = eval('(' + xmlhttp.response + ')');
  489. let result = ''
  490. for (let i = 0; i < res.macAddress.length; i++) {
  491. if (i % 2 === 0 && i !== 0) {
  492. result += '-' // 根据实际需求修改分隔符
  493. }
  494. result += res.macAddress[i]
  495. }
  496. Machine.value = result
  497. getMachineMacdata(Machine.value)
  498. }
  499. }
  500. // 3. 打开一个连接
  501. xmlhttp.open("get", "http://127.0.0.1:8090/init")
  502. // 5. 发送
  503. xmlhttp.send();
  504. }
  505. // getMachineMacdata();
  506. GetAddr()
  507. // PDF预览
  508. const showPdf = async (row) => {
  509. luckyexcelPageRef.value.open(row)
  510. }
  511. // 尺码
  512. const cmformdata = reactive({
  513. cm1: '',
  514. cm2: '',
  515. cm3: '',
  516. cm4: '',
  517. cm5: '',
  518. cm6: '',
  519. cm7: '',
  520. cm8: '',
  521. cm9: '',
  522. cm10: '',
  523. cmtotal: '合计',
  524. });
  525. // 制单数
  526. const zdslformdata = reactive({
  527. cmsl1: '',
  528. cmsl2: '',
  529. cmsl3: '',
  530. cmsl4: '',
  531. cmsl5: '',
  532. cmsl6: '',
  533. cmsl7: '',
  534. cmsl8: '',
  535. cmsl9: '',
  536. cmsl10: '',
  537. zdtotal: '',
  538. });
  539. // 实裁量
  540. const scslformdata = reactive({
  541. scsl1: '',
  542. scsl2: '',
  543. scsl3: '',
  544. scsl4: '',
  545. scsl5: '',
  546. scsl6: '',
  547. scsl7: '',
  548. scsl8: '',
  549. scsl9: '',
  550. scsl10: '',
  551. sctotal: '',
  552. });
  553. // 数量
  554. const slformdata = reactive({
  555. sl1: '',
  556. sl2: '',
  557. sl3: '',
  558. sl4: '',
  559. sl5: '',
  560. sl6: '',
  561. sl7: '',
  562. sl8: '',
  563. sl9: '',
  564. sl10: '',
  565. sctotal: '',
  566. });
  567. //实裁相加
  568. function updateTotal() {
  569. // 直接指定要累加的属性名
  570. const relevantKeys = ['sl1', 'sl2', 'sl3', 'sl4', 'sl5', 'sl6', 'sl7', 'sl8', 'sl9', 'sl10'];
  571. const values = relevantKeys.map(key => parseInt(slformdata[key], 10) ||
  572. 0); // 使用 || 0 来处理可能的 NaN 或 undefined/null
  573. slformdata.sctotal = values.reduce((sum, value) => sum + value, 0);
  574. const relevantKeyss = ['scsl1', 'scsl2', 'scsl3', 'scsl4', 'scsl5', 'scsl6', 'scsl7', 'scsl8', 'scsl9', 'scsl0'];
  575. const valuess = relevantKeyss.map(key => parseInt(scslformdata[key], 10) ||
  576. 0); // 使用 || 0 来处理可能的 NaN 或 undefined/null
  577. scslformdata.sctotal = valuess.reduce((sum, value) => sum + value, 0);
  578. }
  579. //历史记录表格
  580. const add_tableData = reactive([]);
  581. //全局获取颜色款式款号
  582. const _yskskh = ref('')
  583. //全局获取新增流水号
  584. const _serial = ref('')
  585. //全局获取序号
  586. const _serial_num = ref('')
  587. const _list = ref('')
  588. //流水号补零
  589. function padNumber(num, length) {
  590. let str = '' + num;
  591. while (str.length < length) {
  592. str = '0' + str;
  593. }
  594. return str;
  595. }
  596. // 代表扫描两次自动保存
  597. // const searcs = ref('')
  598. //尺寸列表
  599. const sizeDatas = reactive([])
  600. //搜索
  601. const add_searchInfo = ref('')
  602. //技术附件
  603. const jstableData = reactive([])
  604. const ddtableData = reactive([])
  605. //查询
  606. const add_onSubmit = async () => {
  607. if(add_formData['机台号'] === ''){
  608. ElMessage({type: 'warning',message: '未获取到机台'})
  609. return false;
  610. }
  611. sizeDatas.length = 0;
  612. add_tableData.length = 0;
  613. if (!add_searchInfo.value.startsWith('DC')) {
  614. // 如果没有以"DC"开头,则添加前缀
  615. add_searchInfo.value = 'DC' + add_searchInfo.value;
  616. }
  617. if (add_searchInfo.value === '' || add_searchInfo.value === undefined) {
  618. const WorkListdata = [];
  619. add_tableData.splice(0, add_tableData.length, ...WorkListdata);
  620. ElMessage({
  621. type: 'warning',
  622. message: '请扫描小票二维码'
  623. })
  624. } else {
  625. //获取报工历史记录
  626. const getSpotLists = await getSpotList({order: add_searchInfo.value,code: _code,sys_sbID: add_formData['机台号']});
  627. // console.log(getSpotLists)
  628. sizeDatas.splice(0, getSpotLists.data.headers.length, ...getSpotLists.data.headers); //型号数据
  629. add_tableData.splice(0, add_tableData.length, ...getSpotLists.data.records); //表格数据
  630. _list.value = getSpotLists.data.list
  631. if (!add_searchInfo.value.includes('-') && getSpotLists.data.records.length === 0) {
  632. ElMessage({
  633. type: 'warning',
  634. message: '未查询到报工历史数据'
  635. })
  636. return false;
  637. }
  638. //xlsx附件
  639. const searchValue = add_searchInfo.value.split('-')[0];
  640. const jsOrderAttachments = await OrderAttachments({order:searchValue,desc:'技术附件'})
  641. const ddOrderAttachments = await OrderAttachments({order:searchValue,desc:'订单资料附件'})
  642. jstableData.splice(0,jsOrderAttachments.data.length,...jsOrderAttachments.data);
  643. ddtableData.splice(0,ddOrderAttachments.data.length,...ddOrderAttachments.data);
  644. _yskskh.value = getSpotLists.data.list //颜色、款式、款号
  645. _serial.value = String(getSpotLists.data.serial) //流水号
  646. _serial_num.value = String(getSpotLists.data.serial_num);//序号
  647. console.log(_serial_num.value)
  648. //获取尺码、制单数/实裁量上面信息
  649. const keys1 = ['cm1', 'cm2', 'cm3', 'cm4', 'cm5', 'cm6', 'cm7', 'cm8', 'cm9', 'cm10', ];
  650. const keys2 = ['cmsl1', 'cmsl2', 'cmsl3', 'cmsl4', 'cmsl5', 'cmsl6', 'cmsl7', 'cmsl8', 'cmsl9',
  651. 'cmsl10', 'zdtotal',
  652. ];
  653. const keys3 = ['scsl1', 'scsl2', 'scsl3', 'scsl4', 'scsl5', 'scsl6', 'scsl7', 'scsl8', 'scsl9',
  654. 'scsl10', 'sctotal',
  655. ];
  656. //如果搜索是子订单编号
  657. if (add_searchInfo.value.includes('-')) {
  658. for (let key of keys1) {
  659. if (getSpotLists.data.list.hasOwnProperty(key)) { // 确保键存在于对象中
  660. cmformdata[key] = getSpotLists.data.list[key];
  661. }
  662. }
  663. for (let key of keys2) {
  664. if (getSpotLists.data.list.hasOwnProperty(key)) { // 确保键存在于对象中
  665. zdslformdata[key] = getSpotLists.data.list[key];
  666. }
  667. }
  668. for (let key of keys3) {
  669. if (getSpotLists.data.list.hasOwnProperty(key)) { // 确保键存在于对象中
  670. scslformdata[key] = getSpotLists.data.list[key];
  671. }
  672. }
  673. setTimeout(() => {
  674. const inputElement = document.getElementById('sl1');
  675. if (inputElement) {
  676. inputElement.focus();
  677. }
  678. }, 100); // 延迟100毫秒
  679. } else {
  680. for (let key of keys1) {
  681. cmformdata[key] = '';
  682. }
  683. for (let key of keys2) {
  684. zdslformdata[key] = '';
  685. }
  686. }
  687. updateTotal()
  688. // //历史记录
  689. // if (getSpotLists.data.headers) {
  690. // }
  691. }
  692. }
  693. const AttendanceVisible = ref(false)
  694. //清空对象的属性值
  695. const gd_clearFormData = () => {
  696. Object.keys(add_formData).forEach(key => {
  697. add_formData[key] = '';
  698. });
  699. };
  700. const add_formData = reactive({
  701. 机台号: '',
  702. 工序: '',
  703. 组别: '',
  704. 人员: '',
  705. 尺码: '',
  706. 数量: '',
  707. 是否订单尾包: '0',
  708. });
  709. const currentSlValue = ref('')
  710. //车缝报工
  711. const add_Dialog = async () => {
  712. if(add_formData['机台号'] === '测试机台'){
  713. ElMessage({ type: 'warning', message: '测试机台禁止报工' });
  714. return;
  715. }
  716. sizeDatas.length = 0;
  717. add_tableData.length = 0;
  718. // console.log(_serial.value)
  719. if (_serial.value === NaN) {
  720. ElMessage({type: 'warning',message: '网络异常.请检查'})
  721. return fasle;
  722. }
  723. if (add_searchInfo.value === '') {
  724. ElMessage({type: 'warning',message: '请扫描子订单编号输入数量后,再进行上报'})
  725. return fasle;
  726. }
  727. //尺码
  728. let cmArray = [cmformdata.cm1, cmformdata.cm2, cmformdata.cm3, cmformdata.cm4, cmformdata.cm5, cmformdata
  729. .cm6, cmformdata.cm7, cmformdata.cm8, cmformdata.cm9, cmformdata.cm10
  730. ];
  731. //制单数
  732. let zdsl1Array = [zdslformdata.zdsl1, zdslformdata.zdsl12, zdslformdata.zdsl13, zdslformdata.zdsl14,
  733. zdslformdata.zdsl15, zdslformdata.zdsl16, zdslformdata.zdsl17, zdslformdata.zdsl18, zdslformdata
  734. .zdsl19, zdslformdata.zdsl110
  735. ];
  736. //上报数量
  737. let slArray = [slformdata.sl1, slformdata.sl2, slformdata.sl3, slformdata.sl4, slformdata.sl5, slformdata
  738. .sl6, slformdata.sl7, slformdata.sl8, slformdata.sl9, slformdata.sl10
  739. ];
  740. let resultArrays = [];
  741. for (let i = 0; i < slArray.length; i++) {
  742. // 创建一个新数组来存储当前索引下的所有值
  743. let currentValues = [add_formData['机台号'], cmArray[i], zdsl1Array[i], slArray[i]];
  744. // 添加到结果数组中
  745. resultArrays.push(currentValues);
  746. }
  747. //获取报工历史记录
  748. const getSpotLists = await getSpotList({order: add_searchInfo.value,code: _code,sys_sbID: add_formData['机台号']});
  749. let paramsList = []; // 用于存储每个元素的 cm 和 sl
  750. let serialNumber = parseInt(getSpotLists.data.serial, 10);
  751. for (let i = 0; i < resultArrays.length; i++) {
  752. if (slArray[i]) {
  753. let params = {};
  754. params.order_id = add_searchInfo.value;
  755. params.sczl_jtbh = add_formData['机台号'];
  756. params.gxmc = add_formData['工序'];
  757. params.sys_id = add_formData['人员'];
  758. params.wb = add_formData['是否订单尾包'];
  759. params.cm = resultArrays[i][1];
  760. params.sl = resultArrays[i][3];
  761. params.sys_rq = currentDates;
  762. params.code = '车缝';
  763. params.sczl_bh = add_formData['组别'];
  764. // 流水号(包数)
  765. serialNumber++;
  766. params.serial = padNumber(serialNumber, 3);
  767. //流水号序号
  768. // _serial_num.value++;
  769. // params.serial_num = _serial_num.value;
  770. // 流水号序号
  771. params.serial_num = serialNumber;
  772. paramsList.push(params);
  773. }
  774. }
  775. console.log("新增报工",paramsList)
  776. // return;
  777. if (paramsList.length === 0) {
  778. ElMessage({type: 'info',message: '请填写报工尺码数量'});
  779. return;
  780. }
  781. let allSuccess = true;
  782. for (let i = 0; i < paramsList.length; i++) {
  783. const cf_gettab = await search(paramsList[i]);
  784. console.log("新增报工返回状态",cf_gettab)
  785. if (cf_gettab.code !== 0) {
  786. allSuccess = false;
  787. break; // 如果某个报工失败,则中断循环
  788. }
  789. }
  790. //光标跳转input框
  791. setTimeout(() => {
  792. const inputElement = document.getElementById('searchInput');
  793. if (inputElement) {
  794. inputElement.focus();
  795. }
  796. }, 100); // 延迟100毫秒
  797. if (allSuccess) {
  798. // const lsjltable = await getTab({
  799. // order_id: add_searchInfo.value,
  800. // sczl_jtbh: add_formData['机台号']
  801. // });
  802. const getSpotLists = await getSpotList({
  803. order: add_searchInfo.value,
  804. code: _code,
  805. sys_sbID: add_formData['机台号']
  806. });
  807. sizeDatas.splice(0, getSpotLists.data.headers.length, ...getSpotLists.data.headers);
  808. add_tableData.splice(0, add_tableData.length, ...getSpotLists.data.records);
  809. add_printxp();
  810. search.value = '';
  811. // add_searchInfo.value = '';
  812. ElMessage({
  813. type: 'success',
  814. message: '报工成功'
  815. });
  816. // 上报成功后 清空所有输入框上报数量
  817. if (slformdata) {
  818. for (let i = 1; i <= 10; i++) {
  819. slformdata['sl' + i] = '';
  820. }
  821. // 清空总和
  822. slformdata.sctotal = '';
  823. } else {
  824. console.error('未定义');
  825. }
  826. }
  827. }
  828. // 新增取消
  829. const add_closeDialog = () => {
  830. AttendanceVisible.value = false
  831. };
  832. //是否订单尾包选择是否按钮
  833. const activeButton = ref('no')
  834. const DialogVisible = ref(false)
  835. // 定义按钮的默认样式和激活样式
  836. const defaultButtonStyle = {
  837. backgroundColor: '#808080', //用于默认状态
  838. color: 'white',
  839. };
  840. const activeButtonStyle = {
  841. backgroundColor: 'red', //用于选中状态
  842. color: 'white',
  843. };
  844. //点击尾包是否按钮
  845. const setActiveButton = (button) => {
  846. console.log("setActiveButton")
  847. activeButton.value = button;
  848. //1 = 是 0 = 否
  849. if (button === 'yes') {
  850. console.log("yes")
  851. add_formData['是否订单尾包'] = '1';
  852. DialogVisible.value = true;
  853. } else if (button === 'no') {
  854. console.log("no")
  855. add_formData['是否订单尾包'] = '0';
  856. DialogVisible.value = false;
  857. }
  858. };
  859. //是否尾包弹窗确定
  860. const handleConfirm = () => {
  861. add_formData['是否订单尾包'] = '1'
  862. activeButton.value = 'yes';
  863. DialogVisible.value = false
  864. };
  865. //是否尾包弹窗取消
  866. const confirmDialogVisible = () => {
  867. add_formData['是否订单尾包'] = '0'
  868. activeButton.value = 'no';
  869. DialogVisible.value = false
  870. };
  871. // =========== 打印小票 ===========
  872. const jsondata = {"panels":[{"index":0,"name":1,"height":296.6,"width":210,"paperHeader":19.5,"paperFooter":832.5,"printElements":[{"options":{"left":435,"top":61.5,"height":159,"width":159,"title":"二维码","qrcodeType":"qrcode","testData":"qrcode","right":597.75,"bottom":218.25,"vCenter":518.25,"hCenter":138.75,"field":"emm","qrCodeLevel":2,"coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"zIndex":1},"printElementType":{"title":"二维码","type":"qrcode"}},{"options":{"left":3,"top":456,"height":45,"width":199.5,"title":"2024-10-22","right":419.25,"bottom":200.25,"vCenter":319.5,"hCenter":177.75,"field":"dyrq","coordinateSync":false,"widthHeightSync":false,"fontSize":30,"textContentVerticalAlign":"middle","qrCodeLevel":0,"qid":"kh_6","textAlign":"left","hideTitle":true},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":0,"top":21,"height":37,"width":291,"title":"DC2410023-0100","right":291,"bottom":64,"vCenter":145.5,"hCenter":45.5,"field":"zddbh","coordinateSync":false,"widthHeightSync":false,"fontSize":33,"textContentVerticalAlign":"middle","qrCodeLevel":0,"qid":"zddbh_1","lineHeight":33,"hideTitle":true},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":112.5,"top":64.5,"height":43,"width":193.5,"title":"","right":285,"bottom":508,"vCenter":188.25,"hCenter":486.5,"field":"zb","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"fontSize":40,"textContentVerticalAlign":"middle","qrCodeLevel":0,"qid":"kh_5"},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":0,"top":64.5,"height":43,"width":126,"title":"组别:","coordinateSync":false,"widthHeightSync":false,"fontSize":40,"textContentVerticalAlign":"middle","qrCodeLevel":0,"right":92,"bottom":114.99999713897705,"vCenter":46,"hCenter":93.49999713897705},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":430.5,"top":225,"height":44,"width":40.5,"title":"第","right":459,"bottom":313.5,"vCenter":438.75,"hCenter":287.25,"coordinateSync":false,"widthHeightSync":false,"fontSize":40,"textContentVerticalAlign":"middle","qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":553.5,"top":225,"height":44,"width":40.5,"title":"包","right":597.7500457763672,"bottom":268.25,"vCenter":577.5000457763672,"hCenter":246.25,"coordinateSync":false,"widthHeightSync":false,"fontSize":40,"textContentVerticalAlign":"middle","qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":474,"top":225,"height":44,"width":78,"title":"005","right":538.5,"bottom":313.5,"vCenter":498.75,"hCenter":287.25,"field":"lsh","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"fontSize":40,"textAlign":"center","textContentVerticalAlign":"middle","qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":112.5,"top":112.5,"height":43,"width":190.5,"title":"这是更新后的元素","right":282.75,"bottom":362.5,"vCenter":187.5,"hCenter":341,"field":"cm","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"fontSize":40,"textContentVerticalAlign":"middle","qrCodeLevel":0,"qid":"kh_3","textContentWrap":"ellipsis"},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":0,"top":114,"height":43,"width":124.5,"title":"尺码:","coordinateSync":false,"widthHeightSync":false,"fontSize":40,"textContentVerticalAlign":"middle","qrCodeLevel":0,"right":88.25,"bottom":290.5,"vCenter":42.25,"hCenter":269},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":0,"top":219,"height":44,"width":123,"title":"尾包:","coordinateSync":false,"widthHeightSync":false,"fontSize":40,"textContentVerticalAlign":"middle","qrCodeLevel":0,"right":120,"bottom":270.50000858306885,"vCenter":70.5,"hCenter":248.50000858306885},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":115.5,"top":219,"height":44,"width":55.5,"title":"否","right":573.7500228881836,"bottom":437.75001430511475,"vCenter":546.0000228881836,"hCenter":415.75001430511475,"field":"wb","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"fontSize":40,"textContentVerticalAlign":"middle","qrCodeLevel":0,"qid":"kh_7"},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":114,"top":163.5,"height":43,"width":190.5,"title":"这是更新后的元素","right":280.5,"bottom":334.00000858306885,"vCenter":185.25,"hCenter":312.50000858306885,"field":"sl","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"fontSize":40,"textContentVerticalAlign":"middle","qrCodeLevel":0,"qid":"kh_4"},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":0,"top":163.5,"height":43,"width":124.5,"title":"数量:","coordinateSync":false,"widthHeightSync":false,"fontSize":40,"textContentVerticalAlign":"middle","qrCodeLevel":0,"right":70.25,"bottom":275.50001430511475,"vCenter":24.25,"hCenter":254.00001430511475},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":1.5,"top":286.5,"height":46,"width":157.5,"title":"生产款号:","coordinateSync":false,"widthHeightSync":false,"fontSize":30,"textContentVerticalAlign":"middle","qrCodeLevel":0,"right":156,"bottom":459.25,"vCenter":75,"hCenter":437.75},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":142.5,"top":286.5,"height":46,"width":444,"title":"MMGPayton Coach Jacket506880","right":454.5000114440918,"bottom":340.75,"vCenter":291.0000114440918,"hCenter":317.75,"field":"kh","coordinateSync":false,"widthHeightSync":false,"fontSize":30,"textContentVerticalAlign":"middle","qrCodeLevel":0,"qid":"zddbh_1","hideTitle":true,"lineHeight":36,"textContentWrap":"nowrap"},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":0,"top":343.5,"height":46,"width":121.5,"title":"款式:","coordinateSync":false,"widthHeightSync":false,"fontSize":30,"textContentVerticalAlign":"middle","qrCodeLevel":0,"right":94.25,"bottom":464.50001430511475,"vCenter":48.25,"hCenter":443.00001430511475},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":85.5,"top":343.5,"height":47,"width":493.5,"title":"西装","right":572.25,"bottom":394.25000858306885,"vCenter":343.5,"hCenter":370.75000858306885,"field":"pm","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"fontSize":30,"qrCodeLevel":0,"qid":"kh_1","lineHeight":36,"textContentWrap":"nowrap","textContentVerticalAlign":"middle"},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":84,"top":400.5,"height":46,"width":495,"title":"","right":570.75,"bottom":451.7500057220459,"vCenter":327,"hCenter":428.7500057220459,"field":"ys","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"fontSize":30,"qrCodeLevel":0,"qid":"kh_2","lineHeight":36,"textContentWrap":"nowrap","textContentVerticalAlign":"middle"},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":0,"top":400.5,"height":46.5,"width":120,"title":"颜色:","coordinateSync":false,"widthHeightSync":false,"fontSize":30,"textContentVerticalAlign":"middle","qrCodeLevel":0,"right":72.75,"bottom":480.75,"vCenter":37.5,"hCenter":457.5},"printElementType":{"title":"这是更新后的元素","type":"text"}},{"options":{"left":303,"top":19.5,"height":37,"width":291,"title":"DC2410023-0100","right":595.0000076293945,"bottom":55.24998474121094,"vCenter":449.50000762939453,"hCenter":36.74998474121094,"field":"zddbh","coordinateSync":false,"widthHeightSync":false,"fontSize":33,"textContentVerticalAlign":"middle","qrCodeLevel":0,"qid":"zddbh_1","lineHeight":33,"hideTitle":true},"printElementType":{"title":"这是更新后的元素","type":"text"}}],"paperNumberLeft":568.5,"paperNumberTop":339,"paperNumberDisabled":true,"paperNumberContinue":true,"watermarkOptions":{"content":"vue-plugin-hiprint","rotate":25,"timestamp":true,"format":"YYYY-MM-DD HH:mm"},"panelLayoutOptions":{}}]}
  873. //点击显示表格高亮
  874. function isCellHighlighted(rowIndex, item) {
  875. return highlightedCells.value.some(hc => hc.rowIndex === rowIndex && hc.item === item);
  876. console.log(highlightedCells.value)
  877. }
  878. const highlightedCells = ref([]);
  879. const selectedSizes = ref([]);
  880. let _table_row = ref('');
  881. //点击表格行事件
  882. function handleSizeClick(rowIndex, item, row) {
  883. _table_row = row
  884. // 查找当前单元格是否已高亮
  885. const index = highlightedCells.value.findIndex(hc => hc.rowIndex === rowIndex && hc.item === item);
  886. if (index !== -1) {
  887. // 如果已高亮,则移除
  888. highlightedCells.value.splice(index, 1);
  889. } else {
  890. // 如果已经有一个高亮条目,移除第一个高亮条目
  891. if (highlightedCells.value.length > 0) {
  892. highlightedCells.value.splice(0, 1);
  893. }
  894. // 添加新的高亮信息
  895. highlightedCells.value.push({
  896. rowIndex,
  897. item
  898. });
  899. }
  900. let newSizeItem = {
  901. size: item
  902. };
  903. const quantityWithParentheses = row[item];
  904. const match = quantityWithParentheses.match(/^([^()]+)\(([^()]+)\)$/);
  905. if (match) {
  906. // console.log("点击尺码包数据",match)
  907. //获取流水号(包数)
  908. newSizeItem.serial = match[1];
  909. //获取数量
  910. newSizeItem.sl = parseInt(match[2], 10);
  911. const existingIndex = selectedSizes.value.findIndex(s => s.size === item);
  912. if (existingIndex !== -1) {
  913. selectedSizes.value.splice(existingIndex, 1);
  914. }
  915. // 清空 selectedSizes 数组
  916. selectedSizes.value = [];
  917. selectedSizes.value.push(newSizeItem);
  918. } else {
  919. console.error('Invalid match format:', quantityWithParentheses);
  920. }
  921. }
  922. let _table_print = ref([]);//打印小票数据
  923. let allParams = [];
  924. //补打小票按钮
  925. const add_bdprintxp = () => {
  926. if (selectedSizes.value.length === 0) {
  927. ElMessage({
  928. type: 'warning',
  929. message: '请选择补打尺码'
  930. });
  931. return false;
  932. }
  933. console.log(_table_row['组别'])
  934. if(_table_row['组别'] != add_formData['组别']){
  935. ElMessage({
  936. type: 'warning',
  937. message: '请到对应小组进行补打小票'
  938. });
  939. return false;
  940. }
  941. let params = {};
  942. params.order_id = _table_row['子订单编号'];
  943. params.kh = _table_row['款号'];
  944. params.ks = _table_row['款式'];
  945. params.color = _table_row['颜色备注'];
  946. params.cm = selectedSizes.value[0].size;
  947. params.sl = selectedSizes.value[0].sl;
  948. params.sczl_jtbh = _table_row['组别'];
  949. params.sys_rq = currentDate;
  950. params.serial = selectedSizes.value[0].serial;
  951. params.wb = _table_row['尾包'];
  952. const weibao = _table_row['尾包'] === '是' ? '1' : '0';
  953. const ewm = `${params.order_id},${add_formData['机台号']},3,${params.cm},${params.sl},${weibao},${params.serial}`;
  954. _table_print.value = [{
  955. emm: ewm,
  956. zddbh: params.order_id,
  957. kh: params.kh,
  958. pm: params.ks,
  959. ys: params.color,
  960. cm: params.cm,
  961. sl: params.sl,
  962. zb: params.sczl_jtbh,
  963. dyrq: currentDates,
  964. wb: _table_row['尾包'],
  965. lsh: params.serial
  966. }];
  967. const hiprintTemplate = new hiprint.PrintTemplate({
  968. template: jsondata
  969. });
  970. hiprintTemplate.print(_table_print.value);
  971. };
  972. const _print = ref('')
  973. // 打印预览
  974. const add_printxp = async () => {
  975. console.log("打印小票")
  976. let cmArray = [cmformdata.cm1, cmformdata.cm2, cmformdata.cm3, cmformdata.cm4, cmformdata.cm5, cmformdata.cm6,
  977. cmformdata.cm7, cmformdata.cm8, cmformdata.cm9, cmformdata.cm10
  978. ];
  979. let slArray = [slformdata.sl1, slformdata.sl2, slformdata.sl3, slformdata.sl4, slformdata.sl5, slformdata.sl6,
  980. slformdata.sl7, slformdata.sl8, slformdata.sl9, slformdata.sl10
  981. ];
  982. let allParams = []; // 用于存储所有要打印的参数对象
  983. let allParamss = ref([]); // 用于存储所有要打印的参数对象
  984. if (!slArray.some(item => item !== "" && item !== null && item !== undefined)) {
  985. ElMessage({
  986. type: 'warning',
  987. message: '请填写上报数量后再使用打印功能'
  988. });
  989. return;
  990. } else {
  991. for (let i = 0; i < slArray.length; i++) {
  992. if (slArray[i]) {
  993. let params = {};
  994. params.order_id = add_searchInfo.value;
  995. params.sczl_jtbh = add_formData['组别'];
  996. params.gx = add_formData['工序'];
  997. params.sys_id = add_formData['人员'];
  998. params.wb = add_formData['是否订单尾包'];
  999. params.cm = cmArray[i];
  1000. params.sl = slArray[i];
  1001. params.sys_rq = currentDate;
  1002. // 流水号(包数)
  1003. _serial.value++;
  1004. console.log('小票打印前的流水号', _serial.value)
  1005. params.serial = padNumber( _serial.value, 3);
  1006. allParams.push(params);
  1007. allParamss.value = allParams.map((row) => {
  1008. console.log("row",row)
  1009. let weibao = add_formData['是否订单尾包'] === '1' ? '是' : '否';
  1010. // 二维码数据:订单子编号,组别,工序(固定),尺码,数量,是否尾包(1代表是0代表否),流水号
  1011. const ewm =
  1012. `${row['order_id']},${add_formData['机台号']},3,${row['cm']},${row['sl']},${add_formData['是否订单尾包']},${row['serial']}`;
  1013. return {
  1014. emm: ewm,
  1015. zddbh: row['order_id'],
  1016. kh: _yskskh.value['款号'],
  1017. pm: _yskskh.value['款式'],
  1018. ys: _yskskh.value['颜色备注'],
  1019. cm: row['cm'],
  1020. sl: row['sl'],
  1021. zb: row['sczl_jtbh'],
  1022. dyrq: currentDates,
  1023. wb: weibao,
  1024. lsh: row['serial']
  1025. };
  1026. });
  1027. const hiprintTemplate = new hiprint.PrintTemplate({
  1028. template: jsondata
  1029. });
  1030. hiprintTemplate.print(allParamss.value);
  1031. }
  1032. }
  1033. }
  1034. };
  1035. //报工删除
  1036. const delall = ref(true)
  1037. const Selection = ref('')
  1038. const selectionChange = (selection, type) => {
  1039. const ids = selection.map(item => {
  1040. return item.UniqId
  1041. })
  1042. Selection.value = ids.join(',')
  1043. console.log(Selection.value)
  1044. }
  1045. const del_delclick = async () => {
  1046. console.log(Selection.value)
  1047. console.log(add_formData['组别'])
  1048. const res1 = await spotcheckdel({UniqId:Selection.value,sys_id:add_formData['组别']})
  1049. if(res1.code === 0){
  1050. ElMessage.success('删除成功')
  1051. Selection.value = ''
  1052. add_onSubmit()
  1053. }
  1054. }
  1055. // =========== 分页 ===========
  1056. // 分页相关的响应式变量
  1057. const page = ref(1)
  1058. const total = ref(0)
  1059. const pageSize = ref(10)
  1060. // 分页
  1061. const handleCurrentChange = (val) => {
  1062. page.value = val;
  1063. _getStaffList();
  1064. };
  1065. // 修改页面容量 点击多少条/页
  1066. const handleSizeChange = (val) => {
  1067. page.value = 10; //默认显示
  1068. pageSize.value = val;
  1069. _getStaffList();
  1070. };
  1071. </script>
  1072. <style scoped>
  1073. :deep(.el-table__body .status-plan-usage-low) {
  1074. background: #ff80ff !important;
  1075. }
  1076. :deep(.el-table__body .status-plan-usage-lows) {
  1077. background: white !important;
  1078. }
  1079. .form-container {
  1080. display: flex;
  1081. flex-wrap: wrap;
  1082. }
  1083. .form-column {
  1084. /*flex: 1;*/
  1085. margin-right: 15px;
  1086. /* 调整列之间的间距 */
  1087. }
  1088. /* 左侧输入框宽度调整 */
  1089. .form-column .el-form-item .el-input {
  1090. width: 150px;
  1091. /* 调整左侧输入框的宽度 */
  1092. }
  1093. /* 媒体查询,根据需要调整断点 */
  1094. @media screen and (max-width: 768px) {
  1095. .form-column {
  1096. flex: 1 0 100%;
  1097. /* 在小屏幕下变成单列布局 */
  1098. margin-right: 0;
  1099. }
  1100. }
  1101. /* 表格复选框大小调整 */
  1102. :deep(.el-checkbox.el-checkbox--small .el-checkbox__inner) {
  1103. width: 30px;
  1104. /* 复选框宽度 */
  1105. height: 20px;
  1106. /* 复选框高度 */
  1107. }
  1108. :deep(.el-checkbox.el-checkbox--small.is-checked .el-checkbox__inner::after) {
  1109. transform: scale(1.2) rotate(45deg);
  1110. /* 调整选中后的对勾大小 */
  1111. top: 5%;
  1112. /* 调整对勾位置 */
  1113. left: 40%;
  1114. /* 调整对勾位置 */
  1115. width: 5px;
  1116. /* 调整对勾宽度 */
  1117. height: 9px;
  1118. /* 调整对勾高度 */
  1119. }
  1120. /*:deep(.el-table td .cell) {*/
  1121. /* line-height: 30px !important;*/
  1122. /*}*/
  1123. .JKWTree-container {
  1124. display: flex;
  1125. }
  1126. .JKWTree-tree {
  1127. /*width: 300px;*/
  1128. background-color: #fff;
  1129. padding: 10px;
  1130. margin-right: 20px;
  1131. }
  1132. .JKWTree-tree h3 {
  1133. font-size: 15px;
  1134. font-weight: 700;
  1135. margin: 10px 0;
  1136. }
  1137. .JKWTree-content {
  1138. flex: 1;
  1139. }
  1140. /* 图片上传 */
  1141. .upload-box {
  1142. width: 200px;
  1143. height: 200px;
  1144. border: 2px dashed #e2e2e2;
  1145. display: flex;
  1146. justify-content: center;
  1147. align-items: center;
  1148. position: relative;
  1149. cursor: pointer;
  1150. }
  1151. .uploaded-image {
  1152. width: 100%;
  1153. height: 100%;
  1154. object-fit: cover;
  1155. }
  1156. .upload-icon {
  1157. font-size: 40px;
  1158. color: #c0c4cc;
  1159. }
  1160. .file-input {
  1161. display: none;
  1162. }
  1163. .el-table .warning-row {
  1164. background: oldlace;
  1165. }
  1166. :deep(.el-input .is-disabled .cm_input) {
  1167. color: red;
  1168. }
  1169. /* 选中某行时的背景色 */
  1170. :deep(.el-table__body tr.current-row)>td {
  1171. background: #ff80ff !important;
  1172. }
  1173. </style>
  1174. <style scoped>
  1175. :deep(.el-table td .cell) {
  1176. line-height: 20px !important;
  1177. }
  1178. :deep(.el-tabs__header) {
  1179. margin-bottom: 0;
  1180. }
  1181. .search {
  1182. margin-left: 0px !important;
  1183. margin-right: 10px !important;
  1184. }
  1185. .bt {
  1186. margin-left: 2px !important;
  1187. padding: 3px !important;
  1188. font-size: 12px;
  1189. }
  1190. .el-tabs__header {
  1191. margin: 0px !important;
  1192. }
  1193. .gva-table-box {
  1194. max-width: 1400px;
  1195. padding: 0px !important;
  1196. margin-left: -10px !important;
  1197. }
  1198. .mab {
  1199. margin-bottom: 5px;
  1200. }
  1201. /* 点击按钮改变颜色 */
  1202. .active-button {
  1203. background-color: #ff0000;
  1204. }
  1205. .default-button {
  1206. background-color: #808080;
  1207. }
  1208. ::v-deep .el-input_inner {
  1209. font-size: 20px;
  1210. /* 更改为你想要的字体大小 */
  1211. }
  1212. /* 搜索样式 */
  1213. ::v-deep .el-input__wrapper #searchInput {
  1214. font-size: 16px;
  1215. }
  1216. ::v-deep .el-input__wrapper #jitaihao {
  1217. font-size: 18px;
  1218. }
  1219. ::v-deep .el-input__wrapper #gongxu {
  1220. font-size: 18px;
  1221. }
  1222. ::v-deep .el-input__wrapper #zubie {
  1223. font-size: 18px;
  1224. }
  1225. ::v-deep .el-input__wrapper #renyuan {
  1226. font-size: 18px;
  1227. }
  1228. ::v-deep .el-input__wrapper #shuliang {
  1229. font-size: 18px;
  1230. color: red;
  1231. }
  1232. ::v-deep .el-input__wrapper #chima {
  1233. font-size: 18px;
  1234. }
  1235. /* 尺码 */
  1236. ::v-deep .el-input__wrapper #cm1 {
  1237. font-size: 19px;
  1238. }
  1239. ::v-deep .el-input__wrapper #cm2 {
  1240. font-size: 19px;
  1241. }
  1242. ::v-deep .el-input__wrapper #cm3 {
  1243. font-size: 19px;
  1244. }
  1245. ::v-deep .el-input__wrapper #cm4 {
  1246. font-size: 19px;
  1247. }
  1248. ::v-deep .el-input__wrapper #cm5 {
  1249. font-size: 19px;
  1250. }
  1251. ::v-deep .el-input__wrapper #cm6 {
  1252. font-size: 19px;
  1253. }
  1254. ::v-deep .el-input__wrapper #cm7 {
  1255. font-size: 19px;
  1256. }
  1257. ::v-deep .el-input__wrapper #cm8 {
  1258. font-size: 19px;
  1259. }
  1260. ::v-deep .el-input__wrapper #cm9 {
  1261. font-size: 19px;
  1262. }
  1263. ::v-deep .el-input__wrapper #cm10 {
  1264. font-size: 19px;
  1265. }
  1266. ::v-deep .el-input__wrapper #cm11 {
  1267. font-size: 19px;
  1268. }
  1269. ::v-deep .el-input__wrapper #cmtotal {
  1270. font-size: 19px;
  1271. }
  1272. /* 制单数 */
  1273. ::v-deep .el-input__wrapper #zdsc1 {
  1274. font-size: 19px;
  1275. }
  1276. ::v-deep .el-input__wrapper #zdsc2 {
  1277. font-size: 19px;
  1278. }
  1279. ::v-deep .el-input__wrapper #zdsc3 {
  1280. font-size: 19px;
  1281. }
  1282. ::v-deep .el-input__wrapper #zdsc4 {
  1283. font-size: 19px;
  1284. }
  1285. ::v-deep .el-input__wrapper #zdsc5 {
  1286. font-size: 19px;
  1287. }
  1288. ::v-deep .el-input__wrapper #zdsc6 {
  1289. font-size: 19px;
  1290. }
  1291. ::v-deep .el-input__wrapper #zdsc7 {
  1292. font-size: 19px;
  1293. }
  1294. ::v-deep .el-input__wrapper #zdsc8 {
  1295. font-size: 19px;
  1296. }
  1297. ::v-deep .el-input__wrapper #zdsc9 {
  1298. font-size: 19px;
  1299. }
  1300. ::v-deep .el-input__wrapper #zdsc10 {
  1301. font-size: 19px;
  1302. }
  1303. ::v-deep .el-input__wrapper #zdtotal {
  1304. font-size: 19px;
  1305. }
  1306. /* 实裁数 */
  1307. ::v-deep .el-input__wrapper #scsl1 {
  1308. font-size: 19px;
  1309. color: red !important;
  1310. }
  1311. ::v-deep .el-input__wrapper #scsl2 {
  1312. font-size: 19px;
  1313. color: red !important;
  1314. }
  1315. ::v-deep .el-input__wrapper #scsl3 {
  1316. font-size: 19px;
  1317. color: red !important;
  1318. }
  1319. ::v-deep .el-input__wrapper #scsl4 {
  1320. font-size: 19px;
  1321. color: red !important;
  1322. }
  1323. ::v-deep .el-input__wrapper #scsl5 {
  1324. font-size: 19px;
  1325. color: red !important;
  1326. }
  1327. ::v-deep .el-input__wrapper #scsl6 {
  1328. font-size: 19px;
  1329. color: red !important;
  1330. }
  1331. ::v-deep .el-input__wrapper #scsl7 {
  1332. font-size: 19px;
  1333. color: red !important;
  1334. }
  1335. ::v-deep .el-input__wrapper #scsl8 {
  1336. font-size: 19px;
  1337. color: red !important;
  1338. }
  1339. ::v-deep .el-input__wrapper #scsl9 {
  1340. font-size: 19px;
  1341. color: red !important;
  1342. }
  1343. ::v-deep .el-input__wrapper #scsl10 {
  1344. font-size: 19px;
  1345. color: red !important;
  1346. }
  1347. ::v-deep .el-input__wrapper #sctotal {
  1348. font-size: 19px;
  1349. color: red !important;
  1350. }
  1351. /* 数量 */
  1352. ::v-deep .el-input__wrapper #sl1 {
  1353. font-size: 19px;
  1354. }
  1355. ::v-deep .el-input__wrapper #sl2 {
  1356. font-size: 19px;
  1357. }
  1358. ::v-deep .el-input__wrapper #sl3 {
  1359. font-size: 19px;
  1360. }
  1361. ::v-deep .el-input__wrapper #sl4 {
  1362. font-size: 19px;
  1363. }
  1364. ::v-deep .el-input__wrapper #sl5 {
  1365. font-size: 19px;
  1366. }
  1367. ::v-deep .el-input__wrapper #sl6 {
  1368. font-size: 19px;
  1369. }
  1370. ::v-deep .el-input__wrapper #sl7 {
  1371. font-size: 19px;
  1372. }
  1373. ::v-deep .el-input__wrapper #sl8 {
  1374. font-size: 19px;
  1375. }
  1376. ::v-deep .el-input__wrapper #sl9 {
  1377. font-size: 19px;
  1378. }
  1379. ::v-deep .el-input__wrapper #sl10 {
  1380. font-size: 19px;
  1381. }
  1382. ::v-deep .el-input__wrapper #sctotal {
  1383. font-size: 19px;
  1384. }
  1385. /* 选择历史记录改变颜色 */
  1386. .highlight-cell {
  1387. height: 40px;
  1388. /* 背景 */
  1389. background-color: rgba(190, 79, 79, 0.7) !important;
  1390. /* 使用 Flexbox 布局 */
  1391. display: flex;
  1392. /* 垂直居中 */
  1393. align-items: center;
  1394. /* 水平居中 */
  1395. justify-content: center;
  1396. /* 可选,确保 div 宽度填满单元格 */
  1397. width: 100%;
  1398. /* 可选,确保 padding 和 border 不会增加 div 的宽度 */
  1399. box-sizing: border-box;
  1400. }
  1401. .custom-button-text {
  1402. font-size: 25px;
  1403. /* 或者你想要的任何大小 */
  1404. }
  1405. /* 自定义表格样式 */
  1406. .custom-table >>> .el-table {
  1407. border: 2px solid #333; /* 表格整体边框加深 */
  1408. }
  1409. .custom-table >>> .el-table__header-wrapper th {
  1410. border-bottom: 2px solid #333; /* 表头底部边框加深 */
  1411. }
  1412. .custom-table >>> .el-table__body-wrapper td {
  1413. border: 1px solid #666; /* 表格单元格边框加深 */
  1414. }
  1415. .custom-table >>> .el-table__cell {
  1416. font-size: 20px; /* 单元格字体大小 */
  1417. font-weight: 600; /* 单元格字体加粗 */
  1418. }
  1419. .number-container {
  1420. display: flex;
  1421. flex-wrap: wrap;
  1422. gap: 4px;
  1423. margin-top: 3px;
  1424. }
  1425. .number-box {
  1426. display: flex;
  1427. justify-content: center;
  1428. align-items: center;
  1429. width: 40px;
  1430. height: 40px;
  1431. background-color: #f2f2f2;
  1432. border: 1px solid #ddd;
  1433. border-radius: 8px;
  1434. font-size: 18px;
  1435. color: #333;
  1436. font-weight: bold;
  1437. transition: background-color 0.3s;
  1438. }
  1439. .number-box.green {
  1440. /* 完成包数(绿色) */
  1441. background-color: palegreen;
  1442. color: #155724;
  1443. border-color: #c3e6cb;
  1444. }
  1445. .number-box.red {
  1446. background-color: red; /* 废弃包数(红色) */
  1447. color: #721c24;
  1448. border-color: #f5c6cb;
  1449. }
  1450. </style>