|
|
@ -4,12 +4,15 @@ |
|
|
|
<div>{{ viewTitle }}</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" @click="handleCreate()">保存</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="listconadd"> |
|
|
|
<el-form ref="dataForm" :model="temp" label-position="right" label-width="190px" class="formadd" :rules="rules"> |
|
|
|
<div class="title">品牌信息</div> |
|
|
|
<div class="title"> |
|
|
|
<span>品牌信息</span> |
|
|
|
<span v-show="dialogStatus === 'add'" style="padding-left: 15px;color: red">注:需要通知财务人员在财务系统中同步增加相应编码的物料分组</span> |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item prop="brandCode"> |
|
|
@ -62,8 +65,7 @@ |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item prop="useOrg"> |
|
|
|
<span slot="label">使用组织:</span> |
|
|
|
<el-select v-model="useOrgValue" multiple placeholder="请选择" filterable clearable class="addinputw" |
|
|
|
@change="getuseOrg"> |
|
|
|
<el-select v-model="useOrgValue" multiple placeholder="请选择" filterable clearable class="addinputw" @change="getuseOrg"> |
|
|
|
<el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name" :value="item.sid"/> |
|
|
|
</el-select> |
|
|
|
<!-- <el-cascader v-model="useOrgArry" class="addinputw" @change="usrOrgArryChange" :options="options"--> |
|
|
@ -77,17 +79,6 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import {mapGetters} from 'vuex' |
|
|
|
// import { |
|
|
|
// getServiceTypeList, |
|
|
|
// getServiceTypePageList, |
|
|
|
// addServiceType, |
|
|
|
// getServiceType, |
|
|
|
// editServiceType, |
|
|
|
// delServiceType, |
|
|
|
// } from "@/api/yanglao/serviceType"; |
|
|
|
// import { getFileType, parseDate, parseTime, ConvertMenuState } from "@/utils"; |
|
|
|
// import { selectListOrg } from '@/api/jichuxinxi/basemanufacturer' |
|
|
|
import { |
|
|
|
details, |
|
|
|
dictType, |
|
|
@ -100,15 +91,14 @@ import { |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'PinpaiAdd', |
|
|
|
// components: { }, |
|
|
|
data() { |
|
|
|
var validCascader = (rule, value, callback) => { |
|
|
|
if (this.useOrgArry.length == 0) { |
|
|
|
callback(new Error('请填写使用组织')) |
|
|
|
} else { |
|
|
|
callback(); |
|
|
|
callback() |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
return { |
|
|
|
// --按钮菜单------- |
|
|
|
menuState: { |
|
|
@ -128,12 +118,7 @@ export default { |
|
|
|
listLoading: false, |
|
|
|
temp: {}, // 添加和修改 |
|
|
|
useOrgArry: [], |
|
|
|
useOrg_list: [], //分公司 |
|
|
|
templook: {}, // 查看实体 |
|
|
|
textMap: { |
|
|
|
update: '修改', |
|
|
|
create: '创建' |
|
|
|
}, |
|
|
|
useOrg_list: [], // 分公司 |
|
|
|
stateId: 0, |
|
|
|
dialogFormVisible: false, // 添加修改对话框状态 |
|
|
|
dialogFormShowVisible: false, // 查看对话框默认关闭状态 |
|
|
@ -168,8 +153,8 @@ export default { |
|
|
|
useOrgArry: [{ |
|
|
|
required: true, |
|
|
|
validator: validCascader, |
|
|
|
trigger: "change" |
|
|
|
}], |
|
|
|
trigger: 'change' |
|
|
|
}] |
|
|
|
}, |
|
|
|
// brandType: null, |
|
|
|
brandType: 'brandType', |
|
|
@ -199,22 +184,6 @@ export default { |
|
|
|
// ------------------------------------ |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapGetters([ |
|
|
|
'id', |
|
|
|
'roles', |
|
|
|
'rolesIds', |
|
|
|
'departmentId', |
|
|
|
'departmentCode' |
|
|
|
]) |
|
|
|
}, |
|
|
|
created() { |
|
|
|
// 初始化变量 |
|
|
|
|
|
|
|
// this.init() |
|
|
|
// 加载列表 |
|
|
|
// this.getList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
init() { |
|
|
|
this.stateId = this.$route.params.id |
|
|
@ -224,9 +193,9 @@ export default { |
|
|
|
this.temp = response.data |
|
|
|
// this.useOrgArry = response.data.useOrg |
|
|
|
if (this.temp.useOrg.search(',') == '-1') { |
|
|
|
this.useOrgValue = this.temp.useOrg.split(" ") |
|
|
|
this.useOrgValue = this.temp.useOrg.split(' ') |
|
|
|
} else { |
|
|
|
this.useOrgValue = this.temp.useOrg.split(",") |
|
|
|
this.useOrgValue = this.temp.useOrg.split(',') |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
@ -243,7 +212,7 @@ export default { |
|
|
|
this.selectDict() |
|
|
|
}, |
|
|
|
showEdit(sid) { |
|
|
|
console.log('edit',this.viewTitle) |
|
|
|
console.log('edit', this.viewTitle) |
|
|
|
this.dialogStatus = 'edit' |
|
|
|
this.viewTitle = '【编辑】品牌管理信息' |
|
|
|
this.stateId = 1 |
|
|
@ -253,9 +222,9 @@ export default { |
|
|
|
this.temp.sid = sid |
|
|
|
// this.useOrgArry = response.data.useOrg |
|
|
|
if (this.temp.useOrg.search(',') == '-1') { |
|
|
|
this.useOrgValue = this.temp.useOrg.split(" ") |
|
|
|
this.useOrgValue = this.temp.useOrg.split(' ') |
|
|
|
} else { |
|
|
|
this.useOrgValue = this.temp.useOrg.split(",") |
|
|
|
this.useOrgValue = this.temp.useOrg.split(',') |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
@ -499,7 +468,7 @@ export default { |
|
|
|
getleixing(value) { |
|
|
|
let bb = null |
|
|
|
this.brand.forEach((e) => { |
|
|
|
if (e.dictKey == value) { |
|
|
|
if (e.dictKey === value) { |
|
|
|
bb = { |
|
|
|
type: 'brandType', |
|
|
|
name: e.dictValue, |
|
|
@ -509,7 +478,7 @@ export default { |
|
|
|
}) |
|
|
|
this.temp.brandTypeValue = bb.name |
|
|
|
console.log(this.temp.brandTypeValue, '结算币种value') |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|