Showing
1 changed file
with
215 additions
and
207 deletions
| 1 | <template> | 1 | <template> |
| 2 | <div style="margin: 40px" v-loading="loading"> | 2 | <div style="margin: 40px" v-loading="loading"> |
| 3 | - <el-form | 3 | + <el-empty description="找不到这条数据!" v-if="isEmpty"></el-empty> |
| 4 | - ref="form" | 4 | + <template v-else> |
| 5 | - :model="form" | 5 | + <el-form |
| 6 | - label-width="200px" | 6 | + ref="form" |
| 7 | - size="small" | 7 | + :model="form" |
| 8 | - :disabled="disable" | 8 | + label-width="200px" |
| 9 | - :rules="rules" | 9 | + size="small" |
| 10 | - > | 10 | + :disabled="disable" |
| 11 | - <el-form-item label="航班号" prop="purposeOfFlightNo"> | 11 | + :rules="rules" |
| 12 | - <el-input | 12 | + > |
| 13 | - v-model.trim="form.purposeOfFlightNo" | 13 | + <el-form-item label="航班号" prop="purposeOfFlightNo"> |
| 14 | - style="width: 30%" | 14 | + <el-input |
| 15 | - :disabled="nameDisabled" | 15 | + v-model.trim="form.purposeOfFlightNo" |
| 16 | - ></el-input> | 16 | + style="width: 30%" |
| 17 | - </el-form-item> | 17 | + :disabled="nameDisabled" |
| 18 | + ></el-input> | ||
| 19 | + </el-form-item> | ||
| 18 | 20 | ||
| 19 | - <el-form-item > | 21 | + <el-form-item> |
| 20 | - <el-alert | 22 | + <el-alert |
| 21 | - title="提示:站点之间用回车符分隔" | 23 | + title="提示:站点之间用回车符分隔" |
| 22 | - type="warning" | 24 | + type="warning" |
| 23 | - show-icon | 25 | + show-icon |
| 24 | - size="small" | 26 | + size="small" |
| 25 | - :closable="false" | 27 | + :closable="false" |
| 26 | - style="height: 30px;width:fit-content" | 28 | + style="height: 30px; width: fit-content" |
| 27 | - > | 29 | + > |
| 28 | - </el-alert> | 30 | + </el-alert> |
| 29 | - </el-form-item> | 31 | + </el-form-item> |
| 30 | - <el-row :gutter="20"> | 32 | + <el-row :gutter="20"> |
| 31 | - <el-col :span="10"> | 33 | + <el-col :span="10"> |
| 32 | - <el-form-item label="站点包含"> | 34 | + <el-form-item label="站点包含"> |
| 33 | - <!-- <el-alert title="提示:站点之间用回车符分隔" type="info" show-icon size="small" :closable="false" style="height:30px; margin-buttom"> </el-alert> --> | 35 | + <!-- <el-alert title="提示:站点之间用回车符分隔" type="info" show-icon size="small" :closable="false" style="height:30px; margin-buttom"> </el-alert> --> |
| 34 | - <el-input | 36 | + <el-input |
| 35 | - type="textarea" | 37 | + type="textarea" |
| 36 | - v-model="form.location" | 38 | + v-model="form.location" |
| 37 | - :rows="6" | 39 | + :rows="6" |
| 38 | - resize="none" | 40 | + resize="none" |
| 39 | - ></el-input> | 41 | + ></el-input> |
| 40 | - </el-form-item> | 42 | + </el-form-item> |
| 41 | - </el-col> | 43 | + </el-col> |
| 42 | - <el-col :span="10"> | 44 | + <el-col :span="10"> |
| 43 | - <el-form-item label="站点不包含"> | 45 | + <el-form-item label="站点不包含"> |
| 44 | - <el-input | 46 | + <el-input |
| 45 | - type="textarea" | 47 | + type="textarea" |
| 46 | - v-model="form.notLocation" | 48 | + v-model="form.notLocation" |
| 47 | - :rows="6" | 49 | + :rows="6" |
| 48 | - resize="none" | 50 | + resize="none" |
| 49 | - ></el-input> | 51 | + ></el-input> |
| 50 | - </el-form-item> | 52 | + </el-form-item> |
| 51 | - </el-col> | 53 | + </el-col> |
| 52 | - </el-row> | 54 | + </el-row> |
| 53 | 55 | ||
| 54 | - <el-form-item > | 56 | + <el-form-item> |
| 55 | - <el-alert | 57 | + <el-alert |
| 56 | - title="提示:URSA之间用分号分隔,例:F2;F3;P_" | 58 | + title="提示:URSA之间用分号分隔,例:F2;F3;P_" |
| 57 | - type="warning" | 59 | + type="warning" |
| 58 | - show-icon | 60 | + show-icon |
| 59 | - size="small" | 61 | + size="small" |
| 60 | - :closable="false" | 62 | + :closable="false" |
| 61 | - style="height: 30px;width:fit-content" | 63 | + style="height: 30px; width: fit-content" |
| 62 | - > | 64 | + > |
| 63 | - </el-alert> | 65 | + </el-alert> |
| 64 | - </el-form-item> | 66 | + </el-form-item> |
| 65 | - <el-row :gutter="20"> | 67 | + <el-row :gutter="20"> |
| 66 | - <el-col :span="10"> | 68 | + <el-col :span="10"> |
| 67 | - <el-form-item label="URSA包含"> | 69 | + <el-form-item label="URSA包含"> |
| 68 | - <el-input | 70 | + <el-input |
| 69 | - type="textarea" | 71 | + type="textarea" |
| 70 | - v-model.trim="form.includeUrsa" | 72 | + v-model.trim="form.includeUrsa" |
| 71 | - :rows="6" | 73 | + :rows="6" |
| 72 | - resize="none" | 74 | + resize="none" |
| 73 | - ></el-input> | 75 | + ></el-input> |
| 74 | - </el-form-item> | 76 | + </el-form-item> |
| 75 | - </el-col> | 77 | + </el-col> |
| 76 | - <el-col :span="10"> | 78 | + <el-col :span="10"> |
| 77 | - <el-form-item label="URSA不包含"> | 79 | + <el-form-item label="URSA不包含"> |
| 78 | - <el-input | 80 | + <el-input |
| 79 | - type="textarea" | 81 | + type="textarea" |
| 80 | - v-model.trim="form.notIncludeUrsa" | 82 | + v-model.trim="form.notIncludeUrsa" |
| 81 | - :rows="6" | 83 | + :rows="6" |
| 82 | - resize="none" | 84 | + resize="none" |
| 83 | - ></el-input> | 85 | + ></el-input> |
| 84 | - </el-form-item> | 86 | + </el-form-item> |
| 85 | - </el-col> | 87 | + </el-col> |
| 86 | - </el-row> | 88 | + </el-row> |
| 87 | 89 | ||
| 88 | - <el-form-item label="件数"> | 90 | + <el-form-item label="件数"> |
| 89 | - <el-col :span="3"> | 91 | + <el-col :span="3"> |
| 90 | - <!-- <el-input v-model="form.minNumOfPieces"></el-input> --> | 92 | + <!-- <el-input v-model="form.minNumOfPieces"></el-input> --> |
| 91 | - <el-input-number | 93 | + <el-input-number |
| 92 | - v-model=" | 94 | + v-model=" |
| 93 | - form.minNumOfPieces == 0 | 95 | + form.minNumOfPieces == 0 |
| 94 | - ? (form.minNumOfPieces = undefined) | 96 | + ? (form.minNumOfPieces = undefined) |
| 95 | - : form.minNumOfPieces | 97 | + : form.minNumOfPieces |
| 96 | - " | 98 | + " |
| 97 | - :precision="0" | 99 | + :precision="0" |
| 98 | - :controls="false" | 100 | + :controls="false" |
| 99 | - style="width: 100%" | 101 | + style="width: 100%" |
| 100 | - ></el-input-number> | 102 | + ></el-input-number> |
| 101 | - </el-col> | 103 | + </el-col> |
| 102 | - <el-col style="text-align: center" :span="1">-</el-col> | 104 | + <el-col style="text-align: center" :span="1">-</el-col> |
| 103 | - <el-col :span="3"> | 105 | + <el-col :span="3"> |
| 104 | - <!-- <el-input v-model="form.maxNumOfPieces"></el-input> --> | 106 | + <!-- <el-input v-model="form.maxNumOfPieces"></el-input> --> |
| 105 | - <el-input-number | 107 | + <el-input-number |
| 106 | - v-model=" | 108 | + v-model=" |
| 107 | - form.maxNumOfPieces == 0 | 109 | + form.maxNumOfPieces == 0 |
| 108 | - ? (form.maxNumOfPieces = undefined) | 110 | + ? (form.maxNumOfPieces = undefined) |
| 109 | - : form.maxNumOfPieces | 111 | + : form.maxNumOfPieces |
| 110 | - " | 112 | + " |
| 111 | - :precision="0" | 113 | + :precision="0" |
| 112 | - :controls="false" | 114 | + :controls="false" |
| 113 | - style="width: 100%" | 115 | + style="width: 100%" |
| 114 | - :min="form.minNumOfPieces + 1" | 116 | + :min="form.minNumOfPieces + 1" |
| 115 | - ></el-input-number> | 117 | + ></el-input-number> |
| 116 | - </el-col> | 118 | + </el-col> |
| 117 | - </el-form-item> | 119 | + </el-form-item> |
| 118 | 120 | ||
| 119 | - <el-form-item label="重量"> | 121 | + <el-form-item label="重量"> |
| 120 | - <el-col :span="3"> | 122 | + <el-col :span="3"> |
| 121 | - <!-- <el-input v-model="form.minWeight"></el-input> --> | 123 | + <!-- <el-input v-model="form.minWeight"></el-input> --> |
| 122 | - <el-input-number | 124 | + <el-input-number |
| 123 | - v-model=" | 125 | + v-model=" |
| 124 | - form.minWeight == 0 | 126 | + form.minWeight == 0 |
| 125 | - ? (form.minWeight = undefined) | 127 | + ? (form.minWeight = undefined) |
| 126 | - : form.minWeight | 128 | + : form.minWeight |
| 127 | - " | 129 | + " |
| 128 | - :precision="2" | 130 | + :precision="2" |
| 129 | - :controls="false" | 131 | + :controls="false" |
| 130 | - style="width: 100%" | 132 | + style="width: 100%" |
| 131 | - ></el-input-number> | 133 | + ></el-input-number> |
| 132 | - </el-col> | 134 | + </el-col> |
| 133 | - <el-col :span="1" style="text-align: center"><span>Kg</span></el-col> | 135 | + <el-col :span="1" style="text-align: center"><span>Kg</span></el-col> |
| 134 | - <el-col style="text-align: center" :span="1">-</el-col> | 136 | + <el-col style="text-align: center" :span="1">-</el-col> |
| 135 | - <el-col :span="3"> | 137 | + <el-col :span="3"> |
| 136 | - <!-- <el-input v-model="form.maxWeight"></el-input> --> | 138 | + <!-- <el-input v-model="form.maxWeight"></el-input> --> |
| 137 | - <el-input-number | 139 | + <el-input-number |
| 138 | - v-model=" | 140 | + v-model=" |
| 139 | - form.maxWeight == 0 | 141 | + form.maxWeight == 0 |
| 140 | - ? (form.maxWeight = undefined) | 142 | + ? (form.maxWeight = undefined) |
| 141 | - : form.maxWeight | 143 | + : form.maxWeight |
| 142 | - " | 144 | + " |
| 143 | - :precision="2" | 145 | + :precision="2" |
| 144 | - :controls="false" | 146 | + :controls="false" |
| 145 | - style="width: 100%" | 147 | + style="width: 100%" |
| 146 | - :min="form.minWeight + 0.01" | 148 | + :min="form.minWeight + 0.01" |
| 147 | - ></el-input-number> | 149 | + ></el-input-number> |
| 148 | - </el-col> | 150 | + </el-col> |
| 149 | - <el-col :span="1" style="text-align: center"><span>Kg</span></el-col> | 151 | + <el-col :span="1" style="text-align: center"><span>Kg</span></el-col> |
| 150 | - </el-form-item> | 152 | + </el-form-item> |
| 151 | 153 | ||
| 152 | - <el-form-item label="申报类别"> | 154 | + <el-form-item label="申报类别"> |
| 153 | - <el-card shadow="never" style="width: 70%"> | 155 | + <el-card shadow="never" style="width: 70%"> |
| 154 | - <el-checkbox-group v-model="form.typeOfGoods"> | 156 | + <el-checkbox-group v-model="form.typeOfGoods"> |
| 155 | - <el-checkbox | 157 | + <el-checkbox |
| 156 | - v-for="item in cargoType" | 158 | + v-for="item in cargoType" |
| 157 | - :key="item.id" | 159 | + :key="item.id" |
| 158 | - :label="item.chineseName" | 160 | + :label="item.chineseName" |
| 159 | - :name="item.chineseName" | 161 | + :name="item.chineseName" |
| 160 | - ></el-checkbox> | 162 | + ></el-checkbox> |
| 161 | - </el-checkbox-group> | 163 | + </el-checkbox-group> |
| 162 | - </el-card> | 164 | + </el-card> |
| 163 | - </el-form-item> | 165 | + </el-form-item> |
| 164 | 166 | ||
| 165 | - <el-form-item label="货物类型"> | 167 | + <el-form-item label="货物类型"> |
| 166 | - <el-card shadow="never" style="width: 70%"> | 168 | + <el-card shadow="never" style="width: 70%"> |
| 167 | - <el-checkbox-group v-model="form.declarationCategory"> | 169 | + <el-checkbox-group v-model="form.declarationCategory"> |
| 168 | - <el-checkbox | 170 | + <el-checkbox |
| 169 | - v-for="item in cargoStatus" | 171 | + v-for="item in cargoStatus" |
| 170 | - :key="item.id" | 172 | + :key="item.id" |
| 171 | - :label="item.chineseName" | 173 | + :label="item.chineseName" |
| 172 | - :name="item.chineseName" | 174 | + :name="item.chineseName" |
| 173 | - ></el-checkbox> | 175 | + ></el-checkbox> |
| 174 | - </el-checkbox-group> | 176 | + </el-checkbox-group> |
| 175 | - </el-card> | 177 | + </el-card> |
| 176 | - </el-form-item> | 178 | + </el-form-item> |
| 177 | 179 | ||
| 178 | - <el-form-item label="Service Code"> | 180 | + <el-form-item label="Service Code"> |
| 179 | - <el-card shadow="never" style="width: 70%"> | 181 | + <el-card shadow="never" style="width: 70%"> |
| 180 | - <el-checkbox-group v-model="form.serviceCode"> | 182 | + <el-checkbox-group v-model="form.serviceCode"> |
| 181 | - <el-checkbox | 183 | + <el-checkbox |
| 182 | - v-for="item in serviceCode" | 184 | + v-for="item in serviceCode" |
| 183 | - :key="item.id" | 185 | + :key="item.id" |
| 184 | - :label="item.englishName" | 186 | + :label="item.englishName" |
| 185 | - :name="item.englishName" | 187 | + :name="item.englishName" |
| 186 | - ></el-checkbox> | 188 | + ></el-checkbox> |
| 187 | - </el-checkbox-group> | 189 | + </el-checkbox-group> |
| 188 | - </el-card> | 190 | + </el-card> |
| 189 | - </el-form-item> | 191 | + </el-form-item> |
| 190 | 192 | ||
| 191 | - <el-form-item label="Sub Category"> | 193 | + <el-form-item label="Sub Category"> |
| 192 | - <el-card shadow="never" style="width: 70%"> | 194 | + <el-card shadow="never" style="width: 70%"> |
| 193 | - <el-checkbox-group v-model="form.subCategory"> | 195 | + <el-checkbox-group v-model="form.subCategory"> |
| 194 | - <el-checkbox | 196 | + <el-checkbox |
| 195 | - v-for="item in subCategory" | 197 | + v-for="item in subCategory" |
| 196 | - :key="item.id" | 198 | + :key="item.id" |
| 197 | - :label="item.englishName" | 199 | + :label="item.englishName" |
| 198 | - :name="item.englishName" | 200 | + :name="item.englishName" |
| 199 | - ></el-checkbox> | 201 | + ></el-checkbox> |
| 200 | - </el-checkbox-group> | 202 | + </el-checkbox-group> |
| 201 | - </el-card> | 203 | + </el-card> |
| 202 | - </el-form-item> | 204 | + </el-form-item> |
| 203 | - </el-form> | 205 | + </el-form> |
| 204 | - <el-row style="margin-left: 200px"> | 206 | + <el-row style="margin-left: 200px"> |
| 205 | - <el-button | 207 | + <el-button |
| 206 | - type="primary" | 208 | + type="primary" |
| 207 | - size="small" | 209 | + size="small" |
| 208 | - v-if="$route.params.handle != 'detail'" | 210 | + v-if="$route.params.handle != 'detail'" |
| 209 | - @click="submit('form')" | 211 | + @click="submit('form')" |
| 210 | - :loading="btnLoading" | 212 | + :loading="btnLoading" |
| 211 | - > | 213 | + > |
| 212 | - <span v-if="$route.params.handle === 'add'">添加</span> | 214 | + <span v-if="$route.params.handle === 'add'">添加</span> |
| 213 | - <span v-else>保存</span> | 215 | + <span v-else>保存</span> |
| 214 | - </el-button> | 216 | + </el-button> |
| 215 | - <el-button size="small" @click="close">取消</el-button> | 217 | + <el-button size="small" @click="close">取消</el-button> |
| 216 | - </el-row> | 218 | + </el-row> |
| 219 | + </template> | ||
| 217 | </div> | 220 | </div> |
| 218 | </template> | 221 | </template> |
| 219 | 222 | ||
| ... | @@ -248,9 +251,10 @@ export default { | ... | @@ -248,9 +251,10 @@ export default { |
| 248 | serviceCode: [], | 251 | serviceCode: [], |
| 249 | subCategory: [], | 252 | subCategory: [], |
| 250 | disable: false, | 253 | disable: false, |
| 251 | - nameDisabled:false, | 254 | + nameDisabled: false, |
| 252 | btnLoading: false, | 255 | btnLoading: false, |
| 253 | loading: true, | 256 | loading: true, |
| 257 | + isEmpty: false, | ||
| 254 | }; | 258 | }; |
| 255 | }, | 259 | }, |
| 256 | methods: { | 260 | methods: { |
| ... | @@ -345,6 +349,9 @@ export default { | ... | @@ -345,6 +349,9 @@ export default { |
| 345 | message: response.msg, | 349 | message: response.msg, |
| 346 | type: "error", | 350 | type: "error", |
| 347 | }); | 351 | }); |
| 352 | + this.isEmpty = true; | ||
| 353 | + } else if (response.data == null) { | ||
| 354 | + this.isEmpty = true; | ||
| 348 | } else { | 355 | } else { |
| 349 | let info = response.data; | 356 | let info = response.data; |
| 350 | info.typeOfGoods = info.typeOfGoods | 357 | info.typeOfGoods = info.typeOfGoods |
| ... | @@ -372,6 +379,7 @@ export default { | ... | @@ -372,6 +379,7 @@ export default { |
| 372 | message: response.msg, | 379 | message: response.msg, |
| 373 | type: "error", | 380 | type: "error", |
| 374 | }); | 381 | }); |
| 382 | + this.isEmpty = true; | ||
| 375 | } else { | 383 | } else { |
| 376 | let info = response.data.list; | 384 | let info = response.data.list; |
| 377 | info.typeOfGoods = info.typeOfGoods | 385 | info.typeOfGoods = info.typeOfGoods | ... | ... |
-
Please register or login to post a comment