chafengbaogong.vue 60 KB

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