|
|
@@ -56,6 +56,23 @@
|
|
|
</DictSelection>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="产地" prop="purchaseOrigins">
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="form.purchaseOrigins"
|
|
|
+ filterable
|
|
|
+ multiple
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dictList"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="采购组织" prop="checkDepart">
|
|
|
<deptSelect
|
|
|
@@ -81,6 +98,7 @@
|
|
|
<script>
|
|
|
import deptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
|
import personSelect from '@/components/CommomSelect/person-select.vue';
|
|
|
+ import {getByCode} from "@/api/system/dictionary-data";
|
|
|
export default {
|
|
|
props: {
|
|
|
form: {
|
|
|
@@ -90,7 +108,9 @@
|
|
|
},
|
|
|
components: { deptSelect, personSelect },
|
|
|
data() {
|
|
|
- return {};
|
|
|
+ return {
|
|
|
+ dictList:[]
|
|
|
+ };
|
|
|
},
|
|
|
watch: {
|
|
|
form(data) {
|
|
|
@@ -103,7 +123,20 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ activated(){
|
|
|
+ this.getDictList('purchase_origin');
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ async getDictList(code) {
|
|
|
+ let { data: res } = await getByCode(code);
|
|
|
+ this.dictList = res.map((item) => {
|
|
|
+ let values = Object.keys(item);
|
|
|
+ return {
|
|
|
+ value: Number(values[0]),
|
|
|
+ label: item[values[0]]
|
|
|
+ };
|
|
|
+ });
|
|
|
+ },
|
|
|
// 选择所属部门
|
|
|
searchDeptNodeClick(id, info) {
|
|
|
// 根据部门获取人员
|