semiProductJobBomPL.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name"> 报工信息: ({{list.length || 0}})个</view>
  5. </view>
  6. <view :class="['material', it.extInfo.reportWeight && it.extInfo.reportWeight && 'materialBor']"
  7. v-for="(it, idx) in list" :key="it.id + idx">
  8. <view class="content_table">
  9. <view class="item rx-sc">
  10. <view class="rx">
  11. <view class="lable lable190 rx-cc " @click="getDelete2(idx)">
  12. <view class="round">{{idx + 1}}</view>
  13. <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="16"
  14. color="#fa3534"></uni-icons>
  15. 物料编码
  16. </view>
  17. <view class="content rx-bc">
  18. <view>{{it.code}} </view>
  19. <view class="tag_box"
  20. v-if="Object.prototype.hasOwnProperty.call(it, 'extInfo') && Object.prototype.hasOwnProperty.call(it.extInfo, 'productionTimes') && Object.prototype.hasOwnProperty.call(it.extInfo.productionTimes,item.currentTaskDiagram.taskId) ">
  21. {{ it.extInfo.productionTimes[item.currentTaskDiagram.taskId]}}
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="item rx-sc">
  27. <view class="rx">
  28. <view class="lable lable150 rx-cc ">名称</view>
  29. <view class="content rx-bc">
  30. <view>{{it.name}} <text v-if="[2, 23,9,28].includes(Number(it.rootCategoryLevelId))">
  31. ({{it.rootCategoryLevelId == 2 ? '在制品' : it.rootCategoryLevelId == 23 ? '半成品' : it.rootCategoryLevelId == 9 ? '产品' : it.rootCategoryLevelId == 28 ? '废品' : '' }})
  32. </text> </view>
  33. <view class="tag_box " v-if="it.isCache" style="margin-right: -36rpx;">缓</view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="item rx-sc">
  38. <view class="rx">
  39. <view class="lable lable150 rx-cc ">型号</view>
  40. <view class="content rx-sc">
  41. <view>{{it.modelType}}</view>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- <view class="item rx-sc">
  46. <view class="rx ww50">
  47. <view class="lable lable150 rx-cc ">设备</view>
  48. <view class="content rx-sc">
  49. <view>{{ it.deviceName || it.extInfo.deviceName }}</view>
  50. </view>
  51. </view>
  52. <view class="rx ww50">
  53. <view class="lable lable150 rx-cc ">炉次号</view>
  54. <view class="content content_num ">
  55. <view v-if='isDetails'>{{it.extInfo.heatNumber }}</view>
  56. <input class="uni-input" v-else v-model="it.extInfo.heatNumber"></input>
  57. </view>
  58. </view>
  59. </view> -->
  60. <view class="item rx-sc">
  61. <view class="rx">
  62. <view class="lable lable190 rx-cc ">{{ it.extInfo.newWeight ? '上道工序总重量' : '物料总重量' }}(
  63. {{it.extInfo.weightUnit}})
  64. </view>
  65. <view class="content content_num rx-sc">
  66. <view v-if="it.extInfo.newWeight">{{it.extInfo.newWeight }}
  67. </view>
  68. <input v-else class="uni-input" size="mini" v-model="it.extInfo.weight"></input>
  69. </view>
  70. </view>
  71. </view>
  72. <view class="item rx-sc">
  73. <view class="rx ww50">
  74. <view class="lable lable150 rx-cc ">投料数量</view>
  75. <view class="content content_num ">
  76. <view style="color:#157A2C;">{{it.feedQuantity }}</view>
  77. </view>
  78. </view>
  79. <view class="rx ww50">
  80. <view class="lable lable150 rx-cc ">投料类型</view>
  81. <view class="content rx-sc" style="color:#157A2C;">
  82. <view>批量投料</view>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. <view class="content_table2">
  88. <view class="head row rx-sc">
  89. <view class="item ww15" style="font-size: 20rpx;">
  90. 合格品数量
  91. </view>
  92. <view class="item ww25">报工总重量/{{it.extInfo.weightUnit}} </view>
  93. <view class="item ww20" style="font-size: 20rpx;">
  94. 设备
  95. </view>
  96. <view class="item ww20" style="font-size: 20rpx;">
  97. 炉次号
  98. </view>
  99. <view class="item ww20 rx-bc">
  100. <text>处置</text>
  101. <image v-if='!isDetails' class="icon" @click="handAddListPL(it, idx)"
  102. src="~@/static/pda/add.svg" style="width: 46rpx;height: 46rpx;margin-right: 12rpx;"></image>
  103. </view>
  104. <view class="item ww10 ">
  105. 操作
  106. </view>
  107. </view>
  108. <view class="table">
  109. <view class="tr row rx-sc" v-for="(yy, yyIdx) in it.extInfo.batchReportInfo">
  110. <view class="item ww15 content_num">
  111. <view v-if='isDetails'>{{yy.allFeedQuantity }}</view>
  112. <input class="uni-input" v-else v-model="yy.allFeedQuantity"
  113. @input="blurNum($event,idx, yyIdx)" type='number' v-show="keyYes"></input>
  114. </view>
  115. <view class="item ww25 content_num">
  116. <view v-if='isDetails'>{{yy.allReportWeight }}</view>
  117. <input class="uni-input" v-else v-model="yy.allReportWeight" type='digit' @input="blurWeight(it, idx, yyIdx)"></input>
  118. </view>
  119. <view class="item ww20 content_num">
  120. <view v-if='isDetails'>{{yy.deviceName }}</view>
  121. <zxz-uni-data-select v-else :localdata="deviceList" v-model="yy.deviceId" dataValue='instanceId'
  122. format='{name}' dataKey="instanceId" filterable
  123. @change=" e => selectValBatch(e, it, idx, yyIdx)" :clear='false'></zxz-uni-data-select>
  124. </view>
  125. <view class="item ww20 content_num">
  126. <view v-if='isDetails'>{{yy.heatNumber }}</view>
  127. <input class="uni-input" v-else v-model="yy.heatNumber" type='digit'></input>
  128. </view>
  129. <view class="item ww20" v-if='isDetails'>
  130. {{ yy.taskName}}
  131. </view>
  132. <view class="item ww20" v-else>
  133. <zxz-uni-data-select :localdata="stepsList" v-model="yy.taskId" dataValue='taskId'
  134. format='{taskTypeName}' dataKey="taskId" filterable
  135. @change=" e => yy.taskName = e.taskTypeName" :clear='false'></zxz-uni-data-select>
  136. </view>
  137. <view class="item ww10">
  138. <uni-icons v-if='!isDetails' custom-prefix="iconfont" type="icon-shanchu" size="16"
  139. @click="handDel3(idx, yyIdx)" color="#fa3534"></uni-icons>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. <view class="content_table2">
  145. <view class="head row rx-sc">
  146. <view class="item ww10" style="font-size: 20rpx;">
  147. 不合格数
  148. </view>
  149. <view class="item ww10" style="font-size: 20rpx;">
  150. 重量
  151. </view>
  152. <view class="item ww15">类型</view>
  153. <view class="item ww15" style="font-size: 20rpx;">
  154. 设备
  155. </view>
  156. <view class="item ww15" style="font-size: 20rpx;">
  157. 炉次号
  158. </view>
  159. <view class="item ww25 rx-bc">
  160. <text>处置/原因</text>
  161. <image v-if='!isDetails' class="icon" @click="handAddListPL4(it, idx)"
  162. src="~@/static/pda/add.svg" style="width: 46rpx;height: 46rpx;margin-right: 12rpx;"></image>
  163. </view>
  164. <view class="item ww10 ">
  165. 操作
  166. </view>
  167. </view>
  168. <view class="table">
  169. <view class="tr row rx-sc" v-for="(yy, yyIdx) in it.extInfo.notBatchReportInfo" :key="'not'+ idx + yyIdx">
  170. <view class="item ww10 content_num">
  171. <view v-if='isDetails'>{{yy.allFeedQuantity }}</view>
  172. <input class="uni-input" v-else v-model="yy.allFeedQuantity"
  173. @input="blurNum2($event,idx, yyIdx)" type='number' v-show="keyNo"></input>
  174. </view>
  175. <view class="item ww10 content_num">
  176. <view v-if='isDetails'>{{yy.allReportWeight }}</view>
  177. <input class="uni-input" v-else v-model="yy.allReportWeight"
  178. type='number' @input="blurWeight2(it, idx, yyIdx)" ></input>
  179. </view>
  180. <view class="item ww15 content_num">
  181. <zxz-uni-data-select :localdata="notTypeList" v-model="yy.notType" dataValue='code'
  182. format='{name}' dataKey="code" filterable :disabled="isDetails" @change="handLoad()"
  183. :clear='false'></zxz-uni-data-select>
  184. </view>
  185. <view class="item ww15 content_num">
  186. <view v-if='isDetails'>{{yy.deviceName }}</view>
  187. <zxz-uni-data-select :localdata="deviceList" v-model="yy.deviceId" dataValue='instanceId'
  188. format='{name}' dataKey="instanceId" filterable
  189. @change=" e => selectValNoBatch(e, it, idx, yyIdx)" :clear='false'></zxz-uni-data-select>
  190. </view>
  191. <view class="item ww15 content_num">
  192. <view v-if='isDetails'>{{yy.heatNumber }}</view>
  193. <input class="uni-input" v-else v-model="yy.heatNumber" ></input>
  194. </view>
  195. <view class="item ww25" v-if='isDetails'>
  196. {{ yy.notType == 5 ? yy.taskName : yy.notReason}}
  197. </view>
  198. <view class="item ww25 content_num" v-if="!isDetails && yy.notType == 5">
  199. <zxz-uni-data-select :localdata="stepsList" v-model="yy.taskId" dataValue='taskId'
  200. format='{taskTypeName}' dataKey="taskId" filterable
  201. @change=" e => yy.taskName = e.taskTypeName" :clear='false'></zxz-uni-data-select>
  202. </view>
  203. <view class="item ww25 content_num" v-if="!isDetails && yy.notType != 5">
  204. <input class="uni-input" v-if="yy.notType != 5 " v-model="yy.notReason"></input>
  205. </view>
  206. <view class="item ww10">
  207. <uni-icons v-if='!isDetails' custom-prefix="iconfont" type="icon-shanchu" size="16"
  208. @click="handDel4(idx, yyIdx)" color="#fa3534"></uni-icons>
  209. </view>
  210. </view>
  211. </view>
  212. </view>
  213. </view>
  214. </view>
  215. </template>
  216. <script>
  217. import {
  218. getTaskInstanceList
  219. } from '@/api/pda/workOrder.js'
  220. export default {
  221. props: {
  222. item: {
  223. type: Object,
  224. default: () => {}
  225. },
  226. list: {
  227. type: Array,
  228. default: () => []
  229. },
  230. isDetails: {
  231. type: Boolean,
  232. default: false
  233. },
  234. equipmentList: {
  235. type: Array,
  236. default: () => []
  237. },
  238. },
  239. watch: {
  240. equipmentList: {
  241. immediate: true,
  242. deep: true,
  243. handler(newVal) {
  244. // this.deviceList = newVal
  245. //设备下拉框数据来源
  246. let newData=JSON.parse(JSON.stringify(newVal))
  247. if(this.isDetails){
  248. this.deviceList = newData;
  249. }else{
  250. this.deviceArr(newData)
  251. }
  252. this.changeHeatNumber()
  253. }
  254. },
  255. },
  256. data() {
  257. return {
  258. stepsList: [],
  259. deviceList: [],
  260. notTypeList: [{
  261. code: "1",
  262. name: '返工'
  263. },
  264. {
  265. code: "2",
  266. name: '返修'
  267. },
  268. {
  269. code: "3",
  270. name: '报废'
  271. },
  272. {
  273. code: '4',
  274. name: '降级使用'
  275. },
  276. {
  277. code: "5",
  278. name: '让步接收'
  279. }
  280. ],
  281. keyNo:'1',
  282. keyYes:'1'
  283. }
  284. },
  285. created() {
  286. this.getSteps()
  287. console.log(this.list)
  288. },
  289. mounted(){
  290. this.theFirst()
  291. },
  292. methods: {
  293. theFirst(){
  294. if(this.deviceList.length>0){
  295. let obj = this.deviceList[0];
  296. this.list.map((item,index)=>{
  297. this.$set(this.list[index].extInfo.batchReportInfo[0],'deviceName',obj.name)
  298. this.$set(this.list[index].extInfo.batchReportInfo[0], 'heatNumber',obj.extInfo.heatNumber)
  299. this.$set(this.list[index].extInfo.batchReportInfo[0],'deviceId',obj.instanceId)
  300. this.$set(this.list[index].extInfo.notBatchReportInfo[0],'deviceName',obj.name)
  301. this.$set(this.list[index].extInfo.notBatchReportInfo[0], 'heatNumber',obj.extInfo.heatNumber)
  302. this.$set(this.list[index].extInfo.notBatchReportInfo[0],'deviceId',obj.instanceId)
  303. })
  304. }
  305. },
  306. getSteps() {
  307. getTaskInstanceList(this.item.workOrderId).then(res => {
  308. if (this.item.singleReport == 1) {
  309. this.stepsList = res
  310. } else {
  311. this.stepsList = res.filter(f => f.type != 6);
  312. }
  313. })
  314. },
  315. deviceArr(data){
  316. data.forEach((o,i) => {
  317. o.id=o.id ? o.id.toString()+'/'+i : '';
  318. o.instanceId=o.instanceId ? o.instanceId.toString()+'/'+i : '';
  319. })
  320. this.deviceList = data;
  321. if (this.deviceList.length == 0) {
  322. this.list.forEach((o,index) => {
  323. //碳谷合格分批设备炉次号
  324. o.extInfo.batchReportInfo.map((report,ridx)=>{
  325. this.$set(this.list[index].extInfo.batchReportInfo[ridx],'deviceName',this.deviceList[0].name)
  326. this.$set(this.list[index].extInfo.batchReportInfo[ridx],'deviceId',this.deviceList[0].id||this.deviceList[0].instanceId)
  327. //炉次号
  328. this.$set(this.list[index].extInfo.batchReportInfo[ridx], 'heatNumber',this.deviceList[0].extInfo.heatNumber)
  329. })
  330. o.extInfo.notBatchReportInfo.map((noReport,noidx)=>{
  331. this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'deviceName',this.deviceList[0].name)
  332. this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'deviceId',this.deviceList[0].id||this.deviceList[0].instanceId)
  333. //炉次号
  334. this.$set(this.list[index].extInfo.notBatchReportInfo[noidx], 'heatNumber',this.deviceList[0].extInfo.heatNumber)
  335. })
  336. //碳谷合格分批设备炉次号
  337. this.$forceUpdate();
  338. })
  339. }
  340. },
  341. handAddListPL(it, idx) {
  342. let deviceid=''
  343. if(this.deviceList.length>0){
  344. deviceid=this.deviceList[0].id||this.deviceList[0].instanceId
  345. }
  346. this.list[idx].extInfo.batchReportInfo.push({
  347. allFeedQuantity: '',
  348. allReportWeight: '',
  349. taskId: '',
  350. taskName: '',
  351. deviceId: deviceid?deviceid:'',
  352. deviceName:this.deviceList.length>0?this.deviceList[0].deviceName:'',
  353. heatNumber: this.deviceList.length>0?this.deviceList[0].extInfo.heatNumber:'',
  354. })
  355. this.$forceUpdate()
  356. },
  357. handDel3(idx, yyIdx) {
  358. this.list[idx].extInfo.batchReportInfo.splice(yyIdx, 1)
  359. },
  360. blurNum(event, idx, yyIdx) {
  361. let value = event.target.value;
  362. value = value.replace(/\./g, '');
  363. this.$set(this.list[idx].extInfo.batchReportInfo[yyIdx], 'allFeedQuantity', value);
  364. let count = 0
  365. this.list[idx].extInfo.batchReportInfo.forEach(m => {
  366. count = count + Number(m.allFeedQuantity || 0)
  367. })
  368. let count2 = 0
  369. this.list[idx].extInfo.notBatchReportInfo.forEach(m => {
  370. count2 = count2 + Number(m.allFeedQuantity || 0)
  371. })
  372. this.keyYes=false;
  373. if (Number(count + count2) > this.list[idx].feedQuantity) {
  374. this.$set(this.list[idx].extInfo.batchReportInfo[yyIdx], 'allFeedQuantity', 0)
  375. this.$forceUpdate()
  376. this.keyYes=true;
  377. uni.showToast({
  378. title: `投料数不能大于投料数量`,
  379. icon: 'none'
  380. })
  381. this.$emit('countNumPl',this.list,idx)
  382. }else{
  383. this.keyYes=true;
  384. this.$emit('countNumPl',this.list,idx)
  385. }
  386. },
  387. blurWeight(it, idx, yyIdx) {
  388. this.$emit('countNumPl',this.list,idx)
  389. },
  390. blurWeight2(it, idx, yyIdx) {
  391. this.$emit('countNumPl',this.list,idx)
  392. },
  393. blurNum2(event, idx, yyIdx) {
  394. // let value = event.target.value;
  395. // value = value.replace(/\./g, '');
  396. // this.$set(this.list[idx].extInfo.notBatchReportInfo[yyIdx], 'allFeedQuantity', value);
  397. let count = 0
  398. this.list[idx].extInfo.batchReportInfo.forEach(m => {
  399. count = count + Number(m.allFeedQuantity || 0)
  400. })
  401. let count2 = 0
  402. this.list[idx].extInfo.notBatchReportInfo.forEach(m => {
  403. count2 = count2 + Number(m.allFeedQuantity || 0)
  404. })
  405. this.keyNo=false;
  406. if (Number(count + count2) > this.list[idx].feedQuantity) {
  407. this.$set(this.list[idx].extInfo.notBatchReportInfo[yyIdx], 'allFeedQuantity', 0)
  408. this.$nextTick(()=>{
  409. // this.$set(this.list[idx].extInfo.notBatchReportInfo[yyIdx], 'allFeedQuantity', 0)
  410. })
  411. this.keyNo=true;
  412. this.$forceUpdate()
  413. uni.showToast({
  414. title: `投料数不能大于投料数量`,
  415. icon: 'none'
  416. })
  417. this.$emit('countNumPl',this.list,idx)
  418. }else{
  419. this.keyNo=true;
  420. this.$emit('countNumPl',this.list,idx)
  421. }
  422. },
  423. getDelete2(idx) {
  424. uni.showModal({
  425. title: '删除',
  426. content: '是否确实删除此物料!',
  427. confirmText: '确认', //这块是确定按钮的文字
  428. success: rr => {
  429. if (rr.confirm) {
  430. this.list.splice(idx, 1)
  431. }
  432. }
  433. })
  434. },
  435. selectValBatch(e, item, idx,bidx){
  436. let obj = this.deviceList.find((f) => f.id||f.instanceId == e.instanceId);
  437. //设备名称
  438. this.$set(this.list[idx].extInfo.batchReportInfo[bidx],'deviceName',obj.name)
  439. //炉次号
  440. this.$set(this.list[idx].extInfo.batchReportInfo[bidx], 'heatNumber',obj.extInfo.heatNumber)
  441. //设备id
  442. this.$set(this.list[idx].extInfo.batchReportInfo[bidx],'deviceId',obj.id||obj.instanceId)
  443. this.$forceUpdate();
  444. },
  445. selectValNoBatch(e, item, idx,bidx){
  446. let obj = this.deviceList.find((f) => f.id||f.instanceId == e.instanceId);
  447. //设备名称
  448. this.$set(this.list[idx].extInfo.notBatchReportInfo[bidx],'deviceName',obj.name)
  449. //炉次号
  450. this.$set(this.list[idx].extInfo.notBatchReportInfo[bidx], 'heatNumber',obj.extInfo.heatNumber)
  451. //设备id
  452. this.$set(this.list[idx].extInfo.notBatchReportInfo[bidx],'deviceId',obj.id||obj.instanceId)
  453. console.log('456',this.list[idx].extInfo.notBatchReportInfo[bidx])
  454. this.$forceUpdate();
  455. },
  456. handAddListPL4(it, idx) {
  457. let deviceid=''
  458. if(this.deviceList.length>0){
  459. deviceid=this.deviceList[0].id||this.deviceList[0].instanceId
  460. }
  461. this.list[idx].extInfo.notBatchReportInfo.push({
  462. allFeedQuantity: '',
  463. allReportWeight: '',
  464. notType: '',
  465. taskId: '',
  466. taskName: '',
  467. notReason: '',
  468. deviceId: deviceid?deviceid:'',
  469. deviceName:this.deviceList.length>0?this.deviceList[0].deviceName:'',
  470. heatNumber: this.deviceList.length>0?this.deviceList[0].extInfo.heatNumber:''
  471. })
  472. this.$forceUpdate()
  473. },
  474. handDel4(idx, yyIdx) {
  475. this.list[idx].extInfo.notBatchReportInfo.splice(yyIdx, 1)
  476. this.$forceUpdate()
  477. },
  478. handLoad() {
  479. this.$forceUpdate()
  480. },
  481. changeHeatNumber() {
  482. this.deviceList.forEach((f) => {
  483. this.list.forEach((o,index) => {
  484. // o.deviceId &&
  485. // f.instanceId == o.deviceId &&
  486. if (
  487. this.deviceList.length > 1
  488. ) {
  489. // o.extInfo.heatNumber = f.extInfo.heatNumber;
  490. this.$set(this.list[index].extInfo,'heatNumber',f.extInfo.heatNumber)
  491. //碳谷合格分批设备炉次号
  492. o.extInfo.batchReportInfo.map((report,ridx)=>{
  493. if(report.deviceId==f.instanceId){
  494. this.$set(this.list[index].extInfo.batchReportInfo[ridx],'heatNumber',f.extInfo.heatNumber)
  495. }
  496. })
  497. o.extInfo.notBatchReportInfo.map((noReport,noidx)=>{
  498. if(noReport.deviceId==f.instanceId){
  499. this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'heatNumber',f.extInfo.heatNumber)
  500. }
  501. })
  502. this.$forceUpdate();
  503. } else if (this.deviceList.length == 1) {
  504. o['deviceId'] = this.deviceList[0].id;
  505. // o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
  506. this.$set(this.list[index].extInfo,'heatNumber',this.deviceList[0].extInfo.heatNumber)
  507. //碳谷合格分批设备炉次号
  508. o.extInfo.batchReportInfo.map((report,ridx)=>{
  509. this.$set(this.list[index].extInfo.batchReportInfo[ridx],'deviceId',this.deviceList[0].instanceId)
  510. this.$set(this.list[index].extInfo.batchReportInfo[ridx],'heatNumber',this.deviceList[0].extInfo.heatNumber)
  511. this.$set(this.list[index].extInfo.batchReportInfo[ridx],'deviceName',this.deviceList[0].extInfo.name)
  512. })
  513. //碳谷合格分批设备炉次号
  514. o.extInfo.notBatchReportInfo.map((noReport,noidx)=>{
  515. this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'deviceId',this.deviceList[0].instanceId)
  516. this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'heatNumber',this.deviceList[0].extInfo.heatNumber)
  517. this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'deviceName',this.deviceList[0].extInfo.name)
  518. })
  519. this.$forceUpdate();
  520. }
  521. });
  522. });
  523. },
  524. toFixedFn(weight, num) {
  525. let total = Number(weight) * Number(num)
  526. return total.toFixed(2)
  527. }
  528. }
  529. }
  530. </script>
  531. <style lang="scss" scoped>
  532. .title_box {
  533. margin-top: 20rpx;
  534. .name {
  535. font-size: 28rpx;
  536. font-style: normal;
  537. font-weight: 400;
  538. color: $theme-color;
  539. padding-left: 20rpx;
  540. position: relative;
  541. &:before {
  542. position: absolute;
  543. content: '';
  544. left: 0rpx;
  545. top: 0rpx;
  546. bottom: 0rpx;
  547. width: 4rpx;
  548. height: 28rpx;
  549. background: $theme-color;
  550. margin: auto;
  551. }
  552. }
  553. .btn_box {
  554. .btn {
  555. padding: 0 18rpx;
  556. height: 50rpx;
  557. line-height: 50rpx;
  558. background: $theme-color;
  559. font-size: 26rpx;
  560. font-style: normal;
  561. font-weight: 400;
  562. font-size: 24rpx;
  563. color: #fff;
  564. border-radius: 4rpx;
  565. margin-left: 24rpx;
  566. }
  567. }
  568. }
  569. .material {
  570. margin-top: 16rpx;
  571. border: 1rpx solid transparent;
  572. .content_table {
  573. width: 100%;
  574. border: 2rpx solid $border-color;
  575. box-sizing: border-box;
  576. .item {
  577. display: flex;
  578. border-bottom: 2rpx solid $border-color;
  579. .lable {
  580. width: 132rpx;
  581. text-align: center;
  582. background-color: #F7F9FA;
  583. font-size: 26rpx;
  584. border-right: 2rpx solid $border-color;
  585. flex-shrink: 0;
  586. }
  587. .lable150 {
  588. width: 156rpx !important;
  589. font-size: 24rpx;
  590. }
  591. .lable190 {
  592. width: 230rpx !important;
  593. font-size: 24rpx;
  594. }
  595. .ww80 {
  596. width: 80rpx;
  597. }
  598. .content {
  599. width: 500rpx;
  600. min-height: 64rpx;
  601. font-size: 28rpx;
  602. line-height: 28rpx;
  603. font-style: normal;
  604. font-weight: 400;
  605. padding: 18rpx 8rpx;
  606. box-sizing: border-box;
  607. word-wrap: break-word;
  608. flex-grow: 1 !important;
  609. .unit {
  610. padding: 0 4rpx;
  611. font-size: 24rpx;
  612. color: #404446;
  613. }
  614. .penalize {
  615. width: 160rpx;
  616. line-height: 60rpx;
  617. background: $theme-color;
  618. font-size: 24rpx;
  619. text-align: center;
  620. color: #fff;
  621. }
  622. }
  623. .content_H {
  624. min-height: 92rpx;
  625. }
  626. .pd4 {
  627. padding: 4rpx 8rpx;
  628. }
  629. &:last-child {
  630. border-bottom: none;
  631. }
  632. }
  633. .ww55 {
  634. width: 55%;
  635. }
  636. .ww10 {
  637. width: 10%;
  638. }
  639. .ww40 {
  640. width: 40%;
  641. }
  642. .ww50 {
  643. width: 50%;
  644. }
  645. .ww45 {
  646. width: 45%;
  647. }
  648. .tag_box {
  649. padding: 2rpx 10rpx;
  650. margin-right: 12rpx;
  651. background: #E6A23C;
  652. font-size: 22rpx;
  653. color: #fff;
  654. border-radius: 4rpx;
  655. }
  656. }
  657. }
  658. .materialBor {
  659. border: 1rpx solid #157A2C
  660. }
  661. .content_table2 {
  662. width: 100%;
  663. .row {
  664. width: 100%;
  665. .item {
  666. color: #404446;
  667. font-size: 28rpx;
  668. padding-left: 12rpx;
  669. }
  670. .color157 {
  671. color: $theme-color;
  672. }
  673. .ww30 {
  674. width: 30%;
  675. }
  676. .ww20 {
  677. width: 20%;
  678. }
  679. .ww15 {
  680. width: 15%;
  681. }
  682. .ww25 {
  683. width: 25%;
  684. }
  685. .ww35 {
  686. width: 35%;
  687. }
  688. .ww50 {
  689. width: 50%;
  690. }
  691. .ww10 {
  692. width: 10%;
  693. }
  694. .ww40 {
  695. width: 40%;
  696. }
  697. }
  698. .head {
  699. height: 64rpx;
  700. background: #F7F9FA;
  701. // border-top: 2rpx solid #E3E5E5;
  702. border-left: 2rpx solid #E3E5E5;
  703. box-sizing: border-box;
  704. .item {
  705. height: 64rpx;
  706. line-height: 64rpx;
  707. border-right: 2rpx solid #E3E5E5;
  708. box-sizing: border-box;
  709. font-size: 22rpx;
  710. }
  711. }
  712. .tr {
  713. border-top: 2rpx solid #E3E5E5;
  714. border-left: 2rpx solid #E3E5E5;
  715. .item {
  716. font-size: 24rpx;
  717. min-height: 74rpx;
  718. display: flex;
  719. align-items: center;
  720. border-right: 2rpx solid #E3E5E5;
  721. box-sizing: border-box;
  722. white-space: normal;
  723. word-break: break-all;
  724. }
  725. &:last-child {
  726. border-bottom: 2rpx solid #E3E5E5;
  727. }
  728. .numerate {
  729. font-size: 22rpx;
  730. color: $theme-color;
  731. }
  732. }
  733. }
  734. .content_num {
  735. display: flex;
  736. align-items: center;
  737. padding: 0 4rpx;
  738. /deep/ .uni-input-input {
  739. border: 2rpx solid #F0F8F2;
  740. box-sizing: border-box;
  741. background: #F0F8F2;
  742. color: $theme-color;
  743. }
  744. }
  745. .round {
  746. width: 32rpx;
  747. height: 32rpx;
  748. line-height: 30rpx;
  749. text-align: center;
  750. border-radius: 50%;
  751. background: $theme-color;
  752. font-size: 24rpx;
  753. font-style: normal;
  754. font-weight: 400;
  755. color: #fff;
  756. margin-right: 10rpx;
  757. }
  758. </style>