927c9281 by lihua

合同进度bug

1 parent e6881f2e
...@@ -183,8 +183,8 @@ onMounted(() => { ...@@ -183,8 +183,8 @@ onMounted(() => {
183 end-placeholder="结束时间" /> 183 end-placeholder="结束时间" />
184 </template> 184 </template>
185 <template v-else-if="item.type == 'date-range'"> 185 <template v-else-if="item.type == 'date-range'">
186 <el-date-picker v-model="formInline[item.field]" type="daterange" start-placeholder="开始日期" format="YYYY-MM-DD" value-format="YYYY-MM-DD" 186 <el-date-picker v-model="formInline[item.field]" type="daterange" :start-placeholder="item.startPlaceholder ?? '开始日期'" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
187 end-placeholder="结束日期" /> 187 :end-placeholder="item.endPlaceholder ?? '结束日期'" />
188 </template> 188 </template>
189 <template v-else-if="item.type == 'radio-button'"> 189 <template v-else-if="item.type == 'radio-button'">
190 <el-radio-group v-model="formInline[item.field]" @change="radioGroupChange"> 190 <el-radio-group v-model="formInline[item.field]" @change="radioGroupChange">
......
...@@ -68,7 +68,8 @@ const searchItemList = ref([ ...@@ -68,7 +68,8 @@ const searchItemList = ref([
68 type: "date-range", 68 type: "date-range",
69 field: "dateRange", 69 field: "dateRange",
70 default: null, 70 default: null,
71 placeholder: "开始日期~结束日期", 71 startPlaceholder: '签约开始日期',
72 endPlaceholder: '签约结束日期',
72 clearable: true, 73 clearable: true,
73 required: true 74 required: true
74 } 75 }
...@@ -104,7 +105,7 @@ const tableTools = ref(); ...@@ -104,7 +105,7 @@ const tableTools = ref();
104 const handleSearchChange = (val, row, info) => { 105 const handleSearchChange = (val, row, info) => {
105 if (row.field == 'contractTypeCode') { 106 if (row.field == 'contractTypeCode') {
106 tableTools.value.toolSearch.formInline.contractNodeCode = ''; 107 tableTools.value.toolSearch.formInline.contractNodeCode = '';
107 searchItemList.value[2].options = val == '1' ? registerContractNodesList.value : tradeContractNodesList.value; 108 searchItemList.value[2].options = val == '1' ? registerContractNodesList.value : (!val ? [] : tradeContractNodesList.value);
108 } 109 }
109 } 110 }
110 111
...@@ -139,10 +140,10 @@ const tableInfo = ref({ ...@@ -139,10 +140,10 @@ const tableInfo = ref({
139 loading: false, 140 loading: false,
140 fields: [ 141 fields: [
141 { label: "合同名称", field: "contractName", width: 160, align: "left" }, 142 { label: "合同名称", field: "contractName", width: 160, align: "left" },
142 { label: "合同类型", field: "contractTypeName", width: 120 }, 143 { label: "合同类型", field: "contractTypeName", width: 110 },
143 { label: "甲方名称", field: "partyAName", width: 180 }, 144 { label: "甲方名称", field: "partyAName", width: 180 },
144 { label: "乙方名称", field: "partyBName", width: 180 }, 145 { label: "乙方名称", field: "partyBName", width: 180 },
145 { label: "签约日期", field: "signContractDate", width: TableColumnWidth.DATE }, 146 { label: "签约日期", field: "signContractDate", width: 110 },
146 ], 147 ],
147 childFields: [ 148 childFields: [
148 { label: "进展节点", field: "contractNodeName", width: 140, align: "left" }, 149 { label: "进展节点", field: "contractNodeName", width: 140, align: "left" },
...@@ -163,12 +164,12 @@ const getNodeSteps = (scope) => { ...@@ -163,12 +164,12 @@ const getNodeSteps = (scope) => {
163 return { 164 return {
164 list: contractNodeCodes.map((n, index) => { 165 list: contractNodeCodes.map((n, index) => {
165 return { 166 return {
166 tooltip: { 167 // tooltip: {
167 placement: 'top', 168 // placement: 'top',
168 content: n.name, 169 // content: n.name,
169 className: 'step_title_tooltip', 170 // className: 'step_title_tooltip',
170 effect: 'light', 171 // effect: 'light',
171 }, 172 // },
172 title: n.name, 173 title: n.name,
173 value: index + 1 174 value: index + 1
174 } 175 }
...@@ -399,7 +400,7 @@ const drawerSelectChange = (val, row, info) => { ...@@ -399,7 +400,7 @@ const drawerSelectChange = (val, row, info) => {
399 if (item.field == 'contractNodeCodes') { 400 if (item.field == 'contractNodeCodes') {
400 item.default = ''; 401 item.default = '';
401 nodesInfo.value = []; 402 nodesInfo.value = [];
402 item.options = val == '1' ? registerContractNodesList.value : tradeContractNodesList.value; 403 item.options = val == '1' ? registerContractNodesList.value : (!val ? [] : tradeContractNodesList.value);
403 } 404 }
404 }); 405 });
405 } else if (row.field == 'contractNodeCodes') { 406 } else if (row.field == 'contractNodeCodes') {
...@@ -447,7 +448,7 @@ const handleTableEdit = (scope) => { ...@@ -447,7 +448,7 @@ const handleTableEdit = (scope) => {
447 item.default = scope.row[item.field]; 448 item.default = scope.row[item.field];
448 if (item.field == 'contractNodeCodes') { 449 if (item.field == 'contractNodeCodes') {
449 item.default = scope.row.contractNodeCodes?.map(c => c.code) || []; 450 item.default = scope.row.contractNodeCodes?.map(c => c.code) || [];
450 item.options = scope.row.contractTypeCode == '1' ? registerContractNodesList.value : tradeContractNodesList.value; 451 item.options = scope.row.contractTypeCode == '1' ? registerContractNodesList.value : (!scope.row.contractTypeCode ? [] : tradeContractNodesList.value);
451 } 452 }
452 }) 453 })
453 nodesInfo.value = scope.row.contractNodes?.map(node => { 454 nodesInfo.value = scope.row.contractNodes?.map(node => {
...@@ -689,7 +690,7 @@ onBeforeMount(() => { ...@@ -689,7 +690,7 @@ onBeforeMount(() => {
689 <span>{{ scope.row[field.field || ''] || '--' }}</span> 690 <span>{{ scope.row[field.field || ''] || '--' }}</span>
690 </template> 691 </template>
691 </el-table-column> 692 </el-table-column>
692 <el-table-column label="进展阶段" width="370px" align="center"> 693 <el-table-column label="进展阶段" width="450px" align="center">
693 <template #default="scope"> 694 <template #default="scope">
694 <div class="custom-steps" v-if="scope.row.contractNodeCodes?.length"> 695 <div class="custom-steps" v-if="scope.row.contractNodeCodes?.length">
695 <StepBar :steps-info="getNodeSteps(scope)" /> 696 <StepBar :steps-info="getNodeSteps(scope)" />
...@@ -697,7 +698,7 @@ onBeforeMount(() => { ...@@ -697,7 +698,7 @@ onBeforeMount(() => {
697 <span v-else>--</span> 698 <span v-else>--</span>
698 </template> 699 </template>
699 </el-table-column> 700 </el-table-column>
700 <el-table-column label="操作" minWidth="120px" align="left" fixed="right" show-overflow-tooltip> 701 <el-table-column label="操作" width="100px" align="left" fixed="right" show-overflow-tooltip>
701 <template #default="scope"> 702 <template #default="scope">
702 <span class="text_btn" @click="handleTableEdit(scope)">编辑</span> 703 <span class="text_btn" @click="handleTableEdit(scope)">编辑</span>
703 <span class="text_btn ml4" @click="handleTableDel(scope)">删除</span> 704 <span class="text_btn ml4" @click="handleTableDel(scope)">删除</span>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!