| | |
| | | <view v-else class="info-value">{{ formData.itemNo }}</view> |
| | | </view> |
| | | <view class="info-item"> |
| | | <view class="info-label">计划编号</view> |
| | | <view class="info-label">工单单号</view> |
| | | <picker v-if="isUpdate" class="picker-input" name="selector" :range="DAA001List" |
| | | @change="onDaa001Change"> |
| | | <view class="picker-value">{{ DAA001List[DAA001Index] || '请选择' }}</view> |
| | |
| | | <button class="action-btn warning" v-if="!isUpdate && !isShowTable" @click="saveRemarks">添加不合格描述</button> |
| | | <button class="action-btn primary" v-if="isShowTable" @click="getTable">获取检验项目</button> |
| | | <button class="action-btn primary" v-if="isShowTable && isUpdate" @click="saveTable">生成检验项目</button> |
| | | <button class="action-btn success" v-if="!isUpdate && !isShowTable" @click="getGenUpdate">获取检验项目</button> |
| | | <button class="action-btn success" v-if="!isUpdate && !isShowTable" @click="submitInspection">提交检验</button> |
| | | </view> |
| | | <!-- 修改不合格描述弹出框 --> |
| | | <view v-if="remarksPopup" class="overlay"> |
| | |
| | | }, |
| | | getItem() { |
| | | |
| | | if (this.isSubmit) { |
| | | this.$showMessage("此物料无启用的检验项目,请维护!"); |
| | | return; |
| | | } |
| | | |
| | | |
| | | if (!this.formData.billNo) { |
| | | this.$showMessage("请选择计划编号"); |
| | | this.$showMessage("请选择工单单号"); |
| | | return; |
| | | } |
| | | |
| | |
| | | this.isUpdate = false; |
| | | this.init(); |
| | | }) |
| | | }, |
| | | submitInspection() { |
| | | if (this.formData.id) { |
| | | this.$post({ |
| | | url: "/XJ/SjSubmit", |
| | | data: { |
| | | id: this.formData.id, |
| | | userNo: this.$loginInfo.account |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList) { |
| | | this.$showMessage("提交成功"); |
| | | this.init(); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | getGenUpdate() { |
| | | if (!this.formData.id || !this.formData.releaseNo) { |
| | | this.$showMessage("请先保存检验单!"); |
| | | return; |
| | | } |
| | | this.$post({ |
| | | url: "/XJ/GenUpdate", |
| | | data: { |
| | | id: this.formData.id, |
| | | no: this.formData.releaseNo, |
| | | user: this.$loginInfo.account |
| | | } |
| | | }).then(res => { |
| | | if (res.data.result === 0) { |
| | | this.$showMessage("获取检验项目成功"); |
| | | this.init(); |
| | | } else { |
| | | this.$showMessage(res.data.message || "获取失败"); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | color: white; |
| | | } |
| | | |
| | | .action-btn.success { |
| | | background-color: #2ecc71; |
| | | color: white; |
| | | } |
| | | |
| | | /* 弹出框样式 */ |
| | | .overlay { |
| | | position: fixed; |