| | |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">客户名称:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="componentData.entity.name" |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="componentData.entity.company" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">账号状态:</div> |
| | | <div class="search_input"> |
| | | <el-select size="small" v-model="componentData.entity.state" style="width: 100%;" @change="refreshTable()"> |
| | | <el-option label="全部" :value="null"></el-option> |
| | | <el-option label="启用" :value="1"></el-option> |
| | | <el-option label="停用" :value="0"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">重 置</el-button> |
| | |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.user.selectCustomPageList" :delUrl="$api.user.delCustomById" |
| | | :componentData="componentData" :key="upIndex" /> |
| | | :componentData="componentData" :key="upIndex" :upUrl="$api.user.upCustom"/> |
| | | </div> |
| | | <el-dialog title="新增客户" :visible.sync="addDia" width="450px"> |
| | | <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">* </span>客户名称:</el-col> |
| | | <el-col :span="15"> |
| | | <el-input v-model="user.name" readonly size="small"> |
| | | <template slot="append"><el-button slot="append" icon="el-icon-search" |
| | | @click="selectUserDia = true"></el-button></template> |
| | | </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="15"> |
| | | <el-input v-model="user.account" readonly size="small"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;">电子邮箱:</el-col> |
| | | <el-col :span="15"> |
| | | <el-input v-model="user.email" size="small" clearable></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="15"> |
| | | <el-input v-model="user.phone" size="small" clearable></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> |
| | | </span>客户名称:</el-col> |
| | | <el-col :span="15"> |
| | | <el-input v-model="user.company" size="small" clearable></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>单位EN:</el-col> |
| | | </span>客户单位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="line-height: 50px;"> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;"><span class="required-span">* |
| | | </span>工厂域:</el-col> |
| | | <el-col :span="15"> |
| | | <el-input v-model="user.code" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px;"> |
| | |
| | | </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> |
| | | </span>客户地址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="15"> |
| | | <el-input v-model="user.num" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;">单位电话:</el-col> |
| | | <el-col :span="15"> |
| | | <el-input v-model="user.phone" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="7" style="text-align: right;padding-right: 8px;">工厂域:</el-col> |
| | | <el-col :span="15"> |
| | | <el-input v-model="user.code" size="small" clearable></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="15"> |
| | | <el-input v-model="user.code2" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDia = false">取 消</el-button> |
| | |
| | | return { |
| | | componentData: { |
| | | entity: { |
| | | name: null, |
| | | state: null, |
| | | company: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | |
| | | font: '协议记录', |
| | | type: 'text', |
| | | method: 'protocol' |
| | | }, { |
| | | },{ |
| | | id: 'update', |
| | | font: '编辑', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | field:[] |
| | | },{ |
| | | id: 'delete', |
| | | font: '删除', |
| | | type: 'text', |
| | |
| | | } |
| | | }, |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | | requiredUp: ['company','address','code2','companyEn','addressEn','num'] |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | |
| | | this.upIndex++ |
| | | }, |
| | | customAdd() { |
| | | if (this.user.name == '' || this.user.name == null) { |
| | | this.$message.error('请填写客户名称') |
| | | return |
| | | } |
| | | if (this.user.account == '' || this.user.account == null) { |
| | | this.$message.error('请填写客户账户') |
| | | return |
| | | } |
| | | if (this.user.phone == '' || this.user.phone == null) { |
| | | this.$message.error('请填写电话号码') |
| | | return |
| | | } |
| | | if (this.user.company == '' || this.user.company == null) { |
| | | this.$message.error('请填写客户单位') |
| | | return |
| | | } |
| | | if (this.user.code == '' || this.user.code == null) { |
| | | this.$message.error('请填写工厂域') |
| | | return |
| | | } |
| | | if (this.user.address == '' || this.user.address == 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: { |
| | |
| | | if (power[i].menuMethod == 'addCustom') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'upCustom') { |
| | | up = true |
| | | } |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(2, 1) |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | this.addPower = add |
| | | }, |
| | | entrust(data) { |