|
|
@@ -11,58 +11,28 @@
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="周期" prop="purchasingCycle">
|
|
|
- <el-input
|
|
|
- v-model="form.purchasingCycle"
|
|
|
- placeholder="请输入"
|
|
|
- @input="handleInput1"
|
|
|
- style="width: calc(100% - 100px)"
|
|
|
- />
|
|
|
- <DictSelection
|
|
|
- dictName="周期单位"
|
|
|
- clearable
|
|
|
- v-model="form.purchasingCycleUnit"
|
|
|
- style="width: 100px"
|
|
|
- >
|
|
|
+ <el-input v-model="form.purchasingCycle" placeholder="请输入" @input="handleInput1"
|
|
|
+ style="width: calc(100% - 100px)" />
|
|
|
+ <DictSelection dictName="周期单位" clearable v-model="form.purchasingCycleUnit" style="width: 100px">
|
|
|
</DictSelection>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="倍数" prop="purchaseMultiplier">
|
|
|
- <el-input
|
|
|
- v-model="form.purchaseMultiplier"
|
|
|
- placeholder="请输入"
|
|
|
- @input="handleInput2"
|
|
|
- style="width: 100%"
|
|
|
- />
|
|
|
+ <el-input v-model="form.purchaseMultiplier" placeholder="请输入" @input="handleInput2" style="width: 100%" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="最低订购量" prop="minimumOrderQuantity">
|
|
|
- <el-input
|
|
|
- v-model="form.minimumOrderQuantity"
|
|
|
- placeholder="请输入"
|
|
|
- @input="handleInput3"
|
|
|
- style="width: calc(100% - 100px)"
|
|
|
- />
|
|
|
- <DictSelection
|
|
|
- dictName="计量单位"
|
|
|
- clearable
|
|
|
- v-model="form.measuringUnit"
|
|
|
- style="width: 100px"
|
|
|
- >
|
|
|
+ <el-input v-model="form.minimumOrderQuantity" placeholder="请输入" @input="handleInput3"
|
|
|
+ style="width: calc(100% - 100px)" />
|
|
|
+ <DictSelection dictName="计量单位" clearable v-model="form.measuringUnit" style="width: 100px">
|
|
|
</DictSelection>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="产地" prop="purchaseOrigins">
|
|
|
- <DictSelection
|
|
|
- dictName="产地"
|
|
|
- clearable
|
|
|
- style="width: 100%"
|
|
|
- :disabled="status == 'Detail'"
|
|
|
- v-model="form.purchaseOrigins"
|
|
|
- multiple
|
|
|
- >
|
|
|
+ <DictSelection dictName="产地" clearable style="width: 100%" v-model="form.purchaseOrigins" multiple>
|
|
|
</DictSelection>
|
|
|
|
|
|
<!-- <el-select
|
|
|
@@ -82,19 +52,12 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="采购组织" prop="checkDepart">
|
|
|
- <deptSelect
|
|
|
- v-model="form.checkDepart"
|
|
|
- @changeGroup="searchDeptNodeClick"
|
|
|
- />
|
|
|
+ <deptSelect v-model="form.checkDepart" @changeGroup="searchDeptNodeClick" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="采购员" prop="checkPerson">
|
|
|
- <personSelect
|
|
|
- ref="directorRef"
|
|
|
- v-model="form.checkPerson"
|
|
|
- :init="false"
|
|
|
- />
|
|
|
+ <personSelect ref="directorRef" v-model="form.checkPerson" :init="false" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -103,101 +66,109 @@
|
|
|
</template>
|
|
|
|
|
|
<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: {
|
|
|
- type: Object,
|
|
|
- default: {}
|
|
|
+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: {
|
|
|
+ type: Object,
|
|
|
+ default: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: { deptSelect, personSelect },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dictList: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ form(data) {
|
|
|
+ if (data.checkDepart) {
|
|
|
+ const params = { executeGroupId: data.checkDepart };
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.directorRef.getList(params);
|
|
|
+ });
|
|
|
}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ 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]]
|
|
|
+ };
|
|
|
+ });
|
|
|
},
|
|
|
- components: { deptSelect, personSelect },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- dictList: []
|
|
|
- };
|
|
|
+ // 选择所属部门
|
|
|
+ searchDeptNodeClick(id, info) {
|
|
|
+ // 根据部门获取人员
|
|
|
+ const params = { executeGroupId: id };
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.directorRef.getList(params);
|
|
|
+ });
|
|
|
},
|
|
|
- watch: {
|
|
|
- form(data) {
|
|
|
- if (data.checkDepart) {
|
|
|
- const params = { executeGroupId: data.checkDepart };
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.directorRef.getList(params);
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
+ handleInput1(val) {
|
|
|
+ this.form.purchasingCycle = this.$handleInputPublicHasPoint(val);
|
|
|
},
|
|
|
- activated() {
|
|
|
- this.getDictList('purchase_origin');
|
|
|
+ handleInput2(val) {
|
|
|
+ this.form.purchaseMultiplier = this.$handleInputPublicHasPoint(val);
|
|
|
},
|
|
|
- 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) {
|
|
|
- // 根据部门获取人员
|
|
|
- const params = { executeGroupId: id };
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.directorRef.getList(params);
|
|
|
- });
|
|
|
- },
|
|
|
- handleInput1(val) {
|
|
|
- this.form.purchasingCycle = this.$handleInputPublicHasPoint(val);
|
|
|
- },
|
|
|
- handleInput2(val) {
|
|
|
- this.form.purchaseMultiplier = this.$handleInputPublicHasPoint(val);
|
|
|
- },
|
|
|
- handleInput3(val) {
|
|
|
- this.form.minimumOrderQuantity = this.$handleInputPublicHasPoint(val);
|
|
|
- }
|
|
|
+ handleInput3(val) {
|
|
|
+ this.form.minimumOrderQuantity = this.$handleInputPublicHasPoint(val);
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .other {
|
|
|
- background: #fff;
|
|
|
- padding: 1px 17px;
|
|
|
- }
|
|
|
- .divider {
|
|
|
- margin: 0px 0 20px;
|
|
|
- .title {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- margin-bottom: 10px;
|
|
|
- div {
|
|
|
- width: 8px;
|
|
|
- height: 20px;
|
|
|
- margin-right: 10px;
|
|
|
- }
|
|
|
- span {
|
|
|
- font-size: 20px;
|
|
|
- }
|
|
|
- }
|
|
|
- .ele-width {
|
|
|
- width: 100%;
|
|
|
- height: 2px;
|
|
|
- }
|
|
|
- }
|
|
|
- .form-line {
|
|
|
+.other {
|
|
|
+ background: #fff;
|
|
|
+ padding: 1px 17px;
|
|
|
+}
|
|
|
+
|
|
|
+.divider {
|
|
|
+ margin: 0px 0 20px;
|
|
|
+
|
|
|
+ .title {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- .line-select {
|
|
|
- margin-left: 15px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+
|
|
|
+ div {
|
|
|
+ width: 8px;
|
|
|
+ height: 20px;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ span {
|
|
|
+ font-size: 20px;
|
|
|
}
|
|
|
}
|
|
|
- ::v-deep .el-input-number .el-input__inner {
|
|
|
- text-align: left !important;
|
|
|
+
|
|
|
+ .ele-width {
|
|
|
+ width: 100%;
|
|
|
+ height: 2px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.form-line {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ .line-select {
|
|
|
+ margin-left: 15px;
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .el-input-number .el-input__inner {
|
|
|
+ text-align: left !important;
|
|
|
+}
|
|
|
</style>
|