| | |
| | | <el-form-item label="出库/入库" required> |
| | | <div class="type-buttons"> |
| | | <el-button |
| | | :type="formData.type === '出库' ? 'primary' : 'default'" |
| | | @click="formData.type = '出库'" |
| | | :type="formData.type === '1' ? 'primary' : 'default'" |
| | | @click="formData.type = '1'" |
| | | >出库</el-button> |
| | | <el-button |
| | | :type="formData.type === '入库' ? 'primary' : 'default'" |
| | | @click="formData.type = '入库'" |
| | | :type="formData.type === '2' ? 'primary' : 'default'" |
| | | @click="formData.type = '2'" |
| | | >入库</el-button> |
| | | </div> |
| | | </el-form-item> |
| | |
| | | <span>操作人签字</span> |
| | | <el-button type="primary" class="sign-btn" @click="showSignature = true">签名</el-button> |
| | | </template> |
| | | <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> |
| | |
| | | data() { |
| | | return { |
| | | formData: { |
| | | type: '出库', |
| | | operatorSignature: '' |
| | | type: '1', |
| | | handleSignature: '' |
| | | }, |
| | | showSignature: false |
| | | } |
| | |
| | | this.$emit('close') |
| | | }, |
| | | handleConfirm() { |
| | | if (!this.formData.operatorSignature) { |
| | | if (!this.formData.handleSignature) { |
| | | this.$message.warning('请先签名') |
| | | return |
| | | } |
| | |
| | | this.handleClose() |
| | | }, |
| | | handleSignatureConfirm(dataUrl) { |
| | | this.formData.operatorSignature = dataUrl |
| | | this.formData.handleSignature = dataUrl |
| | | this.showSignature = false |
| | | } |
| | | } |