|
|
@ -16,12 +16,11 @@ |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>设备编码</span> |
|
|
|
<span><span class="icon">*</span>设备验证码</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop=""> |
|
|
|
<el-input v-model="addForm.manufacturerName" maxlength="20" placeholder="请填写设备编码" class="addinputw" |
|
|
|
clearable /> |
|
|
|
<el-form-item prop="vCode"> |
|
|
|
<el-input v-model="addForm.vCode" maxlength="20" placeholder="请填写设备验证码" class="addinputw" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
@ -29,7 +28,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="addForm.manufacturerAs" maxlength="20" placeholder="请填写设备位置 " class="addinputw" |
|
|
|
<el-input v-model="addForm.posotion" maxlength="20" placeholder="请填写设备位置 " class="addinputw" |
|
|
|
clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -39,53 +38,35 @@ |
|
|
|
<span><span class="icon">*</span>设备类型</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<!-- <el-form-item prop=""> |
|
|
|
<el-input v-model="addForm.manufacturerCode" :disabled="!isShow" maxlength="20" |
|
|
|
placeholder="请填写金蝶供应商编码,如无请自己创建编码" class="addinputw" clearable /> |
|
|
|
</el-form-item> --> |
|
|
|
<el-form-item> |
|
|
|
<el-select v-model="addForm.manufacturerCode" filterable clearable placeholder="请选择设备类型" |
|
|
|
style="width: 410px;"> |
|
|
|
<el-form-item prop="type"> |
|
|
|
<el-select v-model="addForm.type" filterable clearable placeholder="请选择设备类型" style="width: 410px;"> |
|
|
|
<el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id" |
|
|
|
class="addinputw" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>安装时间</span> |
|
|
|
<span>备注</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop=""> |
|
|
|
<!-- <el-input v-model="addForm.manufacturerCode" :disabled="!isShow" maxlength="20" |
|
|
|
placeholder="请填写金蝶供应商编码,如无请自己创建编码" class="addinputw" clearable /> --> |
|
|
|
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.manufacturerCode" style="width: 410px;" |
|
|
|
maxlength="20"></el-date-picker> |
|
|
|
<!-- <el-date-picker type="date" placeholder="选择日期" v-model="addForm.manufacturerCode" style="width: 410px;" |
|
|
|
maxlength="20"></el-date-picker> --> |
|
|
|
<el-input v-model="addForm.remarks" maxlength="20" placeholder="请填写备注" class="addinputw" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>出厂时间</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop=""> |
|
|
|
<!-- <el-input v-model="addForm.manufacturerCode" :disabled="!isShow" maxlength="20" |
|
|
|
placeholder="请填写金蝶供应商编码,如无请自己创建编码" class="addinputw" clearable /> --> |
|
|
|
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.manufacturerCode" style="width: 410px;" |
|
|
|
maxlength="20"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>供货商</span> |
|
|
|
<span><span class="icon">*</span>设备名称</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop=""> |
|
|
|
<el-input v-model="addForm.manufacturerCode" :disabled="!isShow" maxlength="20" placeholder="请填写供应商编码" |
|
|
|
class="addinputw" clearable /> |
|
|
|
<el-form-item prop="name"> |
|
|
|
<el-input v-model="addForm.name" maxlength="20" placeholder="请填写设备名称" class="addinputw" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<!-- <el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>生产厂家</span> |
|
|
|
</el-col> |
|
|
@ -100,87 +81,11 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item> |
|
|
|
<!-- <el-input v-model="addForm.manufacturerFax" maxlength="20" placeholder="" class="addinputw" clearable /> --> |
|
|
|
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.manufacturerFax" style="width: 410px;" |
|
|
|
maxlength="20"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<!-- <el-row> --> |
|
|
|
<!-- <el-col :span="4" class="tleftb"> |
|
|
|
<span>所属仓库</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="addForm.manufacturerTelePhone" maxlength="20" placeholder="请填写所属仓库" |
|
|
|
class="addinputw" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> --> |
|
|
|
<!-- <el-col :span="4" class="tleftb"> |
|
|
|
<span></span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-col> --> |
|
|
|
<!-- </el-row> --> |
|
|
|
<!-- <el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>联系人姓名</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop="contactName"> |
|
|
|
<el-input v-model="addForm.contactName" maxlength="5" placeholder="" class="addinputw" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>联系人手机号</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop="contactMobile"> |
|
|
|
<el-input v-model="addForm.contactMobile" maxlength="11" placeholder="" class="addinputw" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>联系人办公电话</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="addForm.contactTelePhone" maxlength="14" placeholder="例:010-88888888" |
|
|
|
class="addinputw" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>微信号</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop="weChatID"> |
|
|
|
<el-input v-model="addForm.weChatID" maxlength="100" placeholder="" class="addinputw" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>邮编</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop=""> |
|
|
|
<el-input v-model="addForm.zipCode" maxlength="20" placeholder="" class="addinputw" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>邮箱</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="addForm.email" maxlength="20" placeholder="" class="addinputw" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> --> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -190,6 +95,7 @@ |
|
|
|
<script> |
|
|
|
// import req from '@/api/shebeitaizhang/shebeitaizhang' |
|
|
|
// import { typeValues } from '@/api/cheliang/dictcommons' |
|
|
|
import { createDevice } from '@/api/device/device' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'shebeitaizhangAdd', |
|
|
@ -227,60 +133,23 @@ |
|
|
|
{ title: '门禁', id: '3' }, |
|
|
|
{ title: '机器人', id: '4' } |
|
|
|
], |
|
|
|
addForm: { |
|
|
|
manufacturerName: '', |
|
|
|
manufacturerAs: '', |
|
|
|
manufacturerCode: '', |
|
|
|
supplierType: '', |
|
|
|
supplierTypeValue: '', |
|
|
|
manufacturerAddress: '', |
|
|
|
manufacturerTelePhone: '', |
|
|
|
manufacturerFax: '', |
|
|
|
contactName: '', |
|
|
|
contactMobile: '', |
|
|
|
contactTelePhone: '', |
|
|
|
weChatID: '', |
|
|
|
zipCode: '', |
|
|
|
email: '', |
|
|
|
createOrg: '', |
|
|
|
useOrg: '' |
|
|
|
}, |
|
|
|
addForm: {}, |
|
|
|
baseManufacturerBankDto: [], |
|
|
|
rules: { |
|
|
|
manufacturerName: [{ |
|
|
|
name: [{ |
|
|
|
required: true, |
|
|
|
message: '请填写供应商名称', |
|
|
|
message: '请填写设备名称', |
|
|
|
trigger: 'blur' |
|
|
|
}], |
|
|
|
supplierTypeValue: [{ |
|
|
|
required: true, |
|
|
|
message: '请选择分类', |
|
|
|
trigger: 'change' |
|
|
|
}], |
|
|
|
manufacturerAddress: [{ |
|
|
|
vCode: [{ |
|
|
|
required: true, |
|
|
|
message: '请填写供应商通讯地址', |
|
|
|
message: '请填写验证码', |
|
|
|
trigger: 'blur' |
|
|
|
}], |
|
|
|
manufacturerFax: [{ |
|
|
|
type: [{ |
|
|
|
required: true, |
|
|
|
validator: checkChuanzhen, |
|
|
|
trigger: 'blur' |
|
|
|
}], |
|
|
|
contactName: [{ |
|
|
|
required: true, |
|
|
|
message: '请填写联系人名字', |
|
|
|
trigger: 'blur' |
|
|
|
}], |
|
|
|
contactMobile: [{ |
|
|
|
required: true, |
|
|
|
validator: checkSubmit, |
|
|
|
trigger: 'blur' |
|
|
|
}], |
|
|
|
manufacturerCode: [{ |
|
|
|
required: true, |
|
|
|
message: '编码不能为空', |
|
|
|
trigger: 'blur' |
|
|
|
message: '请选择设备类型', |
|
|
|
trigger: 'change' |
|
|
|
}] |
|
|
|
}, |
|
|
|
submitdisabled: false |
|
|
@ -306,20 +175,24 @@ |
|
|
|
}) |
|
|
|
this.addForm.supplierType = bb.key |
|
|
|
}, |
|
|
|
showAdd(typeSubmit) { |
|
|
|
this.dialogStatus = typeSubmit |
|
|
|
}, |
|
|
|
handleSave() { |
|
|
|
this.$refs['form_obj'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
console.log(this.dialogStatus) |
|
|
|
this.submitdisabled = true |
|
|
|
const formobj = { |
|
|
|
baseManufacturerBankDto: this.baseManufacturerBankDto, |
|
|
|
addForm: this.addForm |
|
|
|
} |
|
|
|
if (this.dialogStatus === 'add') { |
|
|
|
req.save(formobj).then(resp => { |
|
|
|
createDevice(this.addForm).then(resp => { |
|
|
|
this.submitdisabled = false |
|
|
|
if (resp.success) { |
|
|
|
console.log(resp) |
|
|
|
if (resp.code == 200) { |
|
|
|
if (resp.data == true) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: resp.msg }) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: resp.data }) |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
|