Browse Source

完善品牌管理

master
yunuo970428 3 years ago
parent
commit
f486dfb0b9
  1. 67
      anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiAdd.vue

67
anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiAdd.vue

@ -4,12 +4,15 @@
<div>{{ viewTitle }}</div> <div>{{ viewTitle }}</div>
<div> <div>
<el-button type="primary" size="small" @click="handleCreate()">保存</el-button> <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> </div>
<div class="listconadd"> <div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="right" label-width="190px" class="formadd" :rules="rules"> <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-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item prop="brandCode"> <el-form-item prop="brandCode">
@ -62,8 +65,7 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item prop="useOrg"> <el-form-item prop="useOrg">
<span slot="label">使用组织</span> <span slot="label">使用组织</span>
<el-select v-model="useOrgValue" multiple placeholder="请选择" filterable clearable class="addinputw" <el-select v-model="useOrgValue" multiple placeholder="请选择" filterable clearable class="addinputw" @change="getuseOrg">
@change="getuseOrg">
<el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name" :value="item.sid"/> <el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name" :value="item.sid"/>
</el-select> </el-select>
<!-- <el-cascader v-model="useOrgArry" class="addinputw" @change="usrOrgArryChange" :options="options"--> <!-- <el-cascader v-model="useOrgArry" class="addinputw" @change="usrOrgArryChange" :options="options"-->
@ -77,17 +79,6 @@
</template> </template>
<script> <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 { import {
details, details,
dictType, dictType,
@ -100,15 +91,14 @@ import {
export default { export default {
name: 'PinpaiAdd', name: 'PinpaiAdd',
// components: { },
data() { data() {
var validCascader = (rule, value, callback) => { var validCascader = (rule, value, callback) => {
if (this.useOrgArry.length == 0) { if (this.useOrgArry.length == 0) {
callback(new Error('请填写使用组织')) callback(new Error('请填写使用组织'))
} else { } else {
callback(); callback()
} }
}; }
return { return {
// --------- // ---------
menuState: { menuState: {
@ -128,12 +118,7 @@ export default {
listLoading: false, listLoading: false,
temp: {}, // temp: {}, //
useOrgArry: [], useOrgArry: [],
useOrg_list: [], // useOrg_list: [], //
templook: {}, //
textMap: {
update: '修改',
create: '创建'
},
stateId: 0, stateId: 0,
dialogFormVisible: false, // dialogFormVisible: false, //
dialogFormShowVisible: false, // dialogFormShowVisible: false, //
@ -168,8 +153,8 @@ export default {
useOrgArry: [{ useOrgArry: [{
required: true, required: true,
validator: validCascader, validator: validCascader,
trigger: "change" trigger: 'change'
}], }]
}, },
// brandType: null, // brandType: null,
brandType: 'brandType', brandType: 'brandType',
@ -199,22 +184,6 @@ export default {
// ------------------------------------ // ------------------------------------
} }
}, },
computed: {
...mapGetters([
'id',
'roles',
'rolesIds',
'departmentId',
'departmentCode'
])
},
created() {
//
// this.init()
//
// this.getList()
},
methods: { methods: {
init() { init() {
this.stateId = this.$route.params.id this.stateId = this.$route.params.id
@ -224,9 +193,9 @@ export default {
this.temp = response.data this.temp = response.data
// this.useOrgArry = response.data.useOrg // this.useOrgArry = response.data.useOrg
if (this.temp.useOrg.search(',') == '-1') { if (this.temp.useOrg.search(',') == '-1') {
this.useOrgValue = this.temp.useOrg.split(" ") this.useOrgValue = this.temp.useOrg.split(' ')
} else { } else {
this.useOrgValue = this.temp.useOrg.split(",") this.useOrgValue = this.temp.useOrg.split(',')
} }
} }
}) })
@ -243,7 +212,7 @@ export default {
this.selectDict() this.selectDict()
}, },
showEdit(sid) { showEdit(sid) {
console.log('edit',this.viewTitle) console.log('edit', this.viewTitle)
this.dialogStatus = 'edit' this.dialogStatus = 'edit'
this.viewTitle = '【编辑】品牌管理信息' this.viewTitle = '【编辑】品牌管理信息'
this.stateId = 1 this.stateId = 1
@ -253,9 +222,9 @@ export default {
this.temp.sid = sid this.temp.sid = sid
// this.useOrgArry = response.data.useOrg // this.useOrgArry = response.data.useOrg
if (this.temp.useOrg.search(',') == '-1') { if (this.temp.useOrg.search(',') == '-1') {
this.useOrgValue = this.temp.useOrg.split(" ") this.useOrgValue = this.temp.useOrg.split(' ')
} else { } else {
this.useOrgValue = this.temp.useOrg.split(",") this.useOrgValue = this.temp.useOrg.split(',')
} }
} }
}) })
@ -499,7 +468,7 @@ export default {
getleixing(value) { getleixing(value) {
let bb = null let bb = null
this.brand.forEach((e) => { this.brand.forEach((e) => {
if (e.dictKey == value) { if (e.dictKey === value) {
bb = { bb = {
type: 'brandType', type: 'brandType',
name: e.dictValue, name: e.dictValue,
@ -509,7 +478,7 @@ export default {
}) })
this.temp.brandTypeValue = bb.name this.temp.brandTypeValue = bb.name
console.log(this.temp.brandTypeValue, '结算币种value') console.log(this.temp.brandTypeValue, '结算币种value')
}, }
} }
} }
</script> </script>

Loading…
Cancel
Save