Commit 74a6b1cd authored by daywrite's avatar daywrite

供应商模块

parent 5e8ddbf7
...@@ -31,4 +31,28 @@ ...@@ -31,4 +31,28 @@
background-color:#649FD7; background-color:#649FD7;
border-color:#5092d2; border-color:#5092d2;
} }
.single {
& .el-radio-button__inner, .el-radio-button:last-child .el-radio-button__inner, .el-radio-button:first-child .el-radio-button__inner{
border-left: 1px solid #DCDFE6;
margin: 0 10px 5px 0;
border-radius: 3px;
}
& .el-radio-button__inner:hover{
color: #333;
background-color: #e6e6e6;
border-color: #adadad;
}
& .el-radio-button__orig-radio:checked+.el-radio-button__inner{
color: #fff;
background-color: #3c3c3c;
border-color: #373737;
box-shadow: 0 0 0 0 #373737;
}
& .el-radio-button__orig-radio:checked+.el-radio-button__inner:hover{
color: #333;
background-color: #d4d4d4;
border-color: #8c8c8c;
}
}
} }
...@@ -123,8 +123,19 @@ export default { ...@@ -123,8 +123,19 @@ export default {
accountSexArray () { accountSexArray () {
let ret = this.getArrayByKey('Users', 'sex') let ret = this.getArrayByKey('Users', 'sex')
return ret && [].concat(ret.value) return ret && [].concat(ret.value)
} },
// company_nature // company_nature
companyNatureArray () {
let ret = this.getArrayByKey('Suppliers', 'company_nature')
return ret && [].concat(ret.value)
},
// supplierTags
supplierTagsArray () {
let ret = this.getArrayByKey('Suppliers', 'supplierTags')
return ret && [].concat(ret.value)
}
}, },
methods: { methods: {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</el-form-item> </el-form-item>
<el-form-item label="公司性质:" prop="company_nature" size="mini" class="ec-clear-left ec-form-item-lg is-required"> <el-form-item label="公司性质:" prop="company_nature" size="mini" class="ec-clear-left ec-form-item-lg is-required">
<el-select v-model="model.company_nature" size="small" placeholder="请选择"> <el-select v-model="model.company_nature" size="small" placeholder="请选择">
<el-option v-for="(option, optKey) in caseSpentTimeArray" <el-option v-for="(option, optKey) in companyNatureArray"
:key="optKey" :key="optKey"
:label="option.name" :label="option.name"
:value="option.key"></el-option> :value="option.key"></el-option>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<el-form-item label="供应商类型:" prop="supplierTags" class="ec-clear-left is-required"> <el-form-item label="供应商类型:" prop="supplierTags" class="ec-clear-left is-required">
<single-radio <single-radio
:form-item="model.supplierTags" :form-item="model.supplierTags"
:options-list="caseTypeArray" :options-list="supplierTagsArray"
@update:item="val => {model.supplierTags = val}"> @update:item="val => {model.supplierTags = val}">
</single-radio> </single-radio>
</el-form-item> </el-form-item>
...@@ -36,9 +36,11 @@ ...@@ -36,9 +36,11 @@
<el-input <el-input
class="ec-input-normal" class="ec-input-normal"
size="mini" size="mini"
placeholder="http://"
v-model.trim="model.website"> v-model.trim="model.website">
<template slot="prepend">Http://</template> <!-- <template slot="prepend">Http://</template> -->
</el-input> </el-input>
<span>注意:网址必须以"http://"或"https://"起头。</span>
</el-form-item> </el-form-item>
<el-form-item label="成立时间:" prop="established_at" class="ec-clear-left"> <el-form-item label="成立时间:" prop="established_at" class="ec-clear-left">
<el-date-picker <el-date-picker
...@@ -51,14 +53,15 @@ ...@@ -51,14 +53,15 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="注册资金:" prop="capital" class="ec-clear-left"> <el-form-item label="注册资金:" prop="capital" class="ec-clear-left">
<el-select v-model="model.capital_currency" placeholder="请选择" size="mini" style="width:100px;">
<el-option label="人民币" value="rmb"></el-option>
<el-option label="美元" value="usd"></el-option>
</el-select>
<el-input <el-input
class="ec-input-normal" class="ec-input-normal"
style="width: 417px;margin-bottom:3px;"
size="mini" size="mini"
v-model.trim="model.capital"> v-model.trim="model.capital">
<el-select v-model="model.capital_currency" slot="prepend" placeholder="请选择">
<el-option label="餐厅名" value="1"></el-option>
<el-option label="订单号" value="2"></el-option>
</el-select>
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
......
...@@ -57,6 +57,8 @@ export default { ...@@ -57,6 +57,8 @@ export default {
this.$refs.form.getEdit(model.id) this.$refs.form.getEdit(model.id)
.then((_model) => { .then((_model) => {
UTIL.flatten(this.model, _model) UTIL.flatten(this.model, _model)
this.model.supplierTags = _model.supplierTags.id
this.model.address1 = _model.workingAddress.name
}) })
} else { } else {
this.$refs.form.getNew() this.$refs.form.getNew()
...@@ -83,7 +85,7 @@ export default { ...@@ -83,7 +85,7 @@ export default {
.then((res) => { .then((res) => {
this.$refs.sidePopup.close() this.$refs.sidePopup.close()
this.$message.success('操作成功') this.$message.success('操作成功')
this.$parent.reload() this.$parent._reload()
}) // save }) // save
}) // validate }) // validate
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment