| | |
| | | <template> |
| | | <el-dialog title="出/入库详情" :visible.sync="visible" width="520px" :close-on-click-modal="false" |
| | | custom-class="record-detail-dialog" @close="handleClose" @opened="opened"> |
| | | <el-dialog :title="type == 'detail' ? '出/入库详情' : '确认出入库'" :visible.sync="visible" width="550px" |
| | | :close-on-click-modal="false" custom-class="record-detail-dialog" @close="handleClose" @opened="opened"> |
| | | <div class="dialog-content"> |
| | | <el-form :model="formData" label-position="top"> |
| | | <el-form-item label="出库/入库" required> |
| | | <div class="type-buttons"> |
| | | <el-button :type="formData.type == '1' ? 'primary' : 'default'" |
| | | @click="formData.type = '1'">出库</el-button> |
| | | <el-button :type="formData.type == '2' ? 'primary' : 'default'" |
| | | @click="formData.type = '2'">入库</el-button> |
| | | <el-button v-if="formData.type == '1'" type="primary">出库</el-button> |
| | | <el-button v-if="formData.type == '2'" type="primary">入库</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | |
| | | <div class="signature-row"> |
| | | <el-form-item label="操作人签字" required class="signature-item"> |
| | | <div class="signature-area" :class="{ 'waiting': !formData.operatorSignature }"> |
| | | <template v-if="formData.operatorSignature"> |
| | | <img :src="formData.operatorSignature" alt="操作人签字" /> |
| | | <div class="signature-area" :class="{ 'waiting': !formData.handleSignature }"> |
| | | <template v-if="formData.handleSignature"> |
| | | <img :src="formData.handleSignature" alt="操作人签字" /> |
| | | </template> |
| | | <template v-else> |
| | | <span class="waiting-text">等待确认</span> |
| | |
| | | </div> |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-if="formData.operatorSignature" label="出库时间" required class="time-item"> |
| | | <div class="time-value">{{ formData.operateTime }}</div> |
| | | <el-form-item v-if="formData.handleSignature" label="出库时间" required class="time-item"> |
| | | <div class="time-value">{{ formData.boundTime }}</div> |
| | | </el-form-item> |
| | | </div> |
| | | |
| | |
| | | <el-form-item required class="signature-item"> |
| | | <template #label> |
| | | <span>保藏人签字</span> |
| | | <el-button type="primary" class="edit-sign-btn" |
| | | <el-button v-if="type != 'detail'" type="primary" class="edit-sign-btn" |
| | | @click="showSignature = true">修改签名</el-button> |
| | | </template> |
| | | <div class="signature-area" :class="{ 'waiting': !formData.reviewerSignature }"> |
| | | <template v-if="formData.reviewerSignature"> |
| | | <img :src="formData.reviewerSignature" alt="保藏人签字" /> |
| | | <div class="signature-area" :class="{ 'waiting': !formData.preserveSignature }"> |
| | | <template v-if="formData.preserveSignature"> |
| | | <img :src="formData.preserveSignature" alt="保藏人签字" /> |
| | | </template> |
| | | <template v-else> |
| | | <span class="waiting-text">等待确认</span> |
| | |
| | | </div> |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-if="formData.reviewerSignature" label="确认时间" required class="time-item"> |
| | | <el-form-item v-if="formData.preserveSignature && type == 'detail'" label="确认时间" required |
| | | class="time-item"> |
| | | <div class="time-value">{{ formData.confirmTime }}</div> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | <div class="confirm-btn" v-if="type != 'detail'" style="text-align: center;margin-top: 20px;"> |
| | | <el-button type="primary" style="width: 80px;" @click="handleOutbound">确认</el-button> |
| | | </div> |
| | | </div> |
| | | <signature-canvas :visible.sync="showSignature" @confirm="handleSignatureConfirm" |
| | | @cancel="showSignature = false" /> |
| | |
| | | recordData: { |
| | | type: Object, |
| | | default: () => ({}) |
| | | }, |
| | | type: { |
| | | type: String, |
| | | default: 'detail' |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | this.$emit('close') |
| | | }, |
| | | handleOutbound() { |
| | | if (!this.formData.operatorSignature || !this.formData.reviewerSignature) { |
| | | if (!this.formData.preserveSignature) { |
| | | this.$message.warning('请等待所有签字确认后再进行出库操作') |
| | | return |
| | | } |
| | |
| | | this.handleClose() |
| | | }, |
| | | handleSignatureConfirm(dataUrl) { |
| | | this.formData.reviewerSignature = dataUrl |
| | | this.formData.preserveSignature = dataUrl |
| | | this.showSignature = false |
| | | // 可选:this.formData.confirmTime = new Date().toLocaleString() |
| | | } |