Showing
7 changed files
with
628 additions
and
466 deletions
| ... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
| 17 | </el-row> | 17 | </el-row> |
| 18 | <el-table | 18 | <el-table |
| 19 | :max-height="attrs.maxHeight" | 19 | :max-height="attrs.maxHeight" |
| 20 | - empty-text | 20 | + :empty-text="emptyText" |
| 21 | v-bind="attrs" | 21 | v-bind="attrs" |
| 22 | v-loading="loadingTable" | 22 | v-loading="loadingTable" |
| 23 | :data="tableData" | 23 | :data="tableData" |
| ... | @@ -82,6 +82,10 @@ export default { | ... | @@ -82,6 +82,10 @@ export default { |
| 82 | }, | 82 | }, |
| 83 | }, | 83 | }, |
| 84 | }, | 84 | }, |
| 85 | + emptyText: { | ||
| 86 | + type: String, | ||
| 87 | + default: "暂无数据", | ||
| 88 | + }, | ||
| 85 | loadingTable: { | 89 | loadingTable: { |
| 86 | type: Boolean, | 90 | type: Boolean, |
| 87 | default: false, | 91 | default: false, |
| ... | @@ -93,7 +97,6 @@ export default { | ... | @@ -93,7 +97,6 @@ export default { |
| 93 | tableData: { | 97 | tableData: { |
| 94 | type: Array, | 98 | type: Array, |
| 95 | default: () => [], | 99 | default: () => [], |
| 96 | - required: true, | ||
| 97 | }, | 100 | }, |
| 98 | pageConfig: { | 101 | pageConfig: { |
| 99 | type: Object, | 102 | type: Object, |
| ... | @@ -127,8 +130,6 @@ export default { | ... | @@ -127,8 +130,6 @@ export default { |
| 127 | } | 130 | } |
| 128 | }, | 131 | }, |
| 129 | mounted() { | 132 | mounted() { |
| 130 | - this.getTrCurrentHeight(); | ||
| 131 | - window.addEventListener("resize", this.getTrCurrentHeight); | ||
| 132 | //阻止火狐拖拽新建新页面 | 133 | //阻止火狐拖拽新建新页面 |
| 133 | document.body.addEventListener( | 134 | document.body.addEventListener( |
| 134 | "drop", | 135 | "drop", |
| ... | @@ -138,13 +139,19 @@ export default { | ... | @@ -138,13 +139,19 @@ export default { |
| 138 | }, | 139 | }, |
| 139 | false | 140 | false |
| 140 | ); | 141 | ); |
| 142 | + if (this.tableData.length) { | ||
| 143 | + this.getTrCurrentHeight(); | ||
| 144 | + window.addEventListener("resize", this.getTrCurrentHeight); | ||
| 141 | // 拖拽行更新排序 | 145 | // 拖拽行更新排序 |
| 142 | // this.rowDrop(); | 146 | // this.rowDrop(); |
| 143 | // 拖拽列更新排序 | 147 | // 拖拽列更新排序 |
| 144 | this.columnDrop(); | 148 | this.columnDrop(); |
| 149 | + } | ||
| 145 | }, | 150 | }, |
| 146 | destroyed() { | 151 | destroyed() { |
| 152 | + if (this.tableData.length) { | ||
| 147 | window.removeEventListener("resize", this.getTrCurrentHeight); | 153 | window.removeEventListener("resize", this.getTrCurrentHeight); |
| 154 | + } | ||
| 148 | }, | 155 | }, |
| 149 | 156 | ||
| 150 | methods: { | 157 | methods: { | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="form-header demo-edit"> | 2 | <div class="form-header demo-edit"> |
| 3 | + <el-row style="padding: 20px 0"> | ||
| 4 | + <el-col> | ||
| 5 | + <el-divider content-position="left">ET86配舱航班顺位</el-divider> | ||
| 6 | + </el-col> | ||
| 7 | + </el-row> | ||
| 3 | <el-row :gutter="24" justify="center"> | 8 | <el-row :gutter="24" justify="center"> |
| 4 | <el-col :span="18"> | 9 | <el-col :span="18"> |
| 5 | <yl-table | 10 | <yl-table |
| 11 | + :emptyText="tableEmptyText" | ||
| 6 | :attrs="tableAttr" | 12 | :attrs="tableAttr" |
| 7 | :loadingTable="tableAttr.loadingTable" | 13 | :loadingTable="tableAttr.loadingTable" |
| 8 | :tableData="tableData" | 14 | :tableData="tableData" |
| 9 | :pageConfig="pageConfig" | 15 | :pageConfig="pageConfig" |
| 10 | - @search="searchBtn" | ||
| 11 | @add="addBtn" | 16 | @add="addBtn" |
| 12 | - @delete="deleBtn" | ||
| 13 | > | 17 | > |
| 14 | <template #column> | 18 | <template #column> |
| 15 | <el-table-column | 19 | <el-table-column |
| 20 | + type="index" | ||
| 21 | + label="序号" | ||
| 22 | + width="50" | ||
| 23 | + align="center" | ||
| 24 | + ></el-table-column> | ||
| 25 | + <el-table-column | ||
| 16 | label="航班号" | 26 | label="航班号" |
| 17 | prop="fltNo" | 27 | prop="fltNo" |
| 18 | min-width="100" | 28 | min-width="100" |
| ... | @@ -30,7 +40,7 @@ | ... | @@ -30,7 +40,7 @@ |
| 30 | </template> | 40 | </template> |
| 31 | </el-table-column> | 41 | </el-table-column> |
| 32 | <el-table-column | 42 | <el-table-column |
| 33 | - label="航班日期" | 43 | + label="加减天数" |
| 34 | prop="fltNoDate" | 44 | prop="fltNoDate" |
| 35 | width="100" | 45 | width="100" |
| 36 | align="center" | 46 | align="center" |
| ... | @@ -50,27 +60,21 @@ | ... | @@ -50,27 +60,21 @@ |
| 50 | </template> | 60 | </template> |
| 51 | </el-table-column> | 61 | </el-table-column> |
| 52 | <el-table-column | 62 | <el-table-column |
| 53 | - label="航线优先级" | 63 | + label="航线" |
| 54 | prop="fltRoute" | 64 | prop="fltRoute" |
| 55 | min-width="100" | 65 | min-width="100" |
| 56 | align="center" | 66 | align="center" |
| 57 | > | 67 | > |
| 58 | <template slot-scope="scope"> | 68 | <template slot-scope="scope"> |
| 59 | - <el-popover | 69 | + <el-select v-model="scope.row.fltRoute" placeholder="请选择"> |
| 60 | - placement="top-start" | 70 | + <el-option |
| 61 | - :title="`${scope.row.fltNo} 航线`" | 71 | + v-for="item in scope.row.routeList" |
| 62 | - width="200" | 72 | + :key="item.id" |
| 63 | - trigger="hover" | 73 | + :label="item.route" |
| 64 | - :content="scope.row.fltRoute" | 74 | + :value="item.route" |
| 65 | - :disabled="scope.row.fltRoute | fltRoute" | ||
| 66 | > | 75 | > |
| 67 | - <el-input | 76 | + </el-option> |
| 68 | - slot="reference" | 77 | + </el-select> |
| 69 | - v-model="scope.row.fltRoute" | ||
| 70 | - :readonly="scope.row.edit | isEdit" | ||
| 71 | - placeholder="请选择航线优先级" | ||
| 72 | - /> | ||
| 73 | - </el-popover> | ||
| 74 | </template> | 78 | </template> |
| 75 | </el-table-column> | 79 | </el-table-column> |
| 76 | <el-table-column | 80 | <el-table-column |
| ... | @@ -83,6 +87,7 @@ | ... | @@ -83,6 +87,7 @@ |
| 83 | <el-checkbox | 87 | <el-checkbox |
| 84 | v-model="scope.row.isOn" | 88 | v-model="scope.row.isOn" |
| 85 | :disabled="scope.row.edit | isEdit" | 89 | :disabled="scope.row.edit | isEdit" |
| 90 | + @change="changeCheck(scope)" | ||
| 86 | ></el-checkbox> | 91 | ></el-checkbox> |
| 87 | </template> | 92 | </template> |
| 88 | </el-table-column> | 93 | </el-table-column> |
| ... | @@ -115,8 +120,21 @@ | ... | @@ -115,8 +120,21 @@ |
| 115 | class="config-form" | 120 | class="config-form" |
| 116 | > | 121 | > |
| 117 | <el-row class="rowPadding"> | 122 | <el-row class="rowPadding"> |
| 123 | + <el-col :span="12"> | ||
| 124 | + <el-form-item label="原航班号"> | ||
| 125 | + <el-input | ||
| 126 | + type="textarea" | ||
| 127 | + v-model="queryForm.fltNo" | ||
| 128 | + size="medium" | ||
| 129 | + maxlength="1000" | ||
| 130 | + show-word-limit | ||
| 131 | + :rows="4" | ||
| 132 | + placeholder="请输入原航班号" | ||
| 133 | + ></el-input> | ||
| 134 | + </el-form-item> | ||
| 135 | + </el-col> | ||
| 118 | <el-col :span="24"> | 136 | <el-col :span="24"> |
| 119 | - <el-form-item label="服务类型"> | 137 | + <el-form-item label="服务种类"> |
| 120 | <!-- <div class="label-title label-service-type">服务类型</div> --> | 138 | <!-- <div class="label-title label-service-type">服务类型</div> --> |
| 121 | <el-col :span="4"> | 139 | <el-col :span="4"> |
| 122 | <el-radio-group | 140 | <el-radio-group |
| ... | @@ -143,8 +161,66 @@ | ... | @@ -143,8 +161,66 @@ |
| 143 | </el-col> | 161 | </el-col> |
| 144 | 162 | ||
| 145 | <el-col :span="24"> | 163 | <el-col :span="24"> |
| 146 | - <el-col :span="9"> | 164 | + <el-col :span="12"> |
| 147 | - <el-form-item label="重量(KG)"> | 165 | + <el-form-item label="URSA包含"> |
| 166 | + <el-input | ||
| 167 | + type="textarea" | ||
| 168 | + v-model="queryForm.includeUrsa" | ||
| 169 | + size="medium" | ||
| 170 | + maxlength="1000" | ||
| 171 | + show-word-limit | ||
| 172 | + :rows="4" | ||
| 173 | + placeholder="URSA之间用分号分隔,例:F2;F3;P_" | ||
| 174 | + ></el-input> | ||
| 175 | + </el-form-item> | ||
| 176 | + </el-col> | ||
| 177 | + <el-col :span="12"> | ||
| 178 | + <el-form-item label="URSA不包含"> | ||
| 179 | + <el-input | ||
| 180 | + type="textarea" | ||
| 181 | + v-model="queryForm.notIncludeUrsa" | ||
| 182 | + size="medium" | ||
| 183 | + maxlength="1000" | ||
| 184 | + show-word-limit | ||
| 185 | + :rows="4" | ||
| 186 | + placeholder="URSA之间用分号分隔,例:F2;F3;P_" | ||
| 187 | + ></el-input> | ||
| 188 | + </el-form-item> | ||
| 189 | + </el-col> | ||
| 190 | + </el-col> | ||
| 191 | + | ||
| 192 | + <el-col :span="24"> | ||
| 193 | + <el-form-item label="申报类别"> | ||
| 194 | + <el-card shadow="never"> | ||
| 195 | + <el-checkbox-group | ||
| 196 | + v-model="queryForm.checkboxClsssType" | ||
| 197 | + @change="checkboxSingleName" | ||
| 198 | + style="display: flex" | ||
| 199 | + v-if="queryForm.cargoType.length" | ||
| 200 | + > | ||
| 201 | + <el-checkbox | ||
| 202 | + v-for="item in queryForm.cargoType" | ||
| 203 | + :label="item.chineseName" | ||
| 204 | + :name="item.chineseName" | ||
| 205 | + :key="item.code" | ||
| 206 | + > | ||
| 207 | + <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 208 | + </Tooltips> | ||
| 209 | + </el-checkbox> | ||
| 210 | + </el-checkbox-group> | ||
| 211 | + </el-card> | ||
| 212 | + </el-form-item> | ||
| 213 | + </el-col> | ||
| 214 | + | ||
| 215 | + <el-col :span="24"> | ||
| 216 | + <el-col :span="3"> | ||
| 217 | + <el-form-item label="单品名"> | ||
| 218 | + <el-checkbox v-model="queryForm.singleName"></el-checkbox> | ||
| 219 | + </el-form-item> | ||
| 220 | + </el-col> | ||
| 221 | + <el-col :span="8"> | ||
| 222 | + <el-form-item label="" class="custom-label"> | ||
| 223 | + <span class="custom-label-title">重量(KG)</span> | ||
| 148 | <el-col :span="10"> | 224 | <el-col :span="10"> |
| 149 | <el-input | 225 | <el-input |
| 150 | v-model.trim="queryForm.minWeight" | 226 | v-model.trim="queryForm.minWeight" |
| ... | @@ -167,8 +243,8 @@ | ... | @@ -167,8 +243,8 @@ |
| 167 | </el-form-item> | 243 | </el-form-item> |
| 168 | </el-col> | 244 | </el-col> |
| 169 | 245 | ||
| 170 | - <el-col :span="9"> | 246 | + <el-col :span="8"> |
| 171 | - <el-form-item label="件数"> | 247 | + <el-form-item label="件数" class="custom-label-pieces"> |
| 172 | <el-col :span="10"> | 248 | <el-col :span="10"> |
| 173 | <el-input | 249 | <el-input |
| 174 | v-model.trim="queryForm.minNumOfPieces" | 250 | v-model.trim="queryForm.minNumOfPieces" |
| ... | @@ -191,115 +267,71 @@ | ... | @@ -191,115 +267,71 @@ |
| 191 | </el-form-item> | 267 | </el-form-item> |
| 192 | </el-col> | 268 | </el-col> |
| 193 | </el-col> | 269 | </el-col> |
| 194 | - <el-col :span="24"> | ||
| 195 | - <el-form-item label="单品名"> | ||
| 196 | - <el-checkbox v-model="queryForm.singleName"></el-checkbox> | ||
| 197 | - </el-form-item> | ||
| 198 | - </el-col> | ||
| 199 | 270 | ||
| 200 | <el-col :span="24"> | 271 | <el-col :span="24"> |
| 201 | - <el-col :span="12"> | 272 | + <el-col :span="3"> |
| 202 | - <el-form-item label="包含URSA"> | 273 | + <el-form-item label="申报价值"></el-form-item> |
| 203 | - <el-input | ||
| 204 | - type="textarea" | ||
| 205 | - v-model="queryForm.includeUrsa" | ||
| 206 | - size="medium" | ||
| 207 | - maxlength="1000" | ||
| 208 | - show-word-limit | ||
| 209 | - :rows="4" | ||
| 210 | - placeholder="URSA之间用分号分隔,例:F2;F3;P_" | ||
| 211 | - ></el-input> | ||
| 212 | - </el-form-item> | ||
| 213 | </el-col> | 274 | </el-col> |
| 214 | - <el-col :span="12"> | 275 | + <el-col :span="8"> |
| 215 | - <el-form-item label="包含URSA"> | 276 | + <el-form-item label="" class="custom-label"> |
| 277 | + <span class="custom-label-title">人民币</span> | ||
| 278 | + <el-col :span="10"> | ||
| 216 | <el-input | 279 | <el-input |
| 217 | - type="textarea" | 280 | + v-model.trim="queryForm.minCNYCustomVal" |
| 218 | - v-model="queryForm.notIncludeUrsa" | 281 | + clearable |
| 219 | - size="medium" | 282 | + placeholder="最小申报价值" |
| 220 | - maxlength="1000" | 283 | + @blur="inputBlur('minCNYCustomVal')" |
| 221 | - show-word-limit | ||
| 222 | - :rows="4" | ||
| 223 | - placeholder="URSA之间用分号分隔,例:F2;F3;P_" | ||
| 224 | ></el-input> | 284 | ></el-input> |
| 225 | - </el-form-item> | 285 | + <span |
| 286 | + ref="minCNYCustomVal" | ||
| 287 | + class="el-form-item__error" | ||
| 288 | + ></span> | ||
| 226 | </el-col> | 289 | </el-col> |
| 227 | - </el-col> | 290 | + <el-col style="text-align: center" :span="1">-</el-col> |
| 228 | - | 291 | + <el-col :span="10"> |
| 229 | - <el-col :span="24"> | ||
| 230 | - <el-form-item label="原航班号"> | ||
| 231 | <el-input | 292 | <el-input |
| 232 | - type="textarea" | 293 | + v-model.trim="queryForm.maxCNYCustomVal" |
| 233 | - v-model="queryForm.fltNo" | 294 | + clearable |
| 234 | - size="medium" | 295 | + placeholder="最大申报价值" |
| 235 | - maxlength="1000" | 296 | + @blur="inputBlur('maxCNYCustomVal')" |
| 236 | - show-word-limit | ||
| 237 | - :rows="4" | ||
| 238 | - placeholder="请输入原航班号" | ||
| 239 | ></el-input> | 297 | ></el-input> |
| 240 | - </el-form-item> | 298 | + <span |
| 299 | + ref="maxCNYCustomVal" | ||
| 300 | + class="el-form-item__error" | ||
| 301 | + ></span> | ||
| 241 | </el-col> | 302 | </el-col> |
| 242 | - | ||
| 243 | - <el-col :span="24"> | ||
| 244 | - <el-form-item label="类别Class"> | ||
| 245 | - <el-card shadow="never"> | ||
| 246 | - <el-checkbox-group | ||
| 247 | - v-model="queryForm.checkboxClsssType" | ||
| 248 | - @change="checkboxSingleName" | ||
| 249 | - style="display: flex" | ||
| 250 | - v-if="queryForm.cargoType.length" | ||
| 251 | - > | ||
| 252 | - <el-checkbox | ||
| 253 | - v-for="item in queryForm.cargoType" | ||
| 254 | - :label="item.chineseName" | ||
| 255 | - :name="item.chineseName" | ||
| 256 | - :key="item.code" | ||
| 257 | - > | ||
| 258 | - <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 259 | - </Tooltips> | ||
| 260 | - </el-checkbox> | ||
| 261 | - </el-checkbox-group> | ||
| 262 | - </el-card> | ||
| 263 | </el-form-item> | 303 | </el-form-item> |
| 264 | </el-col> | 304 | </el-col> |
| 265 | - <el-col :span="24"> | 305 | + <el-col :span="8"> |
| 266 | - <el-form-item label="申报价值"> | 306 | + <el-form-item label="美元" class="custom-label-pieces"> |
| 267 | - <el-col :span="4"> | 307 | + <el-col :span="10"> |
| 268 | - <el-select | ||
| 269 | - v-model="queryForm.customVal" | ||
| 270 | - @change="selectChange" | ||
| 271 | - placeholder="请选择" | ||
| 272 | - > | ||
| 273 | - <el-option | ||
| 274 | - v-for="item in queryForm.customValOptions" | ||
| 275 | - :key="item.value" | ||
| 276 | - :label="item.label" | ||
| 277 | - :value="item.value" | ||
| 278 | - > | ||
| 279 | - </el-option> | ||
| 280 | - </el-select> | ||
| 281 | - </el-col> | ||
| 282 | - <el-col :span="4" :offset="1"> | ||
| 283 | <el-input | 308 | <el-input |
| 284 | - v-model.trim="queryForm.minCustomVal" | 309 | + v-model.trim="queryForm.minSUDCustomVal" |
| 285 | clearable | 310 | clearable |
| 286 | placeholder="最小申报价值" | 311 | placeholder="最小申报价值" |
| 287 | - @blur="inputBlur('minCustomVal')" | 312 | + @blur="inputBlur('minSUDCustomVal')" |
| 288 | ></el-input> | 313 | ></el-input> |
| 289 | - <span ref="minCustomVal" class="el-form-item__error"></span> | 314 | + <span |
| 315 | + ref="minSUDCustomVal" | ||
| 316 | + class="el-form-item__error" | ||
| 317 | + ></span> | ||
| 290 | </el-col> | 318 | </el-col> |
| 291 | <el-col style="text-align: center" :span="1">-</el-col> | 319 | <el-col style="text-align: center" :span="1">-</el-col> |
| 292 | - <el-col :span="4"> | 320 | + <el-col :span="10"> |
| 293 | <el-input | 321 | <el-input |
| 294 | - v-model.trim="queryForm.maxCustomVal" | 322 | + v-model.trim="queryForm.maxSUDCustomVal" |
| 295 | clearable | 323 | clearable |
| 296 | placeholder="最大申报价值" | 324 | placeholder="最大申报价值" |
| 297 | - @blur="inputBlur('maxCustomVal')" | 325 | + @blur="inputBlur('maxSUDCustomVal')" |
| 298 | ></el-input> | 326 | ></el-input> |
| 299 | - <span ref="maxCustomVal" class="el-form-item__error"></span> | 327 | + <span |
| 328 | + ref="maxSUDCustomVal" | ||
| 329 | + class="el-form-item__error" | ||
| 330 | + ></span> | ||
| 300 | </el-col> | 331 | </el-col> |
| 301 | </el-form-item> | 332 | </el-form-item> |
| 302 | </el-col> | 333 | </el-col> |
| 334 | + </el-col> | ||
| 303 | <el-col :span="24"> | 335 | <el-col :span="24"> |
| 304 | <el-form-item label=""> | 336 | <el-form-item label=""> |
| 305 | <el-button type="primary" @click="submitForm('ruleForm')" | 337 | <el-button type="primary" @click="submitForm('ruleForm')" |
| ... | @@ -315,72 +347,57 @@ | ... | @@ -315,72 +347,57 @@ |
| 315 | 347 | ||
| 316 | <script> | 348 | <script> |
| 317 | import YlForm from "@/components/YlForm"; | 349 | import YlForm from "@/components/YlForm"; |
| 318 | -// import YlInput from "@/components/YlInput"; | ||
| 319 | import YlTable from "@/components/YlTable"; | 350 | import YlTable from "@/components/YlTable"; |
| 320 | import { formConfig } from "./formConfig"; | 351 | import { formConfig } from "./formConfig"; |
| 321 | import { debounce } from "@/utils"; | 352 | import { debounce } from "@/utils"; |
| 322 | -import { tableAttr, columnHeader, tableData } from "./tableConfig"; | 353 | +import { tableAttr } from "./tableConfig"; |
| 323 | import { | 354 | import { |
| 324 | allDictData, // 获取全部字典 | 355 | allDictData, // 获取全部字典 |
| 325 | queryRouteByFltNo, // 航线查询 | 356 | queryRouteByFltNo, // 航线查询 |
| 326 | findDestinationFltRuleByFlightNo, // 获取航班下航线维度 | 357 | findDestinationFltRuleByFlightNo, // 获取航班下航线维度 |
| 327 | } from "@/api/destinationFlight"; | 358 | } from "@/api/destinationFlight"; |
| 328 | -import { validateRules } from "./mixins"; | 359 | +import indexMixins from "./mixins"; |
| 329 | export default { | 360 | export default { |
| 330 | name: "edit", | 361 | name: "edit", |
| 331 | components: { | 362 | components: { |
| 332 | YlForm, | 363 | YlForm, |
| 333 | YlTable, | 364 | YlTable, |
| 334 | - // YlInput, | ||
| 335 | }, | 365 | }, |
| 336 | - mixins: [validateRules], | 366 | + mixins: [indexMixins], |
| 337 | data() { | 367 | data() { |
| 338 | return { | 368 | return { |
| 339 | test: "测试", | 369 | test: "测试", |
| 340 | formConfig: formConfig, // 表单配置项 | 370 | formConfig: formConfig, // 表单配置项 |
| 341 | queryForm: { | 371 | queryForm: { |
| 342 | // 表单参数 | 372 | // 表单参数 |
| 373 | + fltNo: "", // 原航班号 | ||
| 374 | + isServiceCode: "1", // 服务种类 | ||
| 375 | + serviceCode: "", | ||
| 376 | + singleName: false, // 单品名 | ||
| 343 | minWeight: null, | 377 | minWeight: null, |
| 344 | maxWeight: null, | 378 | maxWeight: null, |
| 345 | minNumOfPieces: null, | 379 | minNumOfPieces: null, |
| 346 | maxNumOfPieces: null, | 380 | maxNumOfPieces: null, |
| 347 | - isServiceCode: "1", | 381 | + includeUrsa: "", // URSA包含 |
| 348 | - serviceCode: "", | 382 | + notIncludeUrsa: "", // URSA不包含 |
| 349 | - serviceCodeData: [], | 383 | + checkboxClsssType: [], // 申报类别 |
| 350 | - singleName: false, | 384 | + minCNYCustomVal: "", // |
| 351 | - includeUrsa: "", | 385 | + maxCNYCustomVal: "", // |
| 352 | - notIncludeUrsa: "", | 386 | + minSUDCustomVal: "", // |
| 353 | - fltNo: "", | 387 | + maxSUDCustomVal: "", // |
| 354 | - checkboxClsssType: [], | 388 | + serviceCodeData: [], // 【服务种类】调用接口获取服务种类所有的serviceCode |
| 355 | - cargoType: [], | 389 | + cargoType: [], // 申报类别 |
| 356 | - cargoStatus: [], | ||
| 357 | - puporpux: [], | ||
| 358 | - handlingCode: [], | ||
| 359 | - subCategory: [], | ||
| 360 | - customVal: "人民币", | ||
| 361 | - minCustomVal: "", | ||
| 362 | - maxCustomVal: "", | ||
| 363 | - customValOptions: [ | ||
| 364 | - { | ||
| 365 | - value: "USD", | ||
| 366 | - label: "美元", | ||
| 367 | - }, | ||
| 368 | - { | ||
| 369 | - value: "CNY", | ||
| 370 | - label: "人民币", | ||
| 371 | - }, | ||
| 372 | - ], | ||
| 373 | }, | 390 | }, |
| 374 | pageConfig: { | 391 | pageConfig: { |
| 375 | // 分页配置项 | 392 | // 分页配置项 |
| 376 | isPagination: false, | 393 | isPagination: false, |
| 377 | }, | 394 | }, |
| 378 | tableAttr: tableAttr, // table配置项 | 395 | tableAttr: tableAttr, // table配置项 |
| 396 | + tableEmptyText: "请添加配舱航班", | ||
| 379 | tableData: [], | 397 | tableData: [], |
| 380 | currentIndex: 0, // 记录当前table 列的索引位置 | 398 | currentIndex: 0, // 记录当前table 列的索引位置 |
| 381 | }; | 399 | }; |
| 382 | }, | 400 | }, |
| 383 | - | ||
| 384 | computed: {}, | 401 | computed: {}, |
| 385 | created() { | 402 | created() { |
| 386 | this.getAllDictData(); | 403 | this.getAllDictData(); |
| ... | @@ -410,126 +427,9 @@ export default { | ... | @@ -410,126 +427,9 @@ export default { |
| 410 | } | 427 | } |
| 411 | }, | 428 | }, |
| 412 | }, | 429 | }, |
| 413 | - directives: { | ||
| 414 | - focus: { | ||
| 415 | - // 绑定判断 | ||
| 416 | - inserted: function (el, binding, vnode) { | ||
| 417 | - console.log(el.children[0].value); | ||
| 418 | - console.log(binding); | ||
| 419 | - console.log(vnode); | ||
| 420 | - }, | ||
| 421 | - }, | ||
| 422 | - }, | ||
| 423 | methods: { | 430 | methods: { |
| 424 | - // input失焦事件 | ||
| 425 | - inputBlur(name) { | ||
| 426 | - if (name == "minWeight") { | ||
| 427 | - this.validateMaxWeight("maxWeight"); | ||
| 428 | - this.validateMinWeight(name); | ||
| 429 | - } | ||
| 430 | - if (name == "maxWeight") { | ||
| 431 | - this.validateMinWeight("minWeight"); | ||
| 432 | - this.validateMaxWeight(name); | ||
| 433 | - } | ||
| 434 | - if (name == "minNumOfPieces") { | ||
| 435 | - this.validateMaxPieces("maxNumOfPieces"); | ||
| 436 | - this.validateMinPieces(name); | ||
| 437 | - } | ||
| 438 | - if (name == "maxNumOfPieces") { | ||
| 439 | - this.validateMinPieces("minNumOfPieces"); | ||
| 440 | - this.validateMaxPieces(name); | ||
| 441 | - } | ||
| 442 | - if (name == "minCustomVal") { | ||
| 443 | - this.validateMaxCustomVal("maxCustomVal"); | ||
| 444 | - this.validateMinCustomVal(name); | ||
| 445 | - } | ||
| 446 | - if (name == "maxCustomVal") { | ||
| 447 | - this.validateMinCustomVal("minCustomVal"); | ||
| 448 | - this.validateMaxCustomVal(name); | ||
| 449 | - } | ||
| 450 | - }, | ||
| 451 | // 获取编辑详情数据 | 431 | // 获取编辑详情数据 |
| 452 | - getEdit() { | 432 | + getEdit() {}, |
| 453 | - tableData.map((item) => { | ||
| 454 | - if (item.isOn == "0") { | ||
| 455 | - item.isOn = false; | ||
| 456 | - } else { | ||
| 457 | - item.isOn = true; | ||
| 458 | - } | ||
| 459 | - }); | ||
| 460 | - this.tableData = tableData; | ||
| 461 | - }, | ||
| 462 | - // 获取字典 | ||
| 463 | - getObj({ serviceCode }) { | ||
| 464 | - let service_Code = []; | ||
| 465 | - serviceCode.map((item) => { | ||
| 466 | - service_Code.push(item.chineseName); | ||
| 467 | - }); | ||
| 468 | - this.serviceCodeData = service_Code; | ||
| 469 | - }, | ||
| 470 | - // 处理serviceCode包不包含 | ||
| 471 | - serviceCodeCofig() { | ||
| 472 | - let str = this.queryForm.serviceCode.replace(/;|;/g, ","); | ||
| 473 | - let arr = str.split(","); | ||
| 474 | - if (arr[arr.length - 1] == "") { | ||
| 475 | - arr.splice(arr.length - 1, 1); | ||
| 476 | - } | ||
| 477 | - let noHasCode = this.serviceCodeData.filter( | ||
| 478 | - (v) => !arr.some((val) => val == v) | ||
| 479 | - ); | ||
| 480 | - let hasCode = this.serviceCodeData.filter((v) => | ||
| 481 | - arr.some((val) => val == v) | ||
| 482 | - ); | ||
| 483 | - let includeCode = arr.filter((v) => !hasCode.some((val) => val == v)); | ||
| 484 | - return { | ||
| 485 | - include: hasCode, | ||
| 486 | - noInclude: includeCode, | ||
| 487 | - }; | ||
| 488 | - }, | ||
| 489 | - // radio包含不包含serviceCode | ||
| 490 | - isServiceCode(val) { | ||
| 491 | - // 包含 | ||
| 492 | - // 勾选的时候去校验 || 输入的时候去校验 | ||
| 493 | - if (val == 1) { | ||
| 494 | - if (this.serviceCodeCofig().noInclude.length) { | ||
| 495 | - let tip = this.serviceCodeCofig().noInclude.toString(); | ||
| 496 | - this.msgError(`${tip} 不包含`); | ||
| 497 | - } | ||
| 498 | - } else { | ||
| 499 | - if (this.serviceCodeCofig().include.length) { | ||
| 500 | - let tip = this.serviceCodeCofig().include.toString(); | ||
| 501 | - this.msgError(`${tip} 已包含`); | ||
| 502 | - } | ||
| 503 | - } | ||
| 504 | - }, | ||
| 505 | - // serviceCode失焦事件 | ||
| 506 | - serviceCodeBlur() { | ||
| 507 | - if (this.queryForm.isServiceCode == "1") { | ||
| 508 | - if (this.serviceCodeCofig().noInclude.length) { | ||
| 509 | - let tip = this.serviceCodeCofig().noInclude.toString(); | ||
| 510 | - this.msgError(`${tip} 不包含`); | ||
| 511 | - } | ||
| 512 | - } else { | ||
| 513 | - if (this.serviceCodeCofig().include.length) { | ||
| 514 | - let tip = this.serviceCodeCofig().include.toString(); | ||
| 515 | - this.msgError(`${tip} 已包含`); | ||
| 516 | - } | ||
| 517 | - } | ||
| 518 | - }, | ||
| 519 | - // 表单提交 | ||
| 520 | - submitForm(formName) { | ||
| 521 | - this.$refs[formName].validate((valid) => { | ||
| 522 | - if (valid) { | ||
| 523 | - alert("submit!"); | ||
| 524 | - } else { | ||
| 525 | - console.log("error submit!!"); | ||
| 526 | - return false; | ||
| 527 | - } | ||
| 528 | - }); | ||
| 529 | - }, | ||
| 530 | - resetForm(formName) { | ||
| 531 | - this.$refs[formName].resetFields(); | ||
| 532 | - }, | ||
| 533 | // 获取所有数据字典 | 433 | // 获取所有数据字典 |
| 534 | getAllDictData() { | 434 | getAllDictData() { |
| 535 | allDictData().then((res) => { | 435 | allDictData().then((res) => { |
| ... | @@ -537,8 +437,7 @@ export default { | ... | @@ -537,8 +437,7 @@ export default { |
| 537 | this.msgError(res.msg); | 437 | this.msgError(res.msg); |
| 538 | return; | 438 | return; |
| 539 | } | 439 | } |
| 540 | - this.queryForm.cargoType = res.data.cargoType; // | 440 | + this.queryForm.cargoType = res.data.cargoType; // 申报类别 |
| 541 | - this.queryForm.cargoStatus = res.data.cargoStatus; // | ||
| 542 | if (res.data.serviceCode.length) { | 441 | if (res.data.serviceCode.length) { |
| 543 | this.getObj(res.data); | 442 | this.getObj(res.data); |
| 544 | } | 443 | } |
| ... | @@ -546,27 +445,22 @@ export default { | ... | @@ -546,27 +445,22 @@ export default { |
| 546 | }, | 445 | }, |
| 547 | // 航线查询 | 446 | // 航线查询 |
| 548 | getQueryRouteByFltNo(item) { | 447 | getQueryRouteByFltNo(item) { |
| 448 | + this.tableAttr.loadingTable = true; | ||
| 549 | queryRouteByFltNo(item).then((res) => { | 449 | queryRouteByFltNo(item).then((res) => { |
| 450 | + this.tableAttr.loadingTable = false; | ||
| 550 | if (res.code == 200) { | 451 | if (res.code == 200) { |
| 551 | const list = res.data.list; | 452 | const list = res.data.list; |
| 552 | - let routeList = ""; | 453 | + let routeList = []; |
| 553 | if (list.length) { | 454 | if (list.length) { |
| 554 | list.map((item) => { | 455 | list.map((item) => { |
| 555 | - routeList += item.route + ","; | 456 | + routeList.push(item); |
| 556 | }); | 457 | }); |
| 557 | - this.tableData[this.currentIndex].fltRoute = routeList.substring( | 458 | + this.tableData[this.currentIndex].fltRoute = ""; |
| 558 | - 0, | 459 | + this.tableData[this.currentIndex].routeList = routeList; |
| 559 | - routeList.length - 1 | ||
| 560 | - ); | ||
| 561 | - this.queryForm.fltRoute = routeList.substring( | ||
| 562 | - 0, | ||
| 563 | - routeList.length - 1 | ||
| 564 | - ); | ||
| 565 | } else { | 460 | } else { |
| 566 | - this.queryForm = { | 461 | + this.msgError("暂无航线"); |
| 567 | - fltNo: item.fltNo, // 航班号 | 462 | + this.tableData[this.currentIndex].routeList = []; |
| 568 | - fltRoute: "", // 航线 | 463 | + this.tableData[this.currentIndex].fltRoute = ""; |
| 569 | - }; | ||
| 570 | } | 464 | } |
| 571 | } | 465 | } |
| 572 | }); | 466 | }); |
| ... | @@ -590,23 +484,11 @@ export default { | ... | @@ -590,23 +484,11 @@ export default { |
| 590 | if (params.fltNo) { | 484 | if (params.fltNo) { |
| 591 | this.getQueryRouteByFltNo(params); | 485 | this.getQueryRouteByFltNo(params); |
| 592 | } else { | 486 | } else { |
| 487 | + this.tableData[this.currentIndex].fltRoute = ""; | ||
| 488 | + this.tableData[this.currentIndex].routeList = []; | ||
| 593 | this.msgError("请输入航班号"); | 489 | this.msgError("请输入航班号"); |
| 594 | } | 490 | } |
| 595 | - console.log(this.tableData[this.currentIndex]); | ||
| 596 | }, 800), | 491 | }, 800), |
| 597 | - // 申报价值selectChange | ||
| 598 | - selectChange(val) { | ||
| 599 | - if (this.queryForm.minCustomVal && this.queryForm.maxCustomVal) { | ||
| 600 | - this.validateMaxCustomVal("maxCustomVal"); | ||
| 601 | - } | ||
| 602 | - }, | ||
| 603 | - // 搜索 | ||
| 604 | - searchBtn(row) { | ||
| 605 | - // this.$refs.ruleForm.handleSearch("ruleForm", (val) => { | ||
| 606 | - // console.log(val); | ||
| 607 | - // }); | ||
| 608 | - console.log(this.tableData); | ||
| 609 | - }, | ||
| 610 | // 添加 | 492 | // 添加 |
| 611 | addBtn(item) { | 493 | addBtn(item) { |
| 612 | console.log("add:", item); | 494 | console.log("add:", item); |
| ... | @@ -614,10 +496,19 @@ export default { | ... | @@ -614,10 +496,19 @@ export default { |
| 614 | fltNo: "", | 496 | fltNo: "", |
| 615 | fltNoDate: "", | 497 | fltNoDate: "", |
| 616 | fltRoute: "", | 498 | fltRoute: "", |
| 617 | - isOn: "0", | 499 | + routeList: [], |
| 500 | + isOn: "0" ? false : true, | ||
| 618 | sort: "0", // 排序字段 | 501 | sort: "0", // 排序字段 |
| 619 | }); | 502 | }); |
| 620 | }, | 503 | }, |
| 504 | + // 是否爆仓 | ||
| 505 | + changeCheck({ $index, row }) { | ||
| 506 | + this.tableData.map((item, i) => { | ||
| 507 | + if ($index !== i) { | ||
| 508 | + item.isOn = false; | ||
| 509 | + } | ||
| 510 | + }); | ||
| 511 | + }, | ||
| 621 | // 删除 | 512 | // 删除 |
| 622 | deleBtn(item, $index) { | 513 | deleBtn(item, $index) { |
| 623 | this.tableData.splice($index, 1); | 514 | this.tableData.splice($index, 1); |
| ... | @@ -626,6 +517,41 @@ export default { | ... | @@ -626,6 +517,41 @@ export default { |
| 626 | checkboxSingleName(val) { | 517 | checkboxSingleName(val) { |
| 627 | console.log(val); | 518 | console.log(val); |
| 628 | }, | 519 | }, |
| 520 | + // input失焦事件 | ||
| 521 | + inputBlur(name) { | ||
| 522 | + if (name == "minWeight") { | ||
| 523 | + this.validateMaxWeight("maxWeight"); | ||
| 524 | + this.validateMinWeight(name); | ||
| 525 | + } | ||
| 526 | + if (name == "maxWeight") { | ||
| 527 | + this.validateMinWeight("minWeight"); | ||
| 528 | + this.validateMaxWeight(name); | ||
| 529 | + } | ||
| 530 | + if (name == "minNumOfPieces") { | ||
| 531 | + this.validateMaxPieces("maxNumOfPieces"); | ||
| 532 | + this.validateMinPieces(name); | ||
| 533 | + } | ||
| 534 | + if (name == "maxNumOfPieces") { | ||
| 535 | + this.validateMinPieces("minNumOfPieces"); | ||
| 536 | + this.validateMaxPieces(name); | ||
| 537 | + } | ||
| 538 | + if (name == "minCNYCustomVal" || name == "minSUDCustomVal") { | ||
| 539 | + let coin = { | ||
| 540 | + minCNYCustomVal: "CNY", | ||
| 541 | + minSUDCustomVal: "USD", | ||
| 542 | + }; | ||
| 543 | + this.validateMaxCustomVal(coin[name]); | ||
| 544 | + this.validateMinCustomVal(coin[name]); | ||
| 545 | + } | ||
| 546 | + if (name == "maxCNYCustomVal" || name == "maxSUDCustomVal") { | ||
| 547 | + let coin = { | ||
| 548 | + maxCNYCustomVal: "CNY", | ||
| 549 | + maxSUDCustomVal: "USD", | ||
| 550 | + }; | ||
| 551 | + this.validateMinCustomVal(coin[name]); | ||
| 552 | + this.validateMaxCustomVal(coin[name]); | ||
| 553 | + } | ||
| 554 | + }, | ||
| 629 | // 表单提交 | 555 | // 表单提交 |
| 630 | submitForm(formName) { | 556 | submitForm(formName) { |
| 631 | this.$refs[formName].validate((valid) => { | 557 | this.$refs[formName].validate((valid) => { |
| ... | @@ -650,4 +576,40 @@ export default { | ... | @@ -650,4 +576,40 @@ export default { |
| 650 | color: #606266; | 576 | color: #606266; |
| 651 | font-weight: 700; | 577 | font-weight: 700; |
| 652 | } | 578 | } |
| 579 | +::v-deep .custom-label { | ||
| 580 | + .el-form-item__content{ | ||
| 581 | + display: flex; | ||
| 582 | + margin-left: 0 !important; | ||
| 583 | + span{ | ||
| 584 | + font-size: 14px; | ||
| 585 | + color: #606266; | ||
| 586 | + font-weight: 700; | ||
| 587 | + float: right; | ||
| 588 | + margin-right: 10px; | ||
| 589 | + text-align: end; | ||
| 590 | + } | ||
| 591 | + .custom-label-title{ | ||
| 592 | +width: 120px; | ||
| 593 | + } | ||
| 594 | + .el-input__suffix{ | ||
| 595 | + right: -15px !important; | ||
| 596 | + } | ||
| 597 | + .el-form-item__error{ | ||
| 598 | + color: #ff4949; | ||
| 599 | + font-size: 12px; | ||
| 600 | + line-height: 1; | ||
| 601 | + padding-top: 4px; | ||
| 602 | + position: absolute; | ||
| 603 | + top: 100%; | ||
| 604 | + left: 0; | ||
| 605 | + font-weight: 500; | ||
| 606 | + width: 100% !important; | ||
| 607 | + } | ||
| 608 | + } | ||
| 609 | +} | ||
| 610 | +::v-deep .custom-label-pieces { | ||
| 611 | + .el-form-item__content{ | ||
| 612 | + width: 80%; | ||
| 613 | + } | ||
| 614 | +} | ||
| 653 | </style> | 615 | </style> | ... | ... |
| 1 | -export const validateRules = { | 1 | +export default { |
| 2 | methods: { | 2 | methods: { |
| 3 | + // 获取字典 | ||
| 4 | + getObj({ serviceCode }) { | ||
| 5 | + let service_Code = []; | ||
| 6 | + serviceCode.map((item) => { | ||
| 7 | + service_Code.push(item.chineseName); | ||
| 8 | + }); | ||
| 9 | + this.serviceCodeData = service_Code; | ||
| 10 | + }, | ||
| 11 | + // 处理serviceCode包不包含 | ||
| 12 | + serviceCodeCofig() { | ||
| 13 | + let str = this.queryForm.serviceCode.replace(/;|;/g, ","); | ||
| 14 | + let arr = str.split(","); | ||
| 15 | + if (arr[arr.length - 1] == "") { | ||
| 16 | + arr.splice(arr.length - 1, 1); | ||
| 17 | + } | ||
| 18 | + let noHasCode = this.serviceCodeData.filter( | ||
| 19 | + (v) => !arr.some((val) => val == v) | ||
| 20 | + ); | ||
| 21 | + let hasCode = this.serviceCodeData.filter((v) => | ||
| 22 | + arr.some((val) => val == v) | ||
| 23 | + ); | ||
| 24 | + let includeCode = arr.filter((v) => !hasCode.some((val) => val == v)); | ||
| 25 | + return { | ||
| 26 | + include: hasCode, | ||
| 27 | + noInclude: includeCode, | ||
| 28 | + }; | ||
| 29 | + }, | ||
| 30 | + // radio包含不包含serviceCode | ||
| 31 | + isServiceCode(val) { | ||
| 32 | + // 包含 | ||
| 33 | + // 勾选的时候去校验 || 输入的时候去校验 | ||
| 34 | + if (val == 1) { | ||
| 35 | + if (this.serviceCodeCofig().noInclude.length) { | ||
| 36 | + let tip = this.serviceCodeCofig().noInclude.toString(); | ||
| 37 | + this.msgError(`${tip} 不包含`); | ||
| 38 | + } | ||
| 39 | + } else { | ||
| 40 | + if (this.serviceCodeCofig().include.length) { | ||
| 41 | + let tip = this.serviceCodeCofig().include.toString(); | ||
| 42 | + this.msgError(`${tip} 已包含`); | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + }, | ||
| 46 | + // serviceCode失焦事件 | ||
| 47 | + serviceCodeBlur() { | ||
| 48 | + if (this.queryForm.isServiceCode == "1") { | ||
| 49 | + if (this.serviceCodeCofig().noInclude.length) { | ||
| 50 | + let tip = this.serviceCodeCofig().noInclude.toString(); | ||
| 51 | + this.msgError(`${tip} 不包含`); | ||
| 52 | + } | ||
| 53 | + } else { | ||
| 54 | + if (this.serviceCodeCofig().include.length) { | ||
| 55 | + let tip = this.serviceCodeCofig().include.toString(); | ||
| 56 | + this.msgError(`${tip} 已包含`); | ||
| 57 | + } | ||
| 58 | + } | ||
| 59 | + }, | ||
| 60 | + | ||
| 3 | // 最小重量 | 61 | // 最小重量 |
| 4 | validateMinWeight(name) { | 62 | validateMinWeight(name) { |
| 5 | - if (/^(0|[1-9]\d*)(.\d{1,3})?$/.test(Number(this.queryForm[name]))) { | 63 | + if (/^(0|[1-9]\d*)(.\d{1,5})?$/.test(Number(this.queryForm[name]))) { |
| 6 | - // 最小重量大于0小于100,并且最小重量小于最大重量 | 64 | + // 最小重量大于0~34,并且最小重量不得大于最大重量 |
| 7 | - if ( | 65 | + if (this.queryForm[name] && this.queryForm.maxWeight) { |
| 8 | - Number(this.queryForm[name]) >= 0 && | 66 | + if (Number(this.queryForm[name]) > Number(this.queryForm.maxWeight)) { |
| 9 | - Number(this.queryForm[name]) < 100 && | ||
| 10 | - Number(this.queryForm[name]) < Number(this.queryForm.maxWeight) | ||
| 11 | - ) { | ||
| 12 | this.$refs.minWeight.innerHTML = ""; | 67 | this.$refs.minWeight.innerHTML = ""; |
| 13 | - return true; | 68 | + this.$refs.minWeight.innerHTML = |
| 69 | + "最小重量大于0~34,并且最小重量不得大于最大重量"; | ||
| 70 | + return false; | ||
| 14 | } else { | 71 | } else { |
| 15 | - this.$refs.maxWeight.innerHTML = ""; | 72 | + this.$refs.minWeight.innerHTML = ""; |
| 73 | + } | ||
| 74 | + if (Number(this.queryForm[name]) > 34) { | ||
| 75 | + this.$refs.minWeight.innerHTML = ""; | ||
| 76 | + this.$refs.minWeight.innerHTML = "最大重量34KG"; | ||
| 77 | + return false; | ||
| 78 | + } | ||
| 79 | + } else if (Number(this.queryForm[name]) < 0) { | ||
| 80 | + this.$refs.minWeight.innerHTML = ""; | ||
| 81 | + this.$refs.minWeight.innerHTML = | ||
| 82 | + "最小重量大于0~34,并且最小重量不得大于最大重量"; | ||
| 83 | + return false; | ||
| 84 | + } else if (Number(this.queryForm[name]) > 34) { | ||
| 85 | + this.$refs.minWeight.innerHTML = ""; | ||
| 16 | this.$refs.minWeight.innerHTML = | 86 | this.$refs.minWeight.innerHTML = |
| 17 | - "最小重量大于0小于100,并且最小重量小于最大重量"; | 87 | + "最小重量大于0~34,并且最小重量不得大于最大重量"; |
| 18 | return false; | 88 | return false; |
| 89 | + } else { | ||
| 90 | + this.$refs.minWeight.innerHTML = ""; | ||
| 19 | } | 91 | } |
| 20 | } else { | 92 | } else { |
| 21 | - this.$refs.maxWeight.innerHTML = ""; | 93 | + this.$refs.minWeight.innerHTML = ""; |
| 22 | - this.$refs.minWeight.innerHTML = "请输入正整数,小数保留3位"; | 94 | + this.$refs.minWeight.innerHTML = "请输入正整数,小数保留5位"; |
| 23 | return false; | 95 | return false; |
| 24 | } | 96 | } |
| 25 | }, | 97 | }, |
| ... | @@ -27,44 +99,75 @@ export const validateRules = { | ... | @@ -27,44 +99,75 @@ export const validateRules = { |
| 27 | validateMaxWeight(name) { | 99 | validateMaxWeight(name) { |
| 28 | // 最大重量 | 100 | // 最大重量 |
| 29 | if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm[name]))) { | 101 | if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm[name]))) { |
| 30 | - // 最大重量大于0小于100,并且最大重量大于最小重量 | 102 | + // 最大重量大于0~34,并且最大重量不得小于最小重量 |
| 31 | - if ( | 103 | + if (this.queryForm[name] && this.queryForm.minWeight) { |
| 32 | - Number(this.queryForm[name]) >= 0 && | 104 | + if (Number(this.queryForm[name]) < Number(this.queryForm.minWeight)) { |
| 33 | - Number(this.queryForm[name]) < 100 && | 105 | + this.$refs.minWeight.innerHTML = ""; |
| 34 | - Number(this.queryForm[name]) > Number(this.queryForm.minWeight) | 106 | + this.$refs.minWeight.innerHTML = |
| 35 | - ) { | 107 | + "最大重量大于0~34,并且最大重量不得小于最小重量"; |
| 36 | - this.$refs.maxWeight.innerHTML = ""; | 108 | + return false; |
| 37 | - return true; | ||
| 38 | } else { | 109 | } else { |
| 39 | this.$refs.minWeight.innerHTML = ""; | 110 | this.$refs.minWeight.innerHTML = ""; |
| 40 | - this.$refs.maxWeight.innerHTML = | 111 | + } |
| 41 | - "最大重量大于0小于100,并且最大重量大于最小重量"; | 112 | + if (Number(this.queryForm[name]) > 34) { |
| 113 | + this.$refs.minWeight.innerHTML = ""; | ||
| 114 | + this.$refs.minWeight.innerHTML = "最大重量34KG"; | ||
| 115 | + return false; | ||
| 116 | + } | ||
| 117 | + } else if (Number(this.queryForm[name]) < 0) { | ||
| 118 | + this.$refs.minWeight.innerHTML = ""; | ||
| 119 | + this.$refs.minWeight.innerHTML = | ||
| 120 | + "最大重量大于0~34,并且最大重量不得小于最小重量"; | ||
| 121 | + return false; | ||
| 122 | + } else if (Number(this.queryForm[name]) > 34) { | ||
| 123 | + this.$refs.minWeight.innerHTML = ""; | ||
| 124 | + this.$refs.minWeight.innerHTML = | ||
| 125 | + "最大重量大于0~34,并且最大重量不得小于最小重量"; | ||
| 42 | return false; | 126 | return false; |
| 127 | + } else { | ||
| 128 | + this.$refs.minWeight.innerHTML = ""; | ||
| 43 | } | 129 | } |
| 44 | } else { | 130 | } else { |
| 45 | this.$refs.minWeight.innerHTML = ""; | 131 | this.$refs.minWeight.innerHTML = ""; |
| 46 | - this.$refs.maxWeight.innerHTML = "请输入正整数,小数保留3位"; | 132 | + this.$refs.minWeight.innerHTML = "请输入正整数,小数保留5位"; |
| 47 | return false; | 133 | return false; |
| 48 | } | 134 | } |
| 49 | }, | 135 | }, |
| 50 | // 最少件数 | 136 | // 最少件数 |
| 51 | validateMinPieces(name) { | 137 | validateMinPieces(name) { |
| 52 | if (/^\d+$/.test(Number(this.queryForm[name]))) { | 138 | if (/^\d+$/.test(Number(this.queryForm[name]))) { |
| 139 | + if (this.queryForm[name] && this.queryForm.maxNumOfPieces) { | ||
| 53 | if ( | 140 | if ( |
| 54 | - Number(this.queryForm[name]) >= 0 && | 141 | + Number(this.queryForm[name]) > Number(this.queryForm.maxNumOfPieces) |
| 55 | - Number(this.queryForm[name]) < 100 && | ||
| 56 | - Number(this.queryForm[name]) < Number(this.queryForm.maxNumOfPieces) | ||
| 57 | ) { | 142 | ) { |
| 58 | - // 最少件数 大于0小于100并且最少件数小于最多件数 | 143 | + // 最少件数1~100,并且最少件数不得大于最多件数 |
| 59 | this.$refs.minNumOfPieces.innerHTML = ""; | 144 | this.$refs.minNumOfPieces.innerHTML = ""; |
| 60 | - return true; | 145 | + this.$refs.minNumOfPieces.innerHTML = |
| 146 | + "最少件数1~100,并且最少件数不得大于最多件数"; | ||
| 147 | + return false; | ||
| 61 | } else { | 148 | } else { |
| 62 | - this.$refs.maxNumOfPieces.innerHTML = ""; | 149 | + this.$refs.minNumOfPieces.innerHTML = ""; |
| 150 | + } | ||
| 151 | + if (Number(this.queryForm[name]) > 100) { | ||
| 152 | + this.$refs.minNumOfPieces.innerHTML = ""; | ||
| 153 | + this.$refs.minNumOfPieces.innerHTML = "件数范围1~100"; | ||
| 154 | + return false; | ||
| 155 | + } | ||
| 156 | + } else if (Number(this.queryForm[name]) < 1) { | ||
| 157 | + this.$refs.minNumOfPieces.innerHTML = ""; | ||
| 63 | this.$refs.minNumOfPieces.innerHTML = | 158 | this.$refs.minNumOfPieces.innerHTML = |
| 64 | - "最少件数 大于0小于100并且最少件数小于最多件数"; | 159 | + "最少件数1~100,并且最少件数不得大于最多件数"; |
| 160 | + return false; | ||
| 161 | + } else if (Number(this.queryForm[name]) > 100) { | ||
| 162 | + this.$refs.minNumOfPieces.innerHTML = ""; | ||
| 163 | + this.$refs.minNumOfPieces.innerHTML = | ||
| 164 | + "最少件数1~100,并且最少件数不得大于最多件数"; | ||
| 165 | + return false; | ||
| 166 | + } else { | ||
| 167 | + this.$refs.minNumOfPieces.innerHTML = ""; | ||
| 65 | } | 168 | } |
| 66 | } else { | 169 | } else { |
| 67 | - this.$refs.maxNumOfPieces.innerHTML = ""; | 170 | + this.$refs.minNumOfPieces.innerHTML = ""; |
| 68 | this.$refs.minNumOfPieces.innerHTML = "请输入有效件数"; | 171 | this.$refs.minNumOfPieces.innerHTML = "请输入有效件数"; |
| 69 | return false; | 172 | return false; |
| 70 | } | 173 | } |
| ... | @@ -72,18 +175,35 @@ export const validateRules = { | ... | @@ -72,18 +175,35 @@ export const validateRules = { |
| 72 | // 最多件数 | 175 | // 最多件数 |
| 73 | validateMaxPieces(name) { | 176 | validateMaxPieces(name) { |
| 74 | if (/^\d+$/.test(Number(this.queryForm[name]))) { | 177 | if (/^\d+$/.test(Number(this.queryForm[name]))) { |
| 178 | + if (this.queryForm[name] && this.queryForm.maxNumOfPieces) { | ||
| 75 | if ( | 179 | if ( |
| 76 | - Number(this.queryForm[name]) >= 0 && | 180 | + Number(this.queryForm[name]) < Number(this.queryForm.minNumOfPieces) |
| 77 | - Number(this.queryForm[name]) < 100 && | ||
| 78 | - Number(this.queryForm[name]) > Number(this.queryForm.minNumOfPieces) | ||
| 79 | ) { | 181 | ) { |
| 80 | - // 最少件数 大于0小于100并且最少件数小于最多件数 | 182 | + // 最多件数1~100,并且最多件数不得小于最小件数 |
| 81 | - this.$refs.maxNumOfPieces.innerHTML = ""; | 183 | + this.$refs.minNumOfPieces.innerHTML = ""; |
| 82 | - return true; | 184 | + this.$refs.minNumOfPieces.innerHTML = |
| 185 | + "最多件数1~100,并且最多件数不得小于最小件数"; | ||
| 186 | + return false; | ||
| 187 | + } else { | ||
| 188 | + this.$refs.minNumOfPieces.innerHTML = ""; | ||
| 189 | + } | ||
| 190 | + if (Number(this.queryForm[name]) > 100) { | ||
| 191 | + this.$refs.minNumOfPieces.innerHTML = ""; | ||
| 192 | + this.$refs.minNumOfPieces.innerHTML = "件数范围1~100"; | ||
| 193 | + return false; | ||
| 194 | + } | ||
| 195 | + } else if (Number(this.queryForm[name]) < 1) { | ||
| 196 | + this.$refs.minNumOfPieces.innerHTML = ""; | ||
| 197 | + this.$refs.minNumOfPieces.innerHTML = | ||
| 198 | + "最多件数1~100,并且最多件数不得小于最小件数"; | ||
| 199 | + return false; | ||
| 200 | + } else if (Number(this.queryForm[name]) > 100) { | ||
| 201 | + this.$refs.minNumOfPieces.innerHTML = ""; | ||
| 202 | + this.$refs.minNumOfPieces.innerHTML = | ||
| 203 | + "最多件数1~100,并且最多件数不得小于最小件数"; | ||
| 204 | + return false; | ||
| 83 | } else { | 205 | } else { |
| 84 | this.$refs.minNumOfPieces.innerHTML = ""; | 206 | this.$refs.minNumOfPieces.innerHTML = ""; |
| 85 | - this.$refs.maxNumOfPieces.innerHTML = | ||
| 86 | - "最多件数 大于0小于100并且最少件数小于最多件数"; | ||
| 87 | } | 207 | } |
| 88 | } else { | 208 | } else { |
| 89 | this.$refs.minNumOfPieces.innerHTML = ""; | 209 | this.$refs.minNumOfPieces.innerHTML = ""; |
| ... | @@ -95,88 +215,166 @@ export const validateRules = { | ... | @@ -95,88 +215,166 @@ export const validateRules = { |
| 95 | // 最小申报价值 | 215 | // 最小申报价值 |
| 96 | validateMinCustomVal(name) { | 216 | validateMinCustomVal(name) { |
| 97 | // 申报价值 | 217 | // 申报价值 |
| 98 | - if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm[name]))) { | ||
| 99 | if ( | 218 | if ( |
| 100 | - this.queryForm.customVal == "USD" || | 219 | + /^(0|[1-9]\d*)(.\d{1,2})?$/.test( |
| 101 | - this.queryForm.customVal == "美元" | 220 | + Number( |
| 221 | + this.queryForm.minCNYCustomVal || this.queryForm.minSUDCustomVal | ||
| 222 | + ) | ||
| 223 | + ) | ||
| 102 | ) { | 224 | ) { |
| 225 | + if (name == "USD" || name == "美元") { | ||
| 103 | // 申报价值(美元)0~600 | 226 | // 申报价值(美元)0~600 |
| 104 | if ( | 227 | if ( |
| 105 | - Number(this.queryForm[name]) >= 0 && | 228 | + this.queryForm.minSUDCustomVal && |
| 106 | - Number(this.queryForm[name]) < 600 && | 229 | + this.queryForm.maxSUDCustomVal |
| 107 | - Number(this.queryForm[name]) < Number(this.queryForm.maxCustomVal) | ||
| 108 | ) { | 230 | ) { |
| 109 | - // 最小申报价值大于0小于600,并且最小申报价值小于最大申报价值 | 231 | + if ( |
| 110 | - this.$refs.minCustomVal.innerHTML = ""; | 232 | + Number(this.queryForm.minSUDCustomVal) > |
| 111 | - return true; | 233 | + Number(this.queryForm.maxSUDCustomVal) |
| 234 | + ) { | ||
| 235 | + this.$refs.minSUDCustomVal.innerHTML = | ||
| 236 | + "最小申报价值不得大于最大申报价值"; | ||
| 237 | + return false; | ||
| 112 | } else { | 238 | } else { |
| 113 | - this.$refs.maxCustomVal.innerHTML = ""; | 239 | + this.$refs.minSUDCustomVal.innerHTML = ""; |
| 114 | - this.$refs.minCustomVal.innerHTML = `申报价值(美元)0~600`; | 240 | + } |
| 241 | + if (Number(this.queryForm.minSUDCustomVal) > 600) { | ||
| 242 | + this.$refs.minSUDCustomVal.innerHTML = ""; | ||
| 243 | + this.$refs.minSUDCustomVal.innerHTML = "最大申报值不得大于600"; | ||
| 115 | return false; | 244 | return false; |
| 116 | } | 245 | } |
| 246 | + } else if (Number(this.queryForm.minSUDCustomVal) < 0) { | ||
| 247 | + this.$refs.minSUDCustomVal.innerHTML = ""; | ||
| 248 | + this.$refs.minSUDCustomVal.innerHTML = "申报价值(美元)0~600"; | ||
| 249 | + return false; | ||
| 250 | + } else if (Number(this.queryForm.minSUDCustomVal) > 600) { | ||
| 251 | + this.$refs.minSUDCustomVal.innerHTML = ""; | ||
| 252 | + this.$refs.minSUDCustomVal.innerHTML = "最大申报值不得大于600"; | ||
| 253 | + return false; | ||
| 254 | + } else { | ||
| 255 | + this.$refs.minSUDCustomVal.innerHTML = ""; | ||
| 256 | + return true; | ||
| 257 | + } | ||
| 117 | } else { | 258 | } else { |
| 118 | // 申报价值(人民币)0~2000 | 259 | // 申报价值(人民币)0~2000 |
| 119 | if ( | 260 | if ( |
| 120 | - Number(this.queryForm[name]) >= 0 && | 261 | + this.queryForm.minCNYCustomVal && |
| 121 | - Number(this.queryForm[name]) < 2000 && | 262 | + this.queryForm.maxCNYCustomVal |
| 122 | - Number(this.queryForm[name]) < Number(this.queryForm.maxCustomVal) | ||
| 123 | ) { | 263 | ) { |
| 124 | - // 最大申报价值大于0小于2000,并且最大申报价值大于最小申报价值 | 264 | + if ( |
| 125 | - this.$refs.minCustomVal.innerHTML = ""; | 265 | + Number(this.queryForm.minCNYCustomVal) > |
| 126 | - return true; | 266 | + Number(this.queryForm.maxCNYCustomVal) |
| 267 | + ) { | ||
| 268 | + this.$refs.minCNYCustomVal.innerHTML = | ||
| 269 | + "最小申报价值不得大于最大申报价值"; | ||
| 270 | + return false; | ||
| 127 | } else { | 271 | } else { |
| 128 | - this.$refs.maxCustomVal.innerHTML = ""; | 272 | + this.$refs.minCNYCustomVal.innerHTML = ""; |
| 129 | - this.$refs.minCustomVal.innerHTML = `申报价值(人民币)0~2000`; | 273 | + } |
| 274 | + if (Number(this.queryForm.minCNYCustomVal) > 2000) { | ||
| 275 | + this.$refs.minCNYCustomVal.innerHTML = ""; | ||
| 276 | + this.$refs.minCNYCustomVal.innerHTML = "最大申报值不得大于2000"; | ||
| 130 | return false; | 277 | return false; |
| 131 | } | 278 | } |
| 279 | + } else if (Number(this.queryForm.minCNYCustomVal) < 0) { | ||
| 280 | + this.$refs.minCNYCustomVal.innerHTML = ""; | ||
| 281 | + this.$refs.minCNYCustomVal.innerHTML = "申报价值(人民币)0~2000"; | ||
| 282 | + return false; | ||
| 283 | + } else if (Number(this.queryForm.minCNYCustomVal) > 2000) { | ||
| 284 | + this.$refs.minCNYCustomVal.innerHTML = ""; | ||
| 285 | + this.$refs.minCNYCustomVal.innerHTML = "最大申报值不得大于2000"; | ||
| 286 | + return false; | ||
| 287 | + } else { | ||
| 288 | + this.$refs.minCNYCustomVal.innerHTML = ""; | ||
| 289 | + return true; | ||
| 290 | + } | ||
| 132 | } | 291 | } |
| 133 | } else { | 292 | } else { |
| 134 | - this.$refs.maxCustomVal.innerHTML = ""; | 293 | + this.$refs.minCNYCustomVal.innerHTML = ""; |
| 135 | - this.$refs.minCustomVal.innerHTML = "请输入正确申报价值"; | 294 | + this.$refs.minCNYCustomVal.innerHTML = "请输入正确申报价值"; |
| 136 | return false; | 295 | return false; |
| 137 | } | 296 | } |
| 138 | }, | 297 | }, |
| 139 | // 最大申报价值 | 298 | // 最大申报价值 |
| 140 | validateMaxCustomVal(name) { | 299 | validateMaxCustomVal(name) { |
| 141 | // 申报价值 | 300 | // 申报价值 |
| 142 | - if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm[name]))) { | ||
| 143 | if ( | 301 | if ( |
| 144 | - this.queryForm.customVal == "USD" || | 302 | + /^(0|[1-9]\d*)(.\d{1,2})?$/.test( |
| 145 | - this.queryForm.customVal == "美元" | 303 | + Number( |
| 304 | + this.queryForm.maxCNYCustomVal || this.queryForm.maxSUDCustomVal | ||
| 305 | + ) | ||
| 306 | + ) | ||
| 146 | ) { | 307 | ) { |
| 308 | + if (name == "USD" || name == "美元") { | ||
| 147 | // 申报价值(美元)0~600 | 309 | // 申报价值(美元)0~600 |
| 148 | if ( | 310 | if ( |
| 149 | - Number(this.queryForm[name]) >= 0 && | 311 | + this.queryForm.minSUDCustomVal && |
| 150 | - Number(this.queryForm[name]) < 600 && | 312 | + this.queryForm.maxSUDCustomVal |
| 151 | - Number(this.queryForm[name]) > Number(this.queryForm.minCustomVal) | ||
| 152 | ) { | 313 | ) { |
| 153 | - // 最小申报价值大于0小于600,并且最小申报价值小于最大申报价值 | 314 | + if ( |
| 154 | - this.$refs.maxCustomVal.innerHTML = ""; | 315 | + Number(this.queryForm.minSUDCustomVal) > |
| 155 | - return true; | 316 | + Number(this.queryForm.maxSUDCustomVal) |
| 317 | + ) { | ||
| 318 | + this.$refs.minSUDCustomVal.innerHTML = | ||
| 319 | + "最小申报价值不得大于最大申报价值"; | ||
| 320 | + return false; | ||
| 156 | } else { | 321 | } else { |
| 157 | - this.$refs.minCustomVal.innerHTML = ""; | 322 | + this.$refs.minSUDCustomVal.innerHTML = ""; |
| 158 | - this.$refs.maxCustomVal.innerHTML = `申报价值(美元)0~600`; | 323 | + } |
| 324 | + if (Number(this.queryForm.maxCNYCustomVal) > 600) { | ||
| 325 | + this.$refs.minSUDCustomVal.innerHTML = ""; | ||
| 326 | + this.$refs.minSUDCustomVal.innerHTML = "最大申报值不得大于600"; | ||
| 159 | return false; | 327 | return false; |
| 160 | } | 328 | } |
| 329 | + } else if (Number(this.queryForm.maxCNYCustomVal) < 0) { | ||
| 330 | + this.$refs.minSUDCustomVal.innerHTML = ""; | ||
| 331 | + this.$refs.minSUDCustomVal.innerHTML = "申报价值(美元)0~600"; | ||
| 332 | + return false; | ||
| 333 | + } else if (Number(this.queryForm.maxCNYCustomVal) > 600) { | ||
| 334 | + this.$refs.minSUDCustomVal.innerHTML = ""; | ||
| 335 | + this.$refs.minSUDCustomVal.innerHTML = "最大申报值不得大于600"; | ||
| 336 | + return false; | ||
| 337 | + } else { | ||
| 338 | + this.$refs.minSUDCustomVal.innerHTML = ""; | ||
| 339 | + return true; | ||
| 340 | + } | ||
| 161 | } else { | 341 | } else { |
| 162 | // 申报价值(人民币)0~2000 | 342 | // 申报价值(人民币)0~2000 |
| 163 | if ( | 343 | if ( |
| 164 | - Number(this.queryForm[name]) >= 0 && | 344 | + this.queryForm.minCNYCustomVal && |
| 165 | - Number(this.queryForm[name]) < 2000 && | 345 | + this.queryForm.maxCNYCustomVal |
| 166 | - Number(this.queryForm[name]) > Number(this.queryForm.minCustomVal) | ||
| 167 | ) { | 346 | ) { |
| 168 | - // 最大申报价值大于0小于2000,并且最大申报价值大于最小申报价值 | 347 | + if ( |
| 169 | - this.$refs.maxCustomVal.innerHTML = ""; | 348 | + Number(this.queryForm.minCNYCustomVal) > |
| 170 | - return true; | 349 | + Number(this.queryForm.maxCNYCustomVal) |
| 350 | + ) { | ||
| 351 | + this.$refs.minCNYCustomVal.innerHTML = | ||
| 352 | + "最小申报价值不得大于最大申报价值"; | ||
| 353 | + return false; | ||
| 171 | } else { | 354 | } else { |
| 172 | - this.$refs.minCustomVal.innerHTML = ""; | 355 | + this.$refs.minCNYCustomVal.innerHTML = ""; |
| 173 | - this.$refs.maxCustomVal.innerHTML = `申报价值(人民币)0~2000`; | 356 | + } |
| 357 | + if (Number(this.queryForm.maxCNYCustomVal) > 2000) { | ||
| 358 | + this.$refs.minCNYCustomVal.innerHTML = ""; | ||
| 359 | + this.$refs.minCNYCustomVal.innerHTML = "最大申报值不得大于2000"; | ||
| 360 | + return false; | ||
| 361 | + } | ||
| 362 | + } else if (Number(this.queryForm.maxCNYCustomVal) < 0) { | ||
| 363 | + this.$refs.minCNYCustomVal.innerHTML = ""; | ||
| 364 | + this.$refs.minCNYCustomVal.innerHTML = "申报价值(人民币)0~2000"; | ||
| 174 | return false; | 365 | return false; |
| 366 | + } else if (Number(this.queryForm.maxCNYCustomVal) > 2000) { | ||
| 367 | + this.$refs.minCNYCustomVal.innerHTML = ""; | ||
| 368 | + this.$refs.minCNYCustomVal.innerHTML = "最大申报值不得大于2000"; | ||
| 369 | + return false; | ||
| 370 | + } else { | ||
| 371 | + this.$refs.minCNYCustomVal.innerHTML = ""; | ||
| 372 | + return true; | ||
| 175 | } | 373 | } |
| 176 | } | 374 | } |
| 177 | } else { | 375 | } else { |
| 178 | - this.$refs.minCustomVal.innerHTML = ""; | 376 | + this.$refs.minCNYCustomVal.innerHTML = ""; |
| 179 | - this.$refs.maxCustomVal.innerHTML = "请输入正确申报价值"; | 377 | + this.$refs.maxCNYCustomVal.innerHTML = "请输入正确申报价值"; |
| 180 | return false; | 378 | return false; |
| 181 | } | 379 | } |
| 182 | }, | 380 | }, | ... | ... |
| ... | @@ -6,15 +6,6 @@ export const tableAttr = { | ... | @@ -6,15 +6,6 @@ export const tableAttr = { |
| 6 | btnCofig: { | 6 | btnCofig: { |
| 7 | isBtn: true, | 7 | isBtn: true, |
| 8 | btnGroup: [ | 8 | btnGroup: [ |
| 9 | - // { | ||
| 10 | - // type: "primary", // text、primary、danger | ||
| 11 | - // icon: "el-icon-search", // el-icon-edit 、el-icon-delete、el-icon-plus、el-icon-download、el-icon-upload el-icon--right | ||
| 12 | - // btnName: "搜索", | ||
| 13 | - // size: "mini", // medium / small / mini | ||
| 14 | - // round: false, | ||
| 15 | - // loading: false, | ||
| 16 | - // event: "search", | ||
| 17 | - // }, | ||
| 18 | { | 9 | { |
| 19 | type: "primary", | 10 | type: "primary", |
| 20 | icon: "el-icon-plus", | 11 | icon: "el-icon-plus", |
| ... | @@ -24,15 +15,6 @@ export const tableAttr = { | ... | @@ -24,15 +15,6 @@ export const tableAttr = { |
| 24 | loading: false, | 15 | loading: false, |
| 25 | event: "add", | 16 | event: "add", |
| 26 | }, | 17 | }, |
| 27 | - // { | ||
| 28 | - // type: "danger", | ||
| 29 | - // icon: "el-icon-delete", | ||
| 30 | - // btnName: "删除", | ||
| 31 | - // size: "mini", | ||
| 32 | - // round: false, | ||
| 33 | - // loading: false, | ||
| 34 | - // event: "delete", | ||
| 35 | - // }, | ||
| 36 | ], | 18 | ], |
| 37 | }, | 19 | }, |
| 38 | }; | 20 | }; |
| ... | @@ -104,7 +86,8 @@ export const tableData = [ | ... | @@ -104,7 +86,8 @@ export const tableData = [ |
| 104 | id: "1", | 86 | id: "1", |
| 105 | fltNo: "A380", | 87 | fltNo: "A380", |
| 106 | fltNoDate: "3", | 88 | fltNoDate: "3", |
| 107 | - fltRoute: "CAN", | 89 | + fltRoute: "", |
| 90 | + routeList: [], | ||
| 108 | isOn: "1", | 91 | isOn: "1", |
| 109 | sort: "1", // 排序字段 | 92 | sort: "1", // 排序字段 |
| 110 | }, | 93 | }, | ... | ... |
| ... | @@ -27,15 +27,11 @@ export const formConfig = [ | ... | @@ -27,15 +27,11 @@ export const formConfig = [ |
| 27 | data: [ | 27 | data: [ |
| 28 | { | 28 | { |
| 29 | value: "1", | 29 | value: "1", |
| 30 | - label: "新增", | 30 | + label: "有效", |
| 31 | - }, | ||
| 32 | - { | ||
| 33 | - value: "2", | ||
| 34 | - label: "修改", | ||
| 35 | }, | 31 | }, |
| 36 | { | 32 | { |
| 37 | value: "3", | 33 | value: "3", |
| 38 | - label: "删除", | 34 | + label: "无效", |
| 39 | }, | 35 | }, |
| 40 | ], | 36 | ], |
| 41 | label: "", | 37 | label: "", | ... | ... |
| ... | @@ -22,8 +22,6 @@ | ... | @@ -22,8 +22,6 @@ |
| 22 | @search="searchBtn" | 22 | @search="searchBtn" |
| 23 | @restForm="restForm" | 23 | @restForm="restForm" |
| 24 | @add="addBtn" | 24 | @add="addBtn" |
| 25 | - @upload="uploadBtn" | ||
| 26 | - @download="downloadBtn" | ||
| 27 | > | 25 | > |
| 28 | </yl-table> | 26 | </yl-table> |
| 29 | </div> | 27 | </div> |
| ... | @@ -134,14 +132,6 @@ export default { | ... | @@ -134,14 +132,6 @@ export default { |
| 134 | }, | 132 | }, |
| 135 | }); | 133 | }); |
| 136 | }, | 134 | }, |
| 137 | - // 上传 | ||
| 138 | - uploadBtn(item) { | ||
| 139 | - console.log("upload:", item); | ||
| 140 | - }, | ||
| 141 | - // 导出 | ||
| 142 | - downloadBtn(item) { | ||
| 143 | - console.log("download:", item); | ||
| 144 | - }, | ||
| 145 | // 编辑 | 135 | // 编辑 |
| 146 | editRow(item) { | 136 | editRow(item) { |
| 147 | this.$router.push({ | 137 | this.$router.push({ | ... | ... |
| 1 | const state = { | 1 | const state = { |
| 2 | - 1: "新增", | 2 | + 1: "有效", |
| 3 | - 2: "修改", | 3 | + 3: "无效", |
| 4 | - 3: "删除", | ||
| 5 | }; | 4 | }; |
| 6 | export const tableAttr = { | 5 | export const tableAttr = { |
| 7 | border: true, | 6 | border: true, |
| ... | @@ -38,28 +37,10 @@ export const tableAttr = { | ... | @@ -38,28 +37,10 @@ export const tableAttr = { |
| 38 | loading: false, | 37 | loading: false, |
| 39 | event: "add", | 38 | event: "add", |
| 40 | }, | 39 | }, |
| 41 | - { | ||
| 42 | - type: "primary", | ||
| 43 | - icon: "el-icon-upload", | ||
| 44 | - btnName: "上传", | ||
| 45 | - size: "mini", | ||
| 46 | - round: false, | ||
| 47 | - loading: false, | ||
| 48 | - event: "upload", | ||
| 49 | - }, | ||
| 50 | - { | ||
| 51 | - type: "primary", | ||
| 52 | - icon: "el-icon-download", | ||
| 53 | - btnName: "导出", | ||
| 54 | - size: "mini", | ||
| 55 | - round: false, | ||
| 56 | - loading: false, | ||
| 57 | - event: "download", | ||
| 58 | - }, | ||
| 59 | ], | 40 | ], |
| 60 | }, | 41 | }, |
| 61 | }; | 42 | }; |
| 62 | -export const columnHeader = (editRow, deleteRow, viewRow) => [ | 43 | +export const columnHeader = (viewRow, editRow, deleteRow) => [ |
| 63 | { | 44 | { |
| 64 | type: "selection", | 45 | type: "selection", |
| 65 | align: "center", | 46 | align: "center", |
| ... | @@ -74,12 +55,30 @@ export const columnHeader = (editRow, deleteRow, viewRow) => [ | ... | @@ -74,12 +55,30 @@ export const columnHeader = (editRow, deleteRow, viewRow) => [ |
| 74 | width: "50", | 55 | width: "50", |
| 75 | }, | 56 | }, |
| 76 | { | 57 | { |
| 58 | + label: "原航班号", | ||
| 59 | + prop: "fltNo", | ||
| 60 | + align: "center", | ||
| 61 | + minWidth: 100, | ||
| 62 | + }, | ||
| 63 | + { | ||
| 77 | label: "顺位航班", | 64 | label: "顺位航班", |
| 78 | prop: "flightRand", | 65 | prop: "flightRand", |
| 79 | align: "center", | 66 | align: "center", |
| 80 | minWidth: 100, | 67 | minWidth: 100, |
| 81 | }, | 68 | }, |
| 82 | { | 69 | { |
| 70 | + label: "URSA包含", | ||
| 71 | + prop: "includeUrsa", | ||
| 72 | + align: "center", | ||
| 73 | + minWidth: 100, | ||
| 74 | + }, | ||
| 75 | + { | ||
| 76 | + label: "URSA不包含", | ||
| 77 | + prop: "notIncludeUrsa", | ||
| 78 | + align: "center", | ||
| 79 | + minWidth: 100, | ||
| 80 | + }, | ||
| 81 | + { | ||
| 83 | label: "状态", | 82 | label: "状态", |
| 84 | prop: "status", | 83 | prop: "status", |
| 85 | align: "center", | 84 | align: "center", |
| ... | @@ -98,14 +97,14 @@ export const columnHeader = (editRow, deleteRow, viewRow) => [ | ... | @@ -98,14 +97,14 @@ export const columnHeader = (editRow, deleteRow, viewRow) => [ |
| 98 | "sort-method": (a, b) => b.createTime - a.createTime, | 97 | "sort-method": (a, b) => b.createTime - a.createTime, |
| 99 | }, | 98 | }, |
| 100 | { | 99 | { |
| 101 | - label: "修改时间", | 100 | + label: "创建人", |
| 102 | - prop: "updateTime", | 101 | + prop: "createUserName", |
| 103 | align: "center", | 102 | align: "center", |
| 104 | minWidth: 100, | 103 | minWidth: 100, |
| 105 | }, | 104 | }, |
| 106 | { | 105 | { |
| 107 | - label: "创建人", | 106 | + label: "修改时间", |
| 108 | - prop: "createUserName", | 107 | + prop: "updateTime", |
| 109 | align: "center", | 108 | align: "center", |
| 110 | minWidth: 100, | 109 | minWidth: 100, |
| 111 | }, | 110 | }, |
| ... | @@ -129,50 +128,50 @@ export const columnHeader = (editRow, deleteRow, viewRow) => [ | ... | @@ -129,50 +128,50 @@ export const columnHeader = (editRow, deleteRow, viewRow) => [ |
| 129 | props: { | 128 | props: { |
| 130 | type: "text", | 129 | type: "text", |
| 131 | size: "mini", | 130 | size: "mini", |
| 132 | - icon: "el-icon-edit", | 131 | + icon: "el-icon-view", |
| 133 | }, | 132 | }, |
| 134 | on: { | 133 | on: { |
| 135 | click() { | 134 | click() { |
| 136 | - editRow(params); | 135 | + viewRow(params); |
| 137 | }, | 136 | }, |
| 138 | }, | 137 | }, |
| 139 | }, | 138 | }, |
| 140 | - "修改" | 139 | + "查看" |
| 141 | ), | 140 | ), |
| 142 | h( | 141 | h( |
| 143 | "el-button", | 142 | "el-button", |
| 144 | { | 143 | { |
| 145 | - style: { | ||
| 146 | - color: "#ff4949", | ||
| 147 | - }, | ||
| 148 | props: { | 144 | props: { |
| 149 | type: "text", | 145 | type: "text", |
| 150 | size: "mini", | 146 | size: "mini", |
| 151 | - icon: "el-icon-delete", | 147 | + icon: "el-icon-edit", |
| 152 | }, | 148 | }, |
| 153 | on: { | 149 | on: { |
| 154 | click() { | 150 | click() { |
| 155 | - deleteRow(params); | 151 | + editRow(params); |
| 156 | }, | 152 | }, |
| 157 | }, | 153 | }, |
| 158 | }, | 154 | }, |
| 159 | - "删除" | 155 | + "修改" |
| 160 | ), | 156 | ), |
| 161 | h( | 157 | h( |
| 162 | "el-button", | 158 | "el-button", |
| 163 | { | 159 | { |
| 160 | + style: { | ||
| 161 | + color: "#ff4949", | ||
| 162 | + }, | ||
| 164 | props: { | 163 | props: { |
| 165 | type: "text", | 164 | type: "text", |
| 166 | size: "mini", | 165 | size: "mini", |
| 167 | - icon: "el-icon-view", | 166 | + icon: "el-icon-delete", |
| 168 | }, | 167 | }, |
| 169 | on: { | 168 | on: { |
| 170 | click() { | 169 | click() { |
| 171 | - viewRow(params); | 170 | + deleteRow(params); |
| 172 | }, | 171 | }, |
| 173 | }, | 172 | }, |
| 174 | }, | 173 | }, |
| 175 | - "查看" | 174 | + "删除" |
| 176 | ), | 175 | ), |
| 177 | ]); | 176 | ]); |
| 178 | }, | 177 | }, |
| ... | @@ -184,81 +183,108 @@ export const tableData = [ | ... | @@ -184,81 +183,108 @@ export const tableData = [ |
| 184 | id: "1", | 183 | id: "1", |
| 185 | flightRand: "LZ003;LZ00", | 184 | flightRand: "LZ003;LZ00", |
| 186 | status: "1", | 185 | status: "1", |
| 187 | - createTime: "2023-08-11", | 186 | + fltNo: "FX0090", |
| 188 | - updateTime: "2023-08-11", | 187 | + includeUrsa: "URSACODE191", |
| 188 | + notIncludeUrsa: "P_3", | ||
| 189 | + createTime: "2023-08-14", | ||
| 189 | createUserName: "wjh", | 190 | createUserName: "wjh", |
| 191 | + updateTime: "2023-08-14", | ||
| 190 | updateUserName: "wjh", | 192 | updateUserName: "wjh", |
| 191 | }, | 193 | }, |
| 192 | { | 194 | { |
| 193 | id: "2", | 195 | id: "2", |
| 194 | flightRand: "LP001;LP004+1", | 196 | flightRand: "LP001;LP004+1", |
| 195 | status: "3", | 197 | status: "3", |
| 196 | - createTime: "2023-08-11", | 198 | + fltNo: "FX0090", |
| 197 | - updateTime: "2023-08-11", | 199 | + includeUrsa: "P_;URSACODE105", |
| 200 | + notIncludeUrsa: "P_21", | ||
| 201 | + createTime: "2023-08-14", | ||
| 198 | createUserName: "wjh", | 202 | createUserName: "wjh", |
| 203 | + updateTime: "2023-08-14", | ||
| 199 | updateUserName: "wjh", | 204 | updateUserName: "wjh", |
| 200 | }, | 205 | }, |
| 201 | { | 206 | { |
| 202 | id: "3", | 207 | id: "3", |
| 203 | - flightRand: "LZ002;LZ003;LZ001", | 208 | + flightRand: "CQ00;LZ003;CS0004", |
| 204 | status: "1", | 209 | status: "1", |
| 205 | - createTime: "2023-08-10", | 210 | + fltNo: "CS0002", |
| 206 | - updateTime: "2023-08-10", | 211 | + includeUrsa: "URSACODE12", |
| 212 | + notIncludeUrsa: "P_2", | ||
| 213 | + createTime: "2023-08-14", | ||
| 207 | createUserName: "wjh", | 214 | createUserName: "wjh", |
| 215 | + updateTime: "2023-08-14", | ||
| 208 | updateUserName: "wjh", | 216 | updateUserName: "wjh", |
| 209 | }, | 217 | }, |
| 210 | { | 218 | { |
| 211 | id: "4", | 219 | id: "4", |
| 212 | flightRand: "LZ001;LZ002;LZ004", | 220 | flightRand: "LZ001;LZ002;LZ004", |
| 213 | - status: "2", | 221 | + status: "1", |
| 222 | + fltNo: "FX0090", | ||
| 223 | + includeUrsa: "URSACODE192", | ||
| 224 | + notIncludeUrsa: "P_17", | ||
| 214 | createTime: "2023-08-11", | 225 | createTime: "2023-08-11", |
| 215 | - updateTime: "2023-08-11", | ||
| 216 | createUserName: "wjh", | 226 | createUserName: "wjh", |
| 227 | + updateTime: "2023-08-11", | ||
| 217 | updateUserName: "wjh", | 228 | updateUserName: "wjh", |
| 218 | }, | 229 | }, |
| 219 | { | 230 | { |
| 220 | id: "5", | 231 | id: "5", |
| 221 | flightRand: "PS001;PS003", | 232 | flightRand: "PS001;PS003", |
| 222 | status: "1", | 233 | status: "1", |
| 234 | + fltNo: "FX0091", | ||
| 235 | + includeUrsa: "URSACODE10", | ||
| 236 | + notIncludeUrsa: "P_28", | ||
| 223 | createTime: "2023-08-11", | 237 | createTime: "2023-08-11", |
| 224 | - updateTime: "2023-08-11", | ||
| 225 | createUserName: "wjh", | 238 | createUserName: "wjh", |
| 239 | + updateTime: "2023-08-11", | ||
| 226 | updateUserName: "wjh", | 240 | updateUserName: "wjh", |
| 227 | }, | 241 | }, |
| 228 | { | 242 | { |
| 229 | id: "6", | 243 | id: "6", |
| 230 | flightRand: "PS002;PS003", | 244 | flightRand: "PS002;PS003", |
| 231 | status: "3", | 245 | status: "3", |
| 246 | + fltNo: "XN007", | ||
| 247 | + includeUrsa: "URSACODE27", | ||
| 248 | + notIncludeUrsa: "P_4", | ||
| 232 | createTime: "2023-08-11", | 249 | createTime: "2023-08-11", |
| 233 | - updateTime: "2023-08-11", | ||
| 234 | createUserName: "wjh", | 250 | createUserName: "wjh", |
| 251 | + updateTime: "2023-08-11", | ||
| 235 | updateUserName: "wjh", | 252 | updateUserName: "wjh", |
| 236 | }, | 253 | }, |
| 237 | { | 254 | { |
| 238 | id: "7", | 255 | id: "7", |
| 239 | - flightRand: "FX0092;FX0095;FX0094;FX0090", | 256 | + flightRand: "XN001;XN002;XN003;XN004", |
| 240 | status: "1", | 257 | status: "1", |
| 258 | + fltNo: "XN001", | ||
| 259 | + includeUrsa: "URSACODE34", | ||
| 260 | + notIncludeUrsa: "P_7", | ||
| 241 | createTime: "2023-08-10", | 261 | createTime: "2023-08-10", |
| 242 | - updateTime: "2023-08-10", | ||
| 243 | createUserName: "wjh", | 262 | createUserName: "wjh", |
| 263 | + updateTime: "2023-08-10", | ||
| 244 | updateUserName: "wjh", | 264 | updateUserName: "wjh", |
| 245 | }, | 265 | }, |
| 246 | { | 266 | { |
| 247 | id: "8", | 267 | id: "8", |
| 248 | - flightRand: "AB060;AC005;AC204", | 268 | + flightRand: "HA004", |
| 249 | - status: "2", | 269 | + status: "3", |
| 270 | + fltNo: "LZ007", | ||
| 271 | + includeUrsa: "URSACODE71", | ||
| 272 | + notIncludeUrsa: "P_2", | ||
| 250 | createTime: "2023-08-10", | 273 | createTime: "2023-08-10", |
| 251 | - updateTime: "2023-08-10", | ||
| 252 | createUserName: "wjh", | 274 | createUserName: "wjh", |
| 275 | + updateTime: "2023-08-10", | ||
| 253 | updateUserName: "wjh", | 276 | updateUserName: "wjh", |
| 254 | }, | 277 | }, |
| 255 | { | 278 | { |
| 256 | id: "9", | 279 | id: "9", |
| 257 | - flightRand: "FX0090;FX0092", | 280 | + flightRand: "AB0001;AB123", |
| 258 | status: "1", | 281 | status: "1", |
| 282 | + fltNo: "AB0001", | ||
| 283 | + includeUrsa: "URSACODE87", | ||
| 284 | + notIncludeUrsa: "P_26", | ||
| 259 | createTime: "2023-08-10", | 285 | createTime: "2023-08-10", |
| 260 | - updateTime: "2023-08-10", | ||
| 261 | createUserName: "wjh", | 286 | createUserName: "wjh", |
| 287 | + updateTime: "2023-08-10", | ||
| 262 | updateUserName: "wjh", | 288 | updateUserName: "wjh", |
| 263 | }, | 289 | }, |
| 264 | ]; | 290 | ]; | ... | ... |
-
Please register or login to post a comment