chafengbaogong.vue 58 KB

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