|
@@ -10,29 +10,52 @@
|
|
|
import FilterOption from '@/common/components/filter/index.vue';
|
|
import FilterOption from '@/common/components/filter/index.vue';
|
|
|
import { defineComponent } from 'vue';
|
|
import { defineComponent } from 'vue';
|
|
|
import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
|
|
import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
|
|
|
|
|
+import { useRoute } from 'vue-router';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
- name: 'filter-plan-table',
|
|
|
|
|
- components: { FilterOption },
|
|
|
|
|
- setup(props, context) {
|
|
|
|
|
- const select: SelectList[] = [
|
|
|
|
|
- {
|
|
|
|
|
- value: undefined,
|
|
|
|
|
- key: 'contracttype',
|
|
|
|
|
- placeholder: '全部计划类型',
|
|
|
|
|
- list: [
|
|
|
|
|
- { value: 1, lable: '采购' },
|
|
|
|
|
- { value: -1, lable: '销售' },
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
- ];
|
|
|
|
|
- const input: InputList[] = [
|
|
|
|
|
- { value: '', placeholder: '模糊搜索计划', key: 'hedgeplanno' },
|
|
|
|
|
- { value: '', placeholder: '模糊搜索现货品种', key: 'deliverygoodsname' },
|
|
|
|
|
- ];
|
|
|
|
|
- return {
|
|
|
|
|
- ...handleFilter(select, input, context),
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ name: 'filter-plan-table',
|
|
|
|
|
+ components: {
|
|
|
|
|
+ FilterOption
|
|
|
|
|
+ },
|
|
|
|
|
+ setup(props, context) {
|
|
|
|
|
+ const { name: routeName } = useRoute();
|
|
|
|
|
+
|
|
|
|
|
+ const select: SelectList[] = [
|
|
|
|
|
+ {
|
|
|
|
|
+ value: undefined,
|
|
|
|
|
+ key: 'contracttype',
|
|
|
|
|
+ placeholder: '全部计划类型',
|
|
|
|
|
+ list: [
|
|
|
|
|
+ { value: 1, lable: '采购' },
|
|
|
|
|
+ { value: -1, lable: '销售' },
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ const input: InputList[] = [
|
|
|
|
|
+ { value: '', placeholder: '模糊搜索计划', key: 'hedgeplanno' },
|
|
|
|
|
+ { value: '', placeholder: '模糊搜索现货品种', key: 'deliverygoodsname' },
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ if (routeName === 'plan_performance') {
|
|
|
|
|
+ select.push({
|
|
|
|
|
+ value: undefined,
|
|
|
|
|
+ key: 'hedgeplanstatus',
|
|
|
|
|
+ placeholder: '全部状态',
|
|
|
|
|
+ list: [
|
|
|
|
|
+ { value: 1, lable: '待审核' },
|
|
|
|
|
+ { value: 2, lable: '执行中' },
|
|
|
|
|
+ { value: 3, lable: '正常完结' },
|
|
|
|
|
+ { value: 4, lable: '审核拒绝' },
|
|
|
|
|
+ { value: 5, lable: '异常完结' },
|
|
|
|
|
+ { value: 6, lable: '已撤回' },
|
|
|
|
|
+ ],
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...handleFilter(select, input, context),
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|