|
|
@ -429,6 +429,17 @@
|
|
|
|
<el-button @click="outCancel">取 消</el-button>
|
|
|
|
<el-button @click="outCancel">取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="确认删除" :visible.sync="deleteDialogVisible" width="30%">
|
|
|
|
|
|
|
|
<p>物资名称: {{ materialName }}</p>
|
|
|
|
|
|
|
|
<p>物资数量: {{ materialQuantity }}</p>
|
|
|
|
|
|
|
|
<p>验证码: {{ captcha }}</p>
|
|
|
|
|
|
|
|
<el-input v-model="captchaInput" placeholder="请输入验证码"></el-input>
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button @click="deleteDialogVisible = false">取消</el-button>
|
|
|
|
|
|
|
|
<el-button type="primary" @click="confirmDelete">确定</el-button>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -535,6 +546,13 @@
|
|
|
|
outOpen:false,
|
|
|
|
outOpen:false,
|
|
|
|
outMaterialId:null,
|
|
|
|
outMaterialId:null,
|
|
|
|
outForm:{},
|
|
|
|
outForm:{},
|
|
|
|
|
|
|
|
// 删除与验证码相关
|
|
|
|
|
|
|
|
captcha: null,
|
|
|
|
|
|
|
|
captchaInput: null,
|
|
|
|
|
|
|
|
materialName: '',
|
|
|
|
|
|
|
|
materialQuantity: '',
|
|
|
|
|
|
|
|
deleteDialogVisible: false,
|
|
|
|
|
|
|
|
materialToDelete: null,
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
materialQuantity: [
|
|
|
|
materialQuantity: [
|
|
|
@ -680,6 +698,12 @@
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
generateCaptcha() {
|
|
|
|
|
|
|
|
this.captcha = Math.floor(1000 + Math.random() * 9000);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
validateCaptcha() {
|
|
|
|
|
|
|
|
return this.captchaInput == this.captcha;
|
|
|
|
|
|
|
|
},
|
|
|
|
outCancel() {
|
|
|
|
outCancel() {
|
|
|
|
this.outOpen = false;
|
|
|
|
this.outOpen = false;
|
|
|
|
this.outReset();
|
|
|
|
this.outReset();
|
|
|
@ -800,6 +824,25 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
handleDelete(row) {
|
|
|
|
handleDelete(row) {
|
|
|
|
|
|
|
|
this.materialToDelete = row;
|
|
|
|
|
|
|
|
this.materialName = row.materialName;
|
|
|
|
|
|
|
|
this.materialQuantity = row.materialQuantity;
|
|
|
|
|
|
|
|
this.generateCaptcha();
|
|
|
|
|
|
|
|
this.deleteDialogVisible = true;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
confirmDelete() {
|
|
|
|
|
|
|
|
if (this.validateCaptcha()) {
|
|
|
|
|
|
|
|
delEhsMaterial(this.materialToDelete.materialId).then(() => {
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
this.$message.success("删除成功");
|
|
|
|
|
|
|
|
this.captchaInput = null;
|
|
|
|
|
|
|
|
this.deleteDialogVisible = false;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error('验证码错误');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/* handleDelete(row) {
|
|
|
|
const materialIds = row.materialId || this.ids;
|
|
|
|
const materialIds = row.materialId || this.ids;
|
|
|
|
const materialName = row.materialName;
|
|
|
|
const materialName = row.materialName;
|
|
|
|
const materialQuantity = row.materialQuantity;
|
|
|
|
const materialQuantity = row.materialQuantity;
|
|
|
@ -809,7 +852,7 @@
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
}).catch(() => {});
|
|
|
|
}).catch(() => {});
|
|
|
|
},
|
|
|
|
}, */
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
handleExport() {
|
|
|
|
handleExport() {
|
|
|
|
this.download('ehsMaterial/ehsMaterial/export', {
|
|
|
|
this.download('ehsMaterial/ehsMaterial/export', {
|
|
|
|