| | |
| | | <view class="info-item"> |
| | | <view class="info-label">工单号</view> |
| | | <superwei-combox v-if="isUpdate" :candidates="DAA001List" placeholder="请选择或输入" |
| | | v-model="formData.billNo" |
| | | v-model="formData.rBillNo" |
| | | @select="onDaa001Change" |
| | | class="picker-input"></superwei-combox> |
| | | <view v-else class="info-value">{{ formData.billNo }}</view> |
| | | <view v-else class="info-value">{{ formData.rBillNo }}</view> |
| | | </view> |
| | | <view class="info-item"> |
| | | <view class="info-label">送检批次</view> |
| | | <input class="info-input" type="text" v-model="formData.rbillNo" :readonly="true" /> |
| | | <superwei-combox v-if="isUpdate" :candidates="billNoList" placeholder="请选择" |
| | | v-model="formData.billNo" |
| | | @select="onBillNoChange" |
| | | class="picker-input"></superwei-combox> |
| | | <view v-else class="info-value">{{ formData.billNo }}</view> |
| | | </view> |
| | | <view class="info-item"> |
| | | <view class="info-label">物料编码</view> |
| | |
| | | remarks: "", |
| | | |
| | | showPopup: false, |
| | | billNoList: [], |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | |
| | | this.$post({ |
| | | url: "/RKJ/getDaa001", |
| | | data: { |
| | | lineNo: this.formData.lineName |
| | | lineNo: this.lineNo |
| | | } |
| | | }).then(res => { |
| | | this.BillNoList = res.data.tbBillList; |
| | | this.DAA001List = res.data.tbBillList.map(s => s.billNo); |
| | | |
| | | // 工单号去重,只显示唯一 |
| | | this.DAA001List = Array.from(new Set(res.data.tbBillList.map(s => s.rBillNo))); |
| | | this.formData.rBillNo = ""; |
| | | this.formData.billNo = ""; |
| | | this.formData.mocode = ""; |
| | | this.formData.boardModel = ""; |
| | | this.formData.taskNo = ""; |
| | | this.formData.itemName = ""; |
| | | this.formData.itemNo = ""; |
| | | this.formData.boardName = ""; |
| | | this.formData.quantity = ""; |
| | | this.billNoList = []; |
| | | this.tableData = []; |
| | | }) |
| | | }, |
| | | //选取工单填充物料号和其他信息 |
| | | onDaa001Change(e) { |
| | | |
| | | this.formData.billNo = e; |
| | | this.formData.rBillNo = e; |
| | | |
| | | let data = this.BillNoList[this.DAA001List.indexOf(e)]; |
| | | |
| | | //当返回的结果集为空时置空原有的值 |
| | | if (!data) { |
| | | // 找出所有属于该工单号的送检批次 |
| | | this.billNoList = this.BillNoList.filter(item => item.rBillNo === e).map(item => item.billNo); |
| | | this.formData.billNo = ""; |
| | | this.formData.mocode = ""; |
| | | this.formData.boardModel = ""; |
| | | this.formData.taskNo = ""; |
| | | this.formData.itemName = ""; |
| | | this.formData.itemNo = ""; |
| | | this.formData.boardName = ""; |
| | | this.formData.quantity = ""; |
| | | this.tableData = []; |
| | | }, |
| | | onBillNoChange(e) { |
| | | this.formData.billNo = e; |
| | | // 找到当前工单号+送检批次号的完整数据 |
| | | let data = this.BillNoList.find(item => item.rBillNo === this.formData.rBillNo && item.billNo === e); |
| | | if (!data) { |
| | | this.formData.itemName = ""; |
| | | this.formData.itemNo = ""; |
| | | this.formData.quantity = ""; |
| | | this.formData.itemModel = ""; |
| | | this.tableData = []; |
| | | return; |
| | | } |
| | | //不为空时赋值 |
| | | this.formData.billNo = data.billNo; |
| | | this.formData.mocode = data.mocode; |
| | | this.formData.boardModel = data.boardModel; |
| | | this.formData.taskNo = data.taskNo; |
| | | this.formData.itemName = data.itemName; |
| | | this.formData.itemNo = data.itemNo; |
| | | this.formData.boardName = data.boardName; |
| | | this.formData.quantity = data.quantity; |
| | | |
| | | |
| | | this.$post({ |
| | | url: "/RKJ/setJYItem", |
| | | data: { |
| | | itemNo: this.formData.itemNo, |
| | | quantity:this.formData.quantity |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data.tbBillList; |
| | | if (this.tableData.length === 0) { |
| | | this.$showMessage("该物料条码没有检验项目"); |
| | | this.isSubmit = true; |
| | | this.tableData = []; |
| | | } else { |
| | | this.isSubmit = false; |
| | | } |
| | | }); |
| | | this.formData.itemModel = data.itemModel || ""; |
| | | // 如需自动请求检验项目,可在此处补充逻辑 |
| | | }, |
| | | init() { |
| | | this.$post({ |
| | |
| | | } |
| | | |
| | | .title { |
| | | font-size: 20px; |
| | | font-size: 24px; |
| | | font-weight: 600; |
| | | color: #2c3e50; |
| | | margin-bottom: 8px; |
| | |
| | | |
| | | .section-header { |
| | | background-color: #f8f9fa; |
| | | padding: 15px 20px; |
| | | padding: 32px 32px; |
| | | border-bottom: 1px solid #eee; |
| | | font-size: 16px; |
| | | font-size: 20px; |
| | | font-weight: 600; |
| | | color: #2c3e50; |
| | | } |
| | | |
| | | .section-body { |
| | | padding: 20px; |
| | | padding: 56px 40px; |
| | | } |
| | | |
| | | /* 信息网格 */ |
| | | .info-grid { |
| | | display: grid; |
| | | grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); |
| | | gap: 15px; |
| | | gap: 48px; |
| | | } |
| | | |
| | | .info-item { |
| | |
| | | } |
| | | |
| | | .info-label { |
| | | font-size: 12px; |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | color: #7f8c8d; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .info-value { |
| | | font-size: 14px; |
| | | font-size: 18px; |
| | | font-weight: 500; |
| | | color: #2c3e50; |
| | | } |
| | | |
| | |
| | | |
| | | /* 输入框样式 */ |
| | | .info-input { |
| | | padding: 8px 12px; |
| | | padding: 14px 20px; |
| | | border: 1px solid #ddd; |
| | | border-radius: 4px; |
| | | font-size: 14px; |
| | | font-size: 16px; |
| | | background-color: white; |
| | | } |
| | | |
| | |
| | | .picker-input { |
| | | border: 1px solid #ddd; |
| | | border-radius: 4px; |
| | | padding: 8px 12px; |
| | | padding: 14px 20px; |
| | | background-color: white; |
| | | cursor: pointer; |
| | | font-size: 14px; |
| | | font-size: 16px; |
| | | color: #2c3e50; |
| | | } |
| | | |
| | |
| | | /* 操作按钮 */ |
| | | .action-buttons { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 10px; |
| | | flex-direction: row; |
| | | justify-content: flex-end; |
| | | gap: 20px; |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | |
| | | @media (max-width: 768px) { |
| | | .info-grid { |
| | | grid-template-columns: 1fr; |
| | | gap: 20px; |
| | | } |
| | | |
| | | .action-buttons { |
| | | flex-direction: column; |
| | | justify-content: flex-start; |
| | | gap: 10px; |
| | | } |
| | | } |
| | | </style> |