| | |
| | | <template> |
| | | <win-sm :title="`${setting.title}盘点`" @close="close" :width="'800px'"> |
| | | <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> |
| | | <el-form v-loading="loading" ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> |
| | | <el-form-item label="盘点单名" prop="businessFormName"> |
| | | <el-input |
| | | v-model="formData.businessFormName" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | loading:true, |
| | | count: 0, |
| | | loading: true, |
| | | checkAll: false, |
| | | checkedList: [], |
| | | warehouseOptions: [], // 仓库列表 |
| | | operatorOptions: [], |
| | | operatorOptions2: [], |
| | | formData: {}, |
| | | formData: { |
| | | businessFormName: '', |
| | | warehouseId: '', |
| | | operatorUserId: '', |
| | | monitorUserId: '', |
| | | remark: '', |
| | | }, |
| | | rules: { |
| | | businessFormName: [{ required: true, message: '请输入', trigger: 'blur' }], |
| | | warehouseId: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | |
| | | // 获取仓库列表 |
| | | handleSelectTenantWarehouse() { |
| | | selectTenantWarehouse({ agencyId: this.userInfo.tenantId }).then((res) => { |
| | | this.count++ |
| | | this.warehouseOptions = res; |
| | | if(this.count>1){ |
| | | this.loading = false |
| | | } |
| | | }); |
| | | }, |
| | | // 获取盘点人 |
| | | getPdr() { |
| | | warehouseManagerList({ tenantId: this.userInfo.tenantId }).then((res) => { |
| | | this.count++ |
| | | this.operatorOptions = res; |
| | | if(this.count>1){ |
| | | this.loading = false |
| | | } |
| | | }); |
| | | }, |
| | | // 获取监盘人 |
| | | getJpr() { |
| | | tenantUserQueryUser({ tenantId: this.userInfo.tenantId }).then((res) => { |
| | | this.count++ |
| | | this.operatorOptions2 = res; |
| | | if(this.count>1){ |
| | | this.loading = false |
| | | } |
| | | }); |
| | | }, |
| | | getEditInfo(id) {}, |
| | |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | const params = Object.assign({}, this.formData); |
| | | this.loading = true |
| | | if (this.setting.id) { |
| | | // 编辑接口 |
| | | inventoryEdit(params).then((res) => { |
| | | this.loading = false |
| | | this.$message.success('保存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | } else { |
| | | inventoryAdd(params).then((res) => { |
| | | this.loading = false |
| | | this.$message.success('保存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | } |
| | | } else { |