Showing
7 changed files
with
491 additions
and
53 deletions
| ... | @@ -38,7 +38,7 @@ export function searchList(data) { | ... | @@ -38,7 +38,7 @@ export function searchList(data) { |
| 38 | // 搜索订单号 | 38 | // 搜索订单号 |
| 39 | export function searchOrderNo(data) { | 39 | export function searchOrderNo(data) { |
| 40 | return request({ | 40 | return request({ |
| 41 | - url: "/bus-customer/mockReceipt/searchOrderNo", | 41 | + url: "/bus-customer/mockReceipt/searchLogisticsNo", |
| 42 | method: "get", | 42 | method: "get", |
| 43 | params: data, | 43 | params: data, |
| 44 | }); | 44 | }); | ... | ... |
This diff is collapsed. Click to expand it.
| 1 | - | 1 | +const TokenKey = "Ecom-Token"; |
| 2 | -const TokenKey = 'Ecom-Token' | 2 | +export const auth_code = "PERMISSION_AUTH_CODE"; |
| 3 | - | ||
| 4 | export function getToken() { | 3 | export function getToken() { |
| 5 | - return localStorage.getItem(TokenKey) | 4 | + return localStorage.getItem(TokenKey); |
| 6 | // return sessionStorage.getItem(TokenKey) | 5 | // return sessionStorage.getItem(TokenKey) |
| 7 | } | 6 | } |
| 8 | 7 | ||
| 9 | export function setToken(token) { | 8 | export function setToken(token) { |
| 10 | - setTime(new Date().getTime()) | 9 | + setTime(new Date().getTime()); |
| 11 | - return localStorage.setItem(TokenKey, token) | 10 | + return localStorage.setItem(TokenKey, token); |
| 12 | // return sessionStorage.setItem(TokenKey, token) | 11 | // return sessionStorage.setItem(TokenKey, token) |
| 13 | } | 12 | } |
| 14 | 13 | ||
| 15 | export function removeToken() { | 14 | export function removeToken() { |
| 16 | - sessionStorage.removeItem('magicFcl') | 15 | + sessionStorage.removeItem("magicFcl"); |
| 17 | - return localStorage.removeItem(TokenKey) | 16 | + return localStorage.removeItem(TokenKey); |
| 18 | // return sessionStorage.removeItem(TokenKey) | 17 | // return sessionStorage.removeItem(TokenKey) |
| 19 | } | 18 | } |
| 20 | 19 | ||
| 21 | export function getUserId() { | 20 | export function getUserId() { |
| 22 | - return localStorage.getItem('EcomUser') | 21 | + return localStorage.getItem("EcomUser"); |
| 23 | // return sessionStorage.getItem(TokenKey) | 22 | // return sessionStorage.getItem(TokenKey) |
| 24 | } | 23 | } |
| 25 | 24 | ||
| 26 | export function setUserId(id) { | 25 | export function setUserId(id) { |
| 27 | - return localStorage.setItem('EcomUser', id) | 26 | + return localStorage.setItem("EcomUser", id); |
| 28 | // return sessionStorage.setItem(TokenKey, token) | 27 | // return sessionStorage.setItem(TokenKey, token) |
| 29 | } | 28 | } |
| 30 | 29 | ||
| 31 | export function removeUserId() { | 30 | export function removeUserId() { |
| 32 | - return localStorage.removeItem('EcomUser') | 31 | + return localStorage.removeItem("EcomUser"); |
| 33 | // return sessionStorage.getItem(TokenKey) | 32 | // return sessionStorage.getItem(TokenKey) |
| 34 | } | 33 | } |
| 35 | 34 | ||
| 36 | export function setCookie(cookie) { | 35 | export function setCookie(cookie) { |
| 37 | - return localStorage.setItem('EcomLoginTIp', cookie) | 36 | + return localStorage.setItem("EcomLoginTIp", cookie); |
| 38 | } | 37 | } |
| 39 | 38 | ||
| 40 | export function getCookie() { | 39 | export function getCookie() { |
| 41 | - return localStorage.getItem('EcomLoginTIp') | 40 | + return localStorage.getItem("EcomLoginTIp"); |
| 42 | } | 41 | } |
| 43 | 42 | ||
| 44 | export function setTime(date) { | 43 | export function setTime(date) { |
| 45 | - return localStorage.setItem('EcomLoginTime', date) | 44 | + return localStorage.setItem("EcomLoginTime", date); |
| 46 | } | 45 | } |
| 47 | 46 | ||
| 48 | export function getTime() { | 47 | export function getTime() { |
| 49 | - return localStorage.getItem('EcomLoginTime') | 48 | + return localStorage.getItem("EcomLoginTime"); |
| 50 | } | 49 | } |
| 51 | 50 | ||
| 52 | export function removeTime() { | 51 | export function removeTime() { |
| 53 | - return localStorage.removeItem('EcomLoginTime') | 52 | + return localStorage.removeItem("EcomLoginTime"); |
| 54 | } | 53 | } |
| 55 | 54 | ||
| 56 | export function setLoginType(type) { | 55 | export function setLoginType(type) { |
| 57 | - return sessionStorage.setItem('magicFcl', type) | 56 | + return sessionStorage.setItem("magicFcl", type); |
| 58 | } | 57 | } |
| 59 | 58 | ||
| 60 | export function getLoginType() { | 59 | export function getLoginType() { |
| 61 | - return sessionStorage.getItem('magicFcl') | 60 | + return sessionStorage.getItem("magicFcl"); |
| 62 | } | 61 | } |
| 63 | 62 | ||
| 64 | export function removeLoginType() { | 63 | export function removeLoginType() { |
| 65 | - return sessionStorage.removeItem('magicFcl') | 64 | + return sessionStorage.removeItem("magicFcl"); |
| 66 | } | 65 | } |
| 67 | 66 | ||
| 68 | export function setEntrySreachType(type) { | 67 | export function setEntrySreachType(type) { |
| 69 | - return sessionStorage.setItem('sreachEntryType', type) | 68 | + return sessionStorage.setItem("sreachEntryType", type); |
| 70 | } | 69 | } |
| 71 | 70 | ||
| 72 | export function getEntrySreachType() { | 71 | export function getEntrySreachType() { |
| 73 | - return sessionStorage.getItem('sreachEntryType') | 72 | + return sessionStorage.getItem("sreachEntryType"); |
| 74 | } | 73 | } |
| 75 | 74 | ||
| 76 | export function removeEntrySreachType() { | 75 | export function removeEntrySreachType() { |
| 77 | - return sessionStorage.removeItem('sreachEntryType') | ||
| 78 | -} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 76 | + return sessionStorage.removeItem("sreachEntryType"); | ||
| 77 | +} | ||
| 78 | + | ||
| 79 | +// 用于解放权限 | ||
| 80 | +export function removeAuthCode() { | ||
| 81 | + return localStorage.removeItem(auth_code); | ||
| 82 | +} | ||
| 83 | + | ||
| 84 | +// 获取权限 并判断传进来的code 是否有权限 | ||
| 85 | +export function isHasAuth(code) { | ||
| 86 | + const authCode = localStorage.getItem(auth_code); | ||
| 87 | + const stored = authCode ? JSON.parse(authCode) : []; | ||
| 88 | + console.log(stored); | ||
| 89 | + | ||
| 90 | + if (stored.includes(code)) { | ||
| 91 | + return true; | ||
| 92 | + } else { | ||
| 93 | + return false; | ||
| 94 | + } | ||
| 95 | +} | ... | ... |
src/views/exportListDetail/dialog.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <el-dialog | ||
| 3 | + class="entryDialog classCUploadDialog" | ||
| 4 | + title="新增模拟回执管理" | ||
| 5 | + :visible.sync="outerVisible" | ||
| 6 | + :show-close="false" | ||
| 7 | + width="960px" | ||
| 8 | + :close-on-click-modal="false" | ||
| 9 | + :destroy-on-close="true" | ||
| 10 | + v-loading="loadings.dialogLoading" | ||
| 11 | + @close="close(false)" | ||
| 12 | + > | ||
| 13 | + <div class="modelItem"> | ||
| 14 | + <el-form | ||
| 15 | + class="fedexFormStyle" | ||
| 16 | + ref="formData" | ||
| 17 | + :model="formData" | ||
| 18 | + :rules="rules" | ||
| 19 | + label-position="top" | ||
| 20 | + size="small" | ||
| 21 | + > | ||
| 22 | + <el-row :gutter="5"> | ||
| 23 | + <el-col :span="8"> | ||
| 24 | + <Formitem label="回执类型" prop="receiptType" type="edit"> | ||
| 25 | + <el-select | ||
| 26 | + type="text" | ||
| 27 | + id="inputInner-edit-receiptType" | ||
| 28 | + v-model="formData.receiptType" | ||
| 29 | + clearable | ||
| 30 | + filterable | ||
| 31 | + placeholder="" | ||
| 32 | + @change="getOrderList" | ||
| 33 | + > | ||
| 34 | + <el-option | ||
| 35 | + v-for="item in receiptTypeList" | ||
| 36 | + :key="item.value" | ||
| 37 | + :label="item.itemChineseName" | ||
| 38 | + :value="item.itemValue" | ||
| 39 | + ></el-option> | ||
| 40 | + </el-select> | ||
| 41 | + </Formitem> | ||
| 42 | + </el-col> | ||
| 43 | + <el-col :span="8"> | ||
| 44 | + <Formitem label="物流运单编号" prop="logisticsNo" type="edit"> | ||
| 45 | + <el-select | ||
| 46 | + type="text" | ||
| 47 | + id="inputInner-edit-logisticsNo" | ||
| 48 | + v-model="formData.logisticsNo" | ||
| 49 | + :remote="true" | ||
| 50 | + clearable | ||
| 51 | + filterable | ||
| 52 | + collapse-tags | ||
| 53 | + :remote-method="remoteMethod" | ||
| 54 | + placeholder="" | ||
| 55 | + @change="receiptXml" | ||
| 56 | + class="order-select-warp-ol" | ||
| 57 | + > | ||
| 58 | + <el-option | ||
| 59 | + v-for="item in orderNoList" | ||
| 60 | + :key="item" | ||
| 61 | + :label="item" | ||
| 62 | + :value="item" | ||
| 63 | + ></el-option> | ||
| 64 | + </el-select> | ||
| 65 | + </Formitem> | ||
| 66 | + </el-col> | ||
| 67 | + <el-col :span="8"> | ||
| 68 | + <Formitem label="回执状态" prop="receiptStatus" type="edit"> | ||
| 69 | + <el-select | ||
| 70 | + type="text" | ||
| 71 | + id="inputInner-edit-receiptStatus" | ||
| 72 | + v-model="formData.receiptStatus" | ||
| 73 | + clearable | ||
| 74 | + filterable | ||
| 75 | + placeholder="" | ||
| 76 | + @change="receiptXml" | ||
| 77 | + > | ||
| 78 | + <el-option | ||
| 79 | + v-for="item in receiptStatusList" | ||
| 80 | + :key="item.itemValue" | ||
| 81 | + :label="item.itemChineseName" | ||
| 82 | + :value="item.itemValue" | ||
| 83 | + ></el-option> | ||
| 84 | + </el-select> | ||
| 85 | + </Formitem> | ||
| 86 | + </el-col> | ||
| 87 | + </el-row> | ||
| 88 | + <el-row :gutter="5" v-if="formData.receiptType == 'list'"> | ||
| 89 | + <el-col :span="8"> | ||
| 90 | + <Formitem label="电子口岸编号" prop="preNo" type="edit"> | ||
| 91 | + <el-input | ||
| 92 | + type="text" | ||
| 93 | + class="inputShadow" | ||
| 94 | + id="inputInner-edit-preNo" | ||
| 95 | + resize="none" | ||
| 96 | + v-model="formData.preNo" | ||
| 97 | + clearable | ||
| 98 | + placeholder="" | ||
| 99 | + @blur="receiptXml" | ||
| 100 | + ></el-input> | ||
| 101 | + </Formitem> | ||
| 102 | + </el-col> | ||
| 103 | + <el-col :span="8"> | ||
| 104 | + <Formitem label="清单编号" prop="invtNo" type="edit"> | ||
| 105 | + <el-input | ||
| 106 | + type="text" | ||
| 107 | + class="inputShadow" | ||
| 108 | + id="inputInner-edit-invtNo" | ||
| 109 | + resize="none" | ||
| 110 | + v-model="formData.invtNo" | ||
| 111 | + clearable | ||
| 112 | + placeholder="" | ||
| 113 | + @blur="receiptXml" | ||
| 114 | + ></el-input> | ||
| 115 | + </Formitem> | ||
| 116 | + </el-col> | ||
| 117 | + </el-row> | ||
| 118 | + <el-row :gutter="5"> | ||
| 119 | + <el-col :span="24"> | ||
| 120 | + <!-- <Formitem label="回执文本" prop="receiptInfo" type="edit"> | ||
| 121 | + <el-input | ||
| 122 | + type="textarea" | ||
| 123 | + :rows="4" | ||
| 124 | + class="inputShadow" | ||
| 125 | + id="inputInner-edit-receiptInfo" | ||
| 126 | + resize="none" | ||
| 127 | + v-model="formData.receiptInfo" | ||
| 128 | + clearable | ||
| 129 | + placeholder="" | ||
| 130 | + ></el-input> | ||
| 131 | + </Formitem> --> | ||
| 132 | + <div class="textarea-text"> | ||
| 133 | + <div style="color: #777777; margin-bottom: 10px">回执文本</div> | ||
| 134 | + <el-input | ||
| 135 | + type="textarea" | ||
| 136 | + :rows="4" | ||
| 137 | + class="inputShadow" | ||
| 138 | + resize="none" | ||
| 139 | + :readonly="true" | ||
| 140 | + v-model="receiptInfo" | ||
| 141 | + ></el-input> | ||
| 142 | + </div> | ||
| 143 | + </el-col> | ||
| 144 | + </el-row> | ||
| 145 | + </el-form> | ||
| 146 | + </div> | ||
| 147 | + <div class="dialogOption entrySave"> | ||
| 148 | + <el-button | ||
| 149 | + class="entrySaveButton" | ||
| 150 | + :disabled="loadings.submitLoading" | ||
| 151 | + @click="submit" | ||
| 152 | + >确 定</el-button | ||
| 153 | + > | ||
| 154 | + <el-button class="entrySaveButton" @click="close(false)">关 闭</el-button> | ||
| 155 | + </div> | ||
| 156 | + </el-dialog> | ||
| 157 | +</template> | ||
| 158 | + | ||
| 159 | +<script> | ||
| 160 | +import { | ||
| 161 | + searchOrderNo, | ||
| 162 | + generateReceiptXml, | ||
| 163 | + addInfo, | ||
| 164 | +} from "@/api/receiptManagement-api.js"; | ||
| 165 | +export default { | ||
| 166 | + props: { | ||
| 167 | + outerVisible: { | ||
| 168 | + type: Boolean, | ||
| 169 | + default: false, | ||
| 170 | + }, | ||
| 171 | + receiptStatusList: { | ||
| 172 | + type: Array, | ||
| 173 | + default: () => { | ||
| 174 | + return []; | ||
| 175 | + }, | ||
| 176 | + }, | ||
| 177 | + receiptTypeList: { | ||
| 178 | + type: Array, | ||
| 179 | + default: () => { | ||
| 180 | + return []; | ||
| 181 | + }, | ||
| 182 | + }, | ||
| 183 | + logisticsNo: { | ||
| 184 | + type: String, | ||
| 185 | + default: "", | ||
| 186 | + }, | ||
| 187 | + }, | ||
| 188 | + | ||
| 189 | + watch: { | ||
| 190 | + outerVisible(val) { | ||
| 191 | + console.log(val); | ||
| 192 | + if (val) { | ||
| 193 | + this.formData.logisticsNo = this.logisticsNo; | ||
| 194 | + this.formData.receiptType = "list"; | ||
| 195 | + } | ||
| 196 | + }, | ||
| 197 | + }, | ||
| 198 | + | ||
| 199 | + data() { | ||
| 200 | + return { | ||
| 201 | + formData: { | ||
| 202 | + receiptType: "", | ||
| 203 | + logisticsNo: "", | ||
| 204 | + receiptStatus: "", | ||
| 205 | + preNo: "", | ||
| 206 | + invtNo: "", | ||
| 207 | + }, | ||
| 208 | + receiptInfo: "", | ||
| 209 | + rules: { | ||
| 210 | + receiptType: [ | ||
| 211 | + { | ||
| 212 | + required: true, | ||
| 213 | + trigger: "blur", | ||
| 214 | + message: "请选择回执类型!", | ||
| 215 | + }, | ||
| 216 | + ], | ||
| 217 | + logisticsNo: [ | ||
| 218 | + { | ||
| 219 | + required: true, | ||
| 220 | + trigger: "blur", | ||
| 221 | + message: "物流运单编号不能为空!", | ||
| 222 | + }, | ||
| 223 | + ], | ||
| 224 | + receiptStatus: [ | ||
| 225 | + { | ||
| 226 | + required: true, | ||
| 227 | + trigger: "blur", | ||
| 228 | + message: "请选择回执状态!", | ||
| 229 | + }, | ||
| 230 | + ], | ||
| 231 | + preNo: [ | ||
| 232 | + { | ||
| 233 | + required: true, | ||
| 234 | + trigger: "blur", | ||
| 235 | + message: "电子口岸编号不能为空!", | ||
| 236 | + }, | ||
| 237 | + ], | ||
| 238 | + invtNo: [ | ||
| 239 | + { | ||
| 240 | + required: true, | ||
| 241 | + trigger: "blur", | ||
| 242 | + message: "清单编号不能为空!", | ||
| 243 | + }, | ||
| 244 | + ], | ||
| 245 | + }, | ||
| 246 | + orderNoList: [], | ||
| 247 | + loadings: { | ||
| 248 | + dialogLoading: false, | ||
| 249 | + submitLoading: false, | ||
| 250 | + }, | ||
| 251 | + loadingText: "", | ||
| 252 | + }; | ||
| 253 | + }, | ||
| 254 | + | ||
| 255 | + methods: { | ||
| 256 | + // 生成xml | ||
| 257 | + receiptXml() { | ||
| 258 | + if (!this.formData.receiptType) { | ||
| 259 | + return; | ||
| 260 | + } | ||
| 261 | + if (!this.formData.logisticsNo) { | ||
| 262 | + return; | ||
| 263 | + } | ||
| 264 | + if (!this.formData.receiptStatus) { | ||
| 265 | + return; | ||
| 266 | + } | ||
| 267 | + if (!this.formData.preNo) { | ||
| 268 | + return; | ||
| 269 | + } | ||
| 270 | + if (!this.formData.invtNo) { | ||
| 271 | + return; | ||
| 272 | + } | ||
| 273 | + generateReceiptXml({ | ||
| 274 | + ...this.formData, | ||
| 275 | + logisticsNo: this.formData.logisticsNo, | ||
| 276 | + }).then((res) => { | ||
| 277 | + console.log(res); | ||
| 278 | + if (res.code === "200") { | ||
| 279 | + this.receiptInfo = res.data; | ||
| 280 | + } else { | ||
| 281 | + this.alertWarningMsg(res.message); | ||
| 282 | + } | ||
| 283 | + }); | ||
| 284 | + }, | ||
| 285 | + remoteMethod(query) { | ||
| 286 | + console.log(query); | ||
| 287 | + this.getOrderList(query, true); | ||
| 288 | + }, | ||
| 289 | + getOrderList(val, flag) { | ||
| 290 | + if (!this.formData.receiptType) { | ||
| 291 | + return; | ||
| 292 | + } | ||
| 293 | + searchOrderNo({ | ||
| 294 | + receiptType: this.formData.receiptType, | ||
| 295 | + logisticsNo: flag ? val : "", | ||
| 296 | + }).then((res) => { | ||
| 297 | + if (res.code === "200") { | ||
| 298 | + this.orderNoList = res.data; | ||
| 299 | + } else { | ||
| 300 | + this.alertWarningMsg(res.message); | ||
| 301 | + } | ||
| 302 | + }); | ||
| 303 | + this.receiptXml(); | ||
| 304 | + }, | ||
| 305 | + //数据保存 | ||
| 306 | + submit() { | ||
| 307 | + let obj = { | ||
| 308 | + ...this.formData, | ||
| 309 | + }; | ||
| 310 | + this.$refs.formData.validate((valid) => { | ||
| 311 | + if (valid) { | ||
| 312 | + this.addapi({ | ||
| 313 | + ...obj, | ||
| 314 | + logisticsNos: [this.formData.logisticsNo], | ||
| 315 | + }); | ||
| 316 | + } | ||
| 317 | + }); | ||
| 318 | + }, | ||
| 319 | + //新增 | ||
| 320 | + addapi(val) { | ||
| 321 | + this.loadings.dialogLoading = true; | ||
| 322 | + addInfo(val) | ||
| 323 | + .then((res) => { | ||
| 324 | + if (res.code === "200") { | ||
| 325 | + this.msgSuccess(res.message); | ||
| 326 | + this.close(true); | ||
| 327 | + } else { | ||
| 328 | + this.alertWarningMsg(res.message); | ||
| 329 | + } | ||
| 330 | + }) | ||
| 331 | + .catch((err) => { | ||
| 332 | + console.log(err); | ||
| 333 | + this.loadings.dialogLoading = false; | ||
| 334 | + }); | ||
| 335 | + }, | ||
| 336 | + | ||
| 337 | + close(flag) { | ||
| 338 | + this.formData = { | ||
| 339 | + receiptType: "", | ||
| 340 | + logisticsNo: "", | ||
| 341 | + receiptStatus: "", | ||
| 342 | + }; | ||
| 343 | + this.loadings.dialogLoading = false; | ||
| 344 | + this.receiptInfo = ""; | ||
| 345 | + this.$emit("close", flag); | ||
| 346 | + }, | ||
| 347 | + }, | ||
| 348 | +}; | ||
| 349 | +</script> | ||
| 350 | + | ||
| 351 | +<style lang="scss" scoped> | ||
| 352 | +@import "@/assets/styles/variables.scss"; | ||
| 353 | + | ||
| 354 | +.fedexFormStyle { | ||
| 355 | + .order-select-warp-ol { | ||
| 356 | + ::v-deep { | ||
| 357 | + .el-select__input { | ||
| 358 | + width: 35px !important; | ||
| 359 | + padding-top: 0 !important; | ||
| 360 | + } | ||
| 361 | + } | ||
| 362 | + } | ||
| 363 | +} | ||
| 364 | +</style> |
| ... | @@ -305,11 +305,10 @@ | ... | @@ -305,11 +305,10 @@ |
| 305 | ></el-input> | 305 | ></el-input> |
| 306 | </Formitem> | 306 | </Formitem> |
| 307 | </el-col> | 307 | </el-col> |
| 308 | - | ||
| 309 | </el-row> | 308 | </el-row> |
| 310 | <el-row :gutter="5"> | 309 | <el-row :gutter="5"> |
| 311 | - <!-- 贸易方式 --> | 310 | + <!-- 贸易方式 --> |
| 312 | - <el-col :span="3"> | 311 | + <el-col :span="3"> |
| 313 | <Formitem label="贸易方式" prop="tradeMode"> | 312 | <Formitem label="贸易方式" prop="tradeMode"> |
| 314 | <el-select | 313 | <el-select |
| 315 | type="text" | 314 | type="text" |
| ... | @@ -440,11 +439,10 @@ | ... | @@ -440,11 +439,10 @@ |
| 440 | </el-select> | 439 | </el-select> |
| 441 | </Formitem> | 440 | </Formitem> |
| 442 | </el-col> | 441 | </el-col> |
| 443 | - | ||
| 444 | </el-row> | 442 | </el-row> |
| 445 | <el-row :gutter="5"> | 443 | <el-row :gutter="5"> |
| 446 | - <!-- 运费 --> | 444 | + <!-- 运费 --> |
| 447 | - <el-col :span="3"> | 445 | + <el-col :span="3"> |
| 448 | <Formitem label="运费" prop="freight"> | 446 | <Formitem label="运费" prop="freight"> |
| 449 | <el-input | 447 | <el-input |
| 450 | type="text" | 448 | type="text" |
| ... | @@ -575,11 +573,10 @@ | ... | @@ -575,11 +573,10 @@ |
| 575 | ></el-input> | 573 | ></el-input> |
| 576 | </Formitem> | 574 | </Formitem> |
| 577 | </el-col> | 575 | </el-col> |
| 578 | - | ||
| 579 | </el-row> | 576 | </el-row> |
| 580 | <el-row :gutter="5"> | 577 | <el-row :gutter="5"> |
| 581 | - <!-- 净重(公斤) --> | 578 | + <!-- 净重(公斤) --> |
| 582 | - <el-col :span="3"> | 579 | + <el-col :span="3"> |
| 583 | <Formitem label="净重(公斤)" prop="netWeight"> | 580 | <Formitem label="净重(公斤)" prop="netWeight"> |
| 584 | <el-input | 581 | <el-input |
| 585 | type="text" | 582 | type="text" |
| ... | @@ -696,12 +693,26 @@ | ... | @@ -696,12 +693,26 @@ |
| 696 | :class="{ entryTitle: true, titleBorder: logtableType ? false : true }" | 693 | :class="{ entryTitle: true, titleBorder: logtableType ? false : true }" |
| 697 | style="margin-top: 10px" | 694 | style="margin-top: 10px" |
| 698 | > | 695 | > |
| 699 | - <div> | 696 | + <div style="display: flex; justify-content: space-between; width: 100%"> |
| 700 | - 回执信息 | 697 | + <div> |
| 701 | - <el-button type="text" @click="hiddenLogTable"> | 698 | + 回执信息 |
| 702 | - <svg-icon v-if="logtableType" icon-class="downIcon"></svg-icon> | 699 | + <el-button type="text" @click="hiddenLogTable"> |
| 703 | - <svg-icon v-else icon-class="upIcon"></svg-icon> | 700 | + <svg-icon v-if="logtableType" icon-class="downIcon"></svg-icon> |
| 704 | - </el-button> | 701 | + <svg-icon v-else icon-class="upIcon"></svg-icon> |
| 702 | + </el-button> | ||
| 703 | + </div> | ||
| 704 | + <div> | ||
| 705 | + <template v-show="isHasAuth('queryMgr:exportList:add')"> | ||
| 706 | + <el-button | ||
| 707 | + class="entrySaveButton" | ||
| 708 | + icon="el-icon-plus" | ||
| 709 | + size="small" | ||
| 710 | + @click="outerVisible = true" | ||
| 711 | + > | ||
| 712 | + 新增模拟回执 | ||
| 713 | + </el-button> | ||
| 714 | + </template> | ||
| 715 | + </div> | ||
| 705 | </div> | 716 | </div> |
| 706 | </div> | 717 | </div> |
| 707 | <ReceiptInfoTable | 718 | <ReceiptInfoTable |
| ... | @@ -715,6 +726,14 @@ | ... | @@ -715,6 +726,14 @@ |
| 715 | :bodyHeader="detialHeaderData" | 726 | :bodyHeader="detialHeaderData" |
| 716 | /> | 727 | /> |
| 717 | <div style="margin-bottom: 20px; text-align: center"></div> | 728 | <div style="margin-bottom: 20px; text-align: center"></div> |
| 729 | + <!-- 新增模拟回执 --> | ||
| 730 | + <DialogVue | ||
| 731 | + :outerVisible="outerVisible" | ||
| 732 | + @close="dialogClose" | ||
| 733 | + :receiptStatusList="receiptStatusList" | ||
| 734 | + :receiptTypeList="receiptTypeList" | ||
| 735 | + :logisticsNo="formData.logisticsNo" | ||
| 736 | + /> | ||
| 718 | </div> | 737 | </div> |
| 719 | </template> | 738 | </template> |
| 720 | 739 | ||
| ... | @@ -722,13 +741,20 @@ | ... | @@ -722,13 +741,20 @@ |
| 722 | import ReceiptInfoTable from "../components/ReceiptInfoTable/index.vue"; | 741 | import ReceiptInfoTable from "../components/ReceiptInfoTable/index.vue"; |
| 723 | import ProductDetailTable from "../components/ProductDetailTable/index.vue"; | 742 | import ProductDetailTable from "../components/ProductDetailTable/index.vue"; |
| 724 | import { getListDetail } from "@/api/exportDetail-api.js"; | 743 | import { getListDetail } from "@/api/exportDetail-api.js"; |
| 744 | +import { getDictData } from "@/api/system/dict-api.js"; | ||
| 745 | + | ||
| 746 | +import DialogVue from "./dialog.vue"; | ||
| 747 | +import { isHasAuth } from "../../utils/auth"; | ||
| 748 | + | ||
| 725 | export default { | 749 | export default { |
| 726 | name: "", | 750 | name: "", |
| 727 | - components: { ProductDetailTable, ReceiptInfoTable }, | 751 | + components: { ProductDetailTable, ReceiptInfoTable, DialogVue }, |
| 728 | data() { | 752 | data() { |
| 729 | return { | 753 | return { |
| 730 | id: null, | 754 | id: null, |
| 731 | - formData: {}, | 755 | + formData: { |
| 756 | + logisticsNo: "", | ||
| 757 | + }, | ||
| 732 | logData: [], | 758 | logData: [], |
| 733 | logHeaderData: [ | 759 | logHeaderData: [ |
| 734 | { | 760 | { |
| ... | @@ -831,6 +857,9 @@ export default { | ... | @@ -831,6 +857,9 @@ export default { |
| 831 | entryLoading: false, | 857 | entryLoading: false, |
| 832 | }, | 858 | }, |
| 833 | logtableType: true, | 859 | logtableType: true, |
| 860 | + outerVisible: false, | ||
| 861 | + receiptStatusList: [], | ||
| 862 | + receiptTypeList: [], | ||
| 834 | }; | 863 | }; |
| 835 | }, | 864 | }, |
| 836 | created() { | 865 | created() { |
| ... | @@ -840,8 +869,36 @@ export default { | ... | @@ -840,8 +869,36 @@ export default { |
| 840 | } else { | 869 | } else { |
| 841 | this.back(); | 870 | this.back(); |
| 842 | } | 871 | } |
| 872 | + this.fetchReceiptStatus(); | ||
| 843 | }, | 873 | }, |
| 844 | methods: { | 874 | methods: { |
| 875 | + fetchReceiptStatus() { | ||
| 876 | + getDictData({ doctCode: "RECEIPT_TYPE" }) | ||
| 877 | + .then((res) => { | ||
| 878 | + if (res.code == "200") { | ||
| 879 | + this.receiptTypeList = res.data; | ||
| 880 | + } | ||
| 881 | + }) | ||
| 882 | + .catch((err) => { | ||
| 883 | + console.error(err); | ||
| 884 | + }); | ||
| 885 | + getDictData({ doctCode: "MOCK_RECEIPT_STATUS" }) | ||
| 886 | + .then((res) => { | ||
| 887 | + if (res.code == "200") { | ||
| 888 | + this.receiptStatusList = res.data; | ||
| 889 | + } | ||
| 890 | + }) | ||
| 891 | + .catch((err) => { | ||
| 892 | + console.error(err); | ||
| 893 | + }); | ||
| 894 | + }, | ||
| 895 | + dialogClose(flag = false) { | ||
| 896 | + this.outerVisible = false; | ||
| 897 | + if (flag) { | ||
| 898 | + // this.search(0); | ||
| 899 | + this.searchData(); | ||
| 900 | + } | ||
| 901 | + }, | ||
| 845 | searchData() { | 902 | searchData() { |
| 846 | this.loadings.entryLoading = true; | 903 | this.loadings.entryLoading = true; |
| 847 | getListDetail({ listId: this.id }) | 904 | getListDetail({ listId: this.id }) | ... | ... |
| ... | @@ -41,11 +41,11 @@ | ... | @@ -41,11 +41,11 @@ |
| 41 | </Formitem> | 41 | </Formitem> |
| 42 | </el-col> | 42 | </el-col> |
| 43 | <el-col :span="8"> | 43 | <el-col :span="8"> |
| 44 | - <Formitem label="订单编号" prop="orderNo" type="edit"> | 44 | + <Formitem label="物流运单编号" prop="logisticsNo" type="edit"> |
| 45 | <el-select | 45 | <el-select |
| 46 | type="text" | 46 | type="text" |
| 47 | - id="inputInner-edit-orderNo" | 47 | + id="inputInner-edit-logisticsNo" |
| 48 | - v-model="formData.orderNo" | 48 | + v-model="formData.logisticsNo" |
| 49 | :remote="true" | 49 | :remote="true" |
| 50 | clearable | 50 | clearable |
| 51 | filterable | 51 | filterable |
| ... | @@ -186,7 +186,7 @@ export default { | ... | @@ -186,7 +186,7 @@ export default { |
| 186 | return { | 186 | return { |
| 187 | formData: { | 187 | formData: { |
| 188 | receiptType: "", | 188 | receiptType: "", |
| 189 | - orderNo: "", | 189 | + logisticsNo: "", |
| 190 | receiptStatus: "", | 190 | receiptStatus: "", |
| 191 | preNo: "", | 191 | preNo: "", |
| 192 | invtNo: "", | 192 | invtNo: "", |
| ... | @@ -200,11 +200,11 @@ export default { | ... | @@ -200,11 +200,11 @@ export default { |
| 200 | message: "请选择回执类型!", | 200 | message: "请选择回执类型!", |
| 201 | }, | 201 | }, |
| 202 | ], | 202 | ], |
| 203 | - orderNo: [ | 203 | + logisticsNo: [ |
| 204 | { | 204 | { |
| 205 | required: true, | 205 | required: true, |
| 206 | trigger: "blur", | 206 | trigger: "blur", |
| 207 | - message: "订单编号不能为空!", | 207 | + message: "物流运单编号不能为空!", |
| 208 | }, | 208 | }, |
| 209 | ], | 209 | ], |
| 210 | receiptStatus: [ | 210 | receiptStatus: [ |
| ... | @@ -244,7 +244,7 @@ export default { | ... | @@ -244,7 +244,7 @@ export default { |
| 244 | if (!this.formData.receiptType) { | 244 | if (!this.formData.receiptType) { |
| 245 | return; | 245 | return; |
| 246 | } | 246 | } |
| 247 | - if (!this.formData.orderNo) { | 247 | + if (!this.formData.logisticsNo) { |
| 248 | return; | 248 | return; |
| 249 | } | 249 | } |
| 250 | if (!this.formData.receiptStatus) { | 250 | if (!this.formData.receiptStatus) { |
| ... | @@ -258,7 +258,7 @@ export default { | ... | @@ -258,7 +258,7 @@ export default { |
| 258 | } | 258 | } |
| 259 | generateReceiptXml({ | 259 | generateReceiptXml({ |
| 260 | ...this.formData, | 260 | ...this.formData, |
| 261 | - orderNo: this.formData.orderNo, | 261 | + logisticsNo: this.formData.logisticsNo, |
| 262 | }).then((res) => { | 262 | }).then((res) => { |
| 263 | console.log(res); | 263 | console.log(res); |
| 264 | if (res.code === "200") { | 264 | if (res.code === "200") { |
| ... | @@ -278,7 +278,7 @@ export default { | ... | @@ -278,7 +278,7 @@ export default { |
| 278 | } | 278 | } |
| 279 | searchOrderNo({ | 279 | searchOrderNo({ |
| 280 | receiptType: this.formData.receiptType, | 280 | receiptType: this.formData.receiptType, |
| 281 | - orderNo: flag ? val : "", | 281 | + logisticsNo: flag ? val : "", |
| 282 | }).then((res) => { | 282 | }).then((res) => { |
| 283 | if (res.code === "200") { | 283 | if (res.code === "200") { |
| 284 | this.orderNoList = res.data; | 284 | this.orderNoList = res.data; |
| ... | @@ -297,7 +297,7 @@ export default { | ... | @@ -297,7 +297,7 @@ export default { |
| 297 | if (valid) { | 297 | if (valid) { |
| 298 | this.addapi({ | 298 | this.addapi({ |
| 299 | ...obj, | 299 | ...obj, |
| 300 | - orderNo: [this.formData.orderNo], | 300 | + logisticsNos: [this.formData.logisticsNo], |
| 301 | }); | 301 | }); |
| 302 | } | 302 | } |
| 303 | }); | 303 | }); |
| ... | @@ -323,7 +323,7 @@ export default { | ... | @@ -323,7 +323,7 @@ export default { |
| 323 | close(flag) { | 323 | close(flag) { |
| 324 | this.formData = { | 324 | this.formData = { |
| 325 | receiptType: "", | 325 | receiptType: "", |
| 326 | - orderNo: "", | 326 | + logisticsNo: "", |
| 327 | receiptStatus: "", | 327 | receiptStatus: "", |
| 328 | }; | 328 | }; |
| 329 | this.loadings.dialogLoading = false; | 329 | this.loadings.dialogLoading = false; | ... | ... |
-
Please register or login to post a comment