| | |
| | | <div class="custom_manage"> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;">客户管理</el-col> |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;">客户管理</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="medium" type="primary" @click="addDia = true" v-if="addPower">新增</el-button> |
| | | </el-col> |
| | |
| | | <ValueTable ref="ValueTable" :url="$api.user.selectCustomPageList" :delUrl="$api.user.delCustomById" |
| | | :componentData="componentData" :key="upIndex" :upUrl="$api.user.upCustom"/> |
| | | </div> |
| | | <el-dialog title="新增客户" :visible.sync="addDia" width="450px"> |
| | | <el-dialog title="新增客户" :visible.sync="addDia" width="450px" @close="resetUser"> |
| | | <div style="margin-bottom: 15px;"> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;"><span class="required-span">* |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;"><span class="required-span">* |
| | | </span>客户单位EN:</el-col> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;">客户单位EN:</el-col> |
| | | <el-col :span="15"> |
| | | <el-input v-model="user.companyEn" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px;"> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;"><span class="required-span">* |
| | | </span>单位地址:</el-col> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;">单位地址:</el-col> |
| | | <el-col :span="15"> |
| | | <el-input type="textarea" v-model="user.address" size="small" clearable |
| | | :autosize="{minRows: 2, maxRows: 4}"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px;"> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;"><span class="required-span">* |
| | | </span>客户地址EN:</el-col> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;">客户地址EN:</el-col> |
| | | <el-col :span="15"> |
| | | <el-input type="textarea" v-model="user.addressEn" size="small" clearable |
| | | :autosize="{minRows: 2, maxRows: 4}"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;"><span class="required-span">* |
| | | </span>加急额度:</el-col> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;">加急额度:</el-col> |
| | | <el-col :span="15"> |
| | | <el-input v-model="user.num" size="small" clearable></el-input> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;"><span class="required-span">* |
| | | </span>客户编号:</el-col> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;">客户编号:</el-col> |
| | | <el-col :span="15"> |
| | | <el-input v-model="user.code2" size="small" clearable></el-input> |
| | | </el-col> |
| | |
| | | } |
| | | }, |
| | | selectField: {}, |
| | | needSort: ['company'], |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | customAdd() { |
| | | if (this.user.company == '' || this.user.company == null) { |
| | | this.$message.error('请填写客户单位') |
| | | this.$message.error('请填写客户名称') |
| | | return |
| | | } |
| | | if (this.user.address == '' || this.user.address == null) { |
| | | this.$message.error('请填写单位地址') |
| | | return |
| | | } |
| | | if (this.user.companyEn == '' || this.user.companyEn == null) { |
| | | this.$message.error('请填写英文客户单位') |
| | | return |
| | | } |
| | | if (this.user.addressEn == '' || this.user.addressEn == null) { |
| | | this.$message.error('请填写英文单位地址') |
| | | return |
| | | } |
| | | if (this.user.code2 == '' || this.user.code2 == null) { |
| | | this.$message.error('请填写客户编号') |
| | | return |
| | | } |
| | | if (this.user.code2 == '' || this.user.code2 == null) { |
| | | this.$message.error('请填写加急额度') |
| | | return |
| | | } |
| | | // if (this.user.address == '' || this.user.address == null) { |
| | | // this.$message.error('请填写单位地址') |
| | | // return |
| | | // } |
| | | // if (this.user.companyEn == '' || this.user.companyEn == null) { |
| | | // this.$message.error('请填写英文客户单位') |
| | | // return |
| | | // } |
| | | // if (this.user.addressEn == '' || this.user.addressEn == null) { |
| | | // this.$message.error('请填写英文单位地址') |
| | | // return |
| | | // } |
| | | // if (this.user.code2 == '' || this.user.code2 == null) { |
| | | // this.$message.error('请填写客户编号') |
| | | // return |
| | | // } |
| | | // if (this.user.code2 == '' || this.user.code2 == null) { |
| | | // this.$message.error('请填写加急额度') |
| | | // return |
| | | // } |
| | | this.loading = true |
| | | this.$axios.post(this.$api.user.addCustom, this.user, { |
| | | headers: { |
| | |
| | | this.addDia = false |
| | | }) |
| | | }, |
| | | resetUser () { |
| | | this.user = {} |
| | | }, |
| | | // 权限分配 |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |