Showing
4 changed files
with
714 additions
and
642 deletions
| ... | @@ -31,9 +31,16 @@ | ... | @@ -31,9 +31,16 @@ |
| 31 | :pageSizes="[20, 30, 50, 100]" | 31 | :pageSizes="[20, 30, 50, 100]" |
| 32 | :totalCount="0" | 32 | :totalCount="0" |
| 33 | :loading="tableLoading" | 33 | :loading="tableLoading" |
| 34 | - :emptyText="(loadingDatas && !rowData.popoverData.length) ? '数据加载中' : $t('portEntry.emptyText')" | 34 | + :emptyText=" |
| 35 | - height="350px" | 35 | + loadingDatas && |
| 36 | - maxHeight="500px" | 36 | + rowData && |
| 37 | + rowData.popoverData && | ||
| 38 | + !rowData.popoverData.length | ||
| 39 | + ? '数据加载中' | ||
| 40 | + : $t('portEntry.emptyText') | ||
| 41 | + " | ||
| 42 | + :height="tableHeight + 'px'" | ||
| 43 | + :maxHeight="tableHeight + 'px'" | ||
| 37 | rowKey="id" | 44 | rowKey="id" |
| 38 | > | 45 | > |
| 39 | </Table> | 46 | </Table> |
| ... | @@ -82,20 +89,31 @@ export default { | ... | @@ -82,20 +89,31 @@ export default { |
| 82 | }, | 89 | }, |
| 83 | data() { | 90 | data() { |
| 84 | return { | 91 | return { |
| 85 | - tableLoading: false | 92 | + tableLoading: false, |
| 93 | + tableHeight: 350, | ||
| 86 | }; | 94 | }; |
| 87 | }, | 95 | }, |
| 88 | - computed:{ | 96 | + computed: { |
| 89 | - loadingDatas(){ | 97 | + loadingDatas() { |
| 90 | - return this.$store.state.viewOption.loadingDatas | 98 | + return this.$store.state.viewOption.loadingDatas; |
| 91 | - } | 99 | + }, |
| 100 | + }, | ||
| 101 | + mounted() { | ||
| 102 | + this.calculateTableHeight(); | ||
| 103 | + window.addEventListener("resize", this.calculateTableHeight); | ||
| 104 | + }, | ||
| 105 | + beforeDestroy() { | ||
| 106 | + window.removeEventListener("resize", this.calculateTableHeight); | ||
| 92 | }, | 107 | }, |
| 93 | methods: { | 108 | methods: { |
| 109 | + calculateTableHeight() { | ||
| 110 | + this.tableHeight = window.innerHeight - 300; | ||
| 111 | + }, | ||
| 94 | //弹框关闭 | 112 | //弹框关闭 |
| 95 | popoverClose() { | 113 | popoverClose() { |
| 96 | this.$emit("popoverClose"); | 114 | this.$emit("popoverClose"); |
| 97 | this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY = "auto"; | 115 | this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY = "auto"; |
| 98 | - this.$store.dispatch('setLoadingState', true) | 116 | + this.$store.dispatch("setLoadingState", true); |
| 99 | }, | 117 | }, |
| 100 | //弹框状态改版 | 118 | //弹框状态改版 |
| 101 | popoverChange(data, type) { | 119 | popoverChange(data, type) { | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | - <div style="height: 100%;"> | 2 | + <div style="height: 100%"> |
| 3 | - <el-form | 3 | + <el-form |
| 4 | - class="fedexFormStyle fedexRowEditFormStyle" | 4 | + class="fedexFormStyle fedexRowEditFormStyle" |
| 5 | - ref="editRowForm" | 5 | + ref="editRowForm" |
| 6 | - :model="tableRowformData" | 6 | + :model="tableRowformData" |
| 7 | - :rules="tableRowFormRules" | 7 | + :rules="tableRowFormRules" |
| 8 | - label-position="top" | 8 | + label-position="top" |
| 9 | - size="small" | 9 | + size="small" |
| 10 | - > | 10 | + > |
| 11 | - <el-row :gutter="5"> | 11 | + <el-row :gutter="5"> |
| 12 | - <el-col :span="4"> | 12 | + <el-col :span="4"> |
| 13 | - <Formitem label="企业商品货号" prop="enterpriseProductCode"> | 13 | + <Formitem label="企业商品货号" prop="enterpriseProductCode"> |
| 14 | - <el-input | 14 | + <el-input |
| 15 | - type="text" | 15 | + type="text" |
| 16 | - class="inputShadow" | 16 | + class="inputShadow" |
| 17 | - id="inputInner--enterpriseProductCode" | 17 | + id="inputInner--enterpriseProductCode" |
| 18 | - resize="none" | 18 | + resize="none" |
| 19 | - v-model="tableRowformData.enterpriseProductCode" | 19 | + v-model="tableRowformData.enterpriseProductCode" |
| 20 | - clearable | 20 | + clearable |
| 21 | - placeholder="" | 21 | + placeholder="" |
| 22 | - ></el-input> | 22 | + ></el-input> |
| 23 | - </Formitem> | 23 | + </Formitem> |
| 24 | - </el-col> | 24 | + </el-col> |
| 25 | - <el-col :span="4"> | 25 | + <el-col :span="4"> |
| 26 | - <Formitem label="企业商品名称" prop="enterpriseProductName"> | 26 | + <Formitem label="企业商品名称" prop="enterpriseProductName"> |
| 27 | - <el-input | 27 | + <el-input |
| 28 | - type="text" | 28 | + type="text" |
| 29 | - class="inputShadow" | 29 | + class="inputShadow" |
| 30 | - id="inputInner--enterpriseProductName" | 30 | + id="inputInner--enterpriseProductName" |
| 31 | - resize="none" | 31 | + resize="none" |
| 32 | - v-model="tableRowformData.enterpriseProductName" | 32 | + v-model="tableRowformData.enterpriseProductName" |
| 33 | - clearable | 33 | + clearable |
| 34 | - placeholder="" | 34 | + placeholder="" |
| 35 | - ></el-input> | 35 | + ></el-input> |
| 36 | - </Formitem> | 36 | + </Formitem> |
| 37 | - </el-col> | 37 | + </el-col> |
| 38 | - <el-col :span="4"> | 38 | + <el-col :span="4"> |
| 39 | - <Formitem label="企业商品描述" prop="enterpriseProductDescribe"> | 39 | + <Formitem label="企业商品描述" prop="enterpriseProductDescribe"> |
| 40 | - <el-input | 40 | + <el-input |
| 41 | - type="textarea" | 41 | + type="textarea" |
| 42 | - class="inputShadow" | 42 | + class="inputShadow" |
| 43 | - id="inputInner--enterpriseProductDescribe" | 43 | + id="inputInner--enterpriseProductDescribe" |
| 44 | - resize="none" | 44 | + resize="none" |
| 45 | - v-model="tableRowformData.enterpriseProductDescribe" | 45 | + v-model="tableRowformData.enterpriseProductDescribe" |
| 46 | - clearable | 46 | + clearable |
| 47 | - placeholder="" | 47 | + placeholder="" |
| 48 | - ></el-input> | 48 | + ></el-input> |
| 49 | - </Formitem> | 49 | + </Formitem> |
| 50 | - </el-col> | 50 | + </el-col> |
| 51 | - <el-col :span="4"> | 51 | + <el-col :span="4"> |
| 52 | - <Formitem label="商品名称" prop="productName"> | 52 | + <Formitem label="商品名称" prop="productName"> |
| 53 | - <el-input | 53 | + <el-input |
| 54 | - type="text" | 54 | + type="text" |
| 55 | - class="inputShadow" | 55 | + class="inputShadow" |
| 56 | - id="inputInner--productName" | 56 | + id="inputInner--productName" |
| 57 | - resize="none" | 57 | + resize="none" |
| 58 | - v-model="tableRowformData.productName" | 58 | + v-model="tableRowformData.productName" |
| 59 | - clearable | 59 | + clearable |
| 60 | - placeholder="" | 60 | + placeholder="" |
| 61 | - ></el-input> | 61 | + ></el-input> |
| 62 | - </Formitem> | 62 | + </Formitem> |
| 63 | - </el-col> | 63 | + </el-col> |
| 64 | - <el-col :span="4"> | 64 | + <el-col :span="4"> |
| 65 | - <Formitem label="商品编码" prop="productCode"> | 65 | + <Formitem label="商品编码" prop="productCode"> |
| 66 | - <el-input | 66 | + <el-input |
| 67 | - type="text" | 67 | + type="text" |
| 68 | - class="inputShadow" | 68 | + class="inputShadow" |
| 69 | - id="inputInner--productCode" | 69 | + id="inputInner--productCode" |
| 70 | - resize="none" | 70 | + resize="none" |
| 71 | - v-model="tableRowformData.productCode" | 71 | + v-model="tableRowformData.productCode" |
| 72 | - clearable | 72 | + clearable |
| 73 | - placeholder="" | 73 | + placeholder="" |
| 74 | - ></el-input> | 74 | + ></el-input> |
| 75 | - </Formitem> | 75 | + </Formitem> |
| 76 | - </el-col> | 76 | + </el-col> |
| 77 | - <el-col :span="4"> | 77 | + <el-col :span="4"> |
| 78 | - <Formitem label="规格型号" prop="model"> | 78 | + <Formitem label="规格型号" prop="model"> |
| 79 | - <el-input | 79 | + <el-input |
| 80 | - type="text" | 80 | + type="text" |
| 81 | - class="inputShadow" | 81 | + class="inputShadow" |
| 82 | - id="inputInner--model" | 82 | + id="inputInner--model" |
| 83 | - resize="none" | 83 | + resize="none" |
| 84 | - v-model="tableRowformData.model" | 84 | + v-model="tableRowformData.model" |
| 85 | - clearable | 85 | + clearable |
| 86 | - placeholder="" | 86 | + placeholder="" |
| 87 | - ></el-input> | 87 | + ></el-input> |
| 88 | - </Formitem> | 88 | + </Formitem> |
| 89 | - </el-col> | 89 | + </el-col> |
| 90 | - </el-row> | 90 | + </el-row> |
| 91 | - <el-row :gutter="5"> | 91 | + <el-row :gutter="5"> |
| 92 | - <el-col :span="4"> | 92 | + <el-col :span="4"> |
| 93 | - <Formitem label="账册备案料号" prop="accountBookMaterialNumber"> | 93 | + <Formitem label="账册备案料号" prop="accountBookMaterialNumber"> |
| 94 | - <el-input | 94 | + <el-input |
| 95 | - type="text" | 95 | + type="text" |
| 96 | - class="inputShadow" | 96 | + class="inputShadow" |
| 97 | - id="inputInner--accountBookMaterialNumber" | 97 | + id="inputInner--accountBookMaterialNumber" |
| 98 | - resize="none" | 98 | + resize="none" |
| 99 | - v-model="tableRowformData.accountBookMaterialNumber" | 99 | + v-model="tableRowformData.accountBookMaterialNumber" |
| 100 | - clearable | 100 | + clearable |
| 101 | - placeholder="" | 101 | + placeholder="" |
| 102 | - ></el-input> | 102 | + ></el-input> |
| 103 | - </Formitem> | 103 | + </Formitem> |
| 104 | - </el-col> | 104 | + </el-col> |
| 105 | - <el-col :span="4"> | 105 | + <el-col :span="4"> |
| 106 | - <Formitem label="条形码" prop="barCode"> | 106 | + <Formitem label="条形码" prop="barCode"> |
| 107 | - <el-input | 107 | + <el-input |
| 108 | - type="text" | 108 | + type="text" |
| 109 | - class="inputShadow" | 109 | + class="inputShadow" |
| 110 | - id="inputInner--barCode" | 110 | + id="inputInner--barCode" |
| 111 | - resize="none" | 111 | + resize="none" |
| 112 | - v-model="tableRowformData.barCode" | 112 | + v-model="tableRowformData.barCode" |
| 113 | - clearable | 113 | + clearable |
| 114 | - placeholder="" | 114 | + placeholder="" |
| 115 | - ></el-input> | 115 | + ></el-input> |
| 116 | - </Formitem> | 116 | + </Formitem> |
| 117 | - </el-col> | 117 | + </el-col> |
| 118 | - <el-col :span="4"> | 118 | + <el-col :span="4"> |
| 119 | - <Formitem label="目的国(地区)代码" prop="destinationCountryRegionCode"> | 119 | + <Formitem |
| 120 | - <el-select | 120 | + label="目的国(地区)代码" |
| 121 | - type="text" | 121 | + prop="destinationCountryRegionCode" |
| 122 | - id="inputInner--destinationCountryRegionCode" | 122 | + > |
| 123 | - v-model="tableRowformData.destinationCountryRegionCode" | 123 | + <el-select |
| 124 | - clearable | 124 | + type="text" |
| 125 | - filterable | 125 | + id="inputInner--destinationCountryRegionCode" |
| 126 | - placeholder="" | 126 | + v-model="tableRowformData.destinationCountryRegionCode" |
| 127 | - > | 127 | + clearable |
| 128 | - <el-option | 128 | + filterable |
| 129 | - v-for="(item, index) in $store.getters.dict.COUNTRY_REGION_CODE" | 129 | + placeholder="" |
| 130 | - :key="index" | 130 | + > |
| 131 | - :label="item.itemChineseName" | 131 | + <el-option |
| 132 | - :value="item.itemCode" | 132 | + v-for="(item, index) in $store.getters.dict.COUNTRY_REGION_CODE" |
| 133 | - ></el-option> | 133 | + :key="index" |
| 134 | - </el-select> | 134 | + :label="item.itemChineseName" |
| 135 | - </Formitem> | 135 | + :value="item.itemCode" |
| 136 | - </el-col> | 136 | + ></el-option> |
| 137 | - <el-col :span="4"> | 137 | + </el-select> |
| 138 | - <Formitem label="计量单位" prop="unit"> | 138 | + </Formitem> |
| 139 | - <el-select | 139 | + </el-col> |
| 140 | - type="text" | 140 | + <el-col :span="4"> |
| 141 | - id="inputInner--unit" | 141 | + <Formitem label="计量单位" prop="unit"> |
| 142 | - v-model="tableRowformData.unit" | 142 | + <el-select |
| 143 | - clearable | 143 | + type="text" |
| 144 | - filterable | 144 | + id="inputInner--unit" |
| 145 | - placeholder="" | 145 | + v-model="tableRowformData.unit" |
| 146 | - > | 146 | + clearable |
| 147 | - <el-option | 147 | + filterable |
| 148 | - v-for="(item, index) in $store.getters.dict.MEASUREMENT_UNIT" | 148 | + placeholder="" |
| 149 | - :key="index" | 149 | + > |
| 150 | - :label="item.itemChineseName" | 150 | + <el-option |
| 151 | - :value="item.itemValue" | 151 | + v-for="(item, index) in $store.getters.dict.MEASUREMENT_UNIT" |
| 152 | - ></el-option> | 152 | + :key="index" |
| 153 | - </el-select> | 153 | + :label="item.itemChineseName" |
| 154 | - </Formitem> | 154 | + :value="item.itemValue" |
| 155 | - </el-col> | 155 | + ></el-option> |
| 156 | - <el-col :span="4"> | 156 | + </el-select> |
| 157 | - <Formitem label="数量" prop="qty"> | 157 | + </Formitem> |
| 158 | - <el-input | 158 | + </el-col> |
| 159 | - type="number" | 159 | + <el-col :span="4"> |
| 160 | - class="inputShadow" | 160 | + <Formitem label="数量" prop="qty"> |
| 161 | - id="inputInner--qty" | 161 | + <el-input |
| 162 | - resize="none" | 162 | + type="number" |
| 163 | - v-model.number="tableRowformData.qty" | 163 | + class="inputShadow" |
| 164 | - clearable | 164 | + id="inputInner--qty" |
| 165 | - placeholder="" | 165 | + resize="none" |
| 166 | - ></el-input> | 166 | + v-model.number="tableRowformData.qty" |
| 167 | - </Formitem> | 167 | + clearable |
| 168 | - </el-col> | 168 | + placeholder="" |
| 169 | - <el-col :span="4"> | 169 | + ></el-input> |
| 170 | - <Formitem label="法定数量" prop="legalQty"> | 170 | + </Formitem> |
| 171 | - <el-input | 171 | + </el-col> |
| 172 | - type="number" | 172 | + <el-col :span="4"> |
| 173 | - class="inputShadow" | 173 | + <Formitem label="法定数量" prop="legalQty"> |
| 174 | - id="inputInner--legalQty" | 174 | + <el-input |
| 175 | - resize="none" | 175 | + type="number" |
| 176 | - v-model="tableRowformData.legalQty" | 176 | + class="inputShadow" |
| 177 | - clearable | 177 | + id="inputInner--legalQty" |
| 178 | - placeholder="" | 178 | + resize="none" |
| 179 | - ></el-input> | 179 | + v-model="tableRowformData.legalQty" |
| 180 | - </Formitem> | 180 | + clearable |
| 181 | - </el-col> | 181 | + placeholder="" |
| 182 | - </el-row> | 182 | + ></el-input> |
| 183 | - <el-row :gutter="5"> | 183 | + </Formitem> |
| 184 | - <el-col :span="4"> | 184 | + </el-col> |
| 185 | - <Formitem label="币制" prop="currency"> | 185 | + </el-row> |
| 186 | - <el-select | 186 | + <el-row :gutter="5"> |
| 187 | - type="text" | 187 | + <el-col :span="4"> |
| 188 | - id="inputInner--currency" | 188 | + <Formitem label="法定单位"> |
| 189 | - v-model="tableRowformData.currency" | 189 | + <el-input |
| 190 | - clearable | 190 | + class="inputShadow" |
| 191 | - filterable | 191 | + id="inputInner--unitLegalFirstCode" |
| 192 | - placeholder="" | 192 | + resize="none" |
| 193 | - > | 193 | + :disabled="true" |
| 194 | - <el-option | 194 | + :value=" |
| 195 | - v-for="(item, index) in $store.getters.dict.CURRENCY" | 195 | + mapDicDatas( |
| 196 | - :key="index" | 196 | + $store.getters.dict.MEASUREMENT_UNIT, |
| 197 | - :label="item.itemChineseName" | 197 | + tableRowformData.unitLegalFirstCode |
| 198 | - :value="item.itemValue" | 198 | + ) |
| 199 | - ></el-option> | 199 | + " |
| 200 | - </el-select> | 200 | + ></el-input> |
| 201 | - </Formitem> | 201 | + </Formitem> |
| 202 | - </el-col> | 202 | + </el-col> |
| 203 | - <el-col :span="4"> | 203 | + <el-col :span="4"> |
| 204 | - <Formitem label="单价" prop="price"> | 204 | + <Formitem label="币制" prop="currency"> |
| 205 | - <el-input | 205 | + <el-select |
| 206 | - type="number" | 206 | + type="text" |
| 207 | - class="inputShadow" | 207 | + id="inputInner--currency" |
| 208 | - id="inputInner--price" | 208 | + v-model="tableRowformData.currency" |
| 209 | - resize="none" | 209 | + clearable |
| 210 | - v-model="tableRowformData.price" | 210 | + filterable |
| 211 | - clearable | 211 | + placeholder="" |
| 212 | - placeholder="" | 212 | + > |
| 213 | - ></el-input> | 213 | + <el-option |
| 214 | - </Formitem> | 214 | + v-for="(item, index) in $store.getters.dict.CURRENCY" |
| 215 | - </el-col> | 215 | + :key="index" |
| 216 | - <el-col :span="4"> | 216 | + :label="item.itemChineseName" |
| 217 | - <Formitem label="总价" prop="totalPrice"> | 217 | + :value="item.itemValue" |
| 218 | - <el-input | 218 | + ></el-option> |
| 219 | - type="number" | 219 | + </el-select> |
| 220 | - class="inputShadow" | 220 | + </Formitem> |
| 221 | - id="inputInner--totalPrice" | 221 | + </el-col> |
| 222 | - resize="none" | 222 | + <el-col :span="4"> |
| 223 | - v-model="tableRowformData.totalPrice" | 223 | + <Formitem label="单价" prop="price"> |
| 224 | - clearable | 224 | + <el-input |
| 225 | - placeholder="" | 225 | + type="number" |
| 226 | - ></el-input> | 226 | + class="inputShadow" |
| 227 | - </Formitem> | 227 | + id="inputInner--price" |
| 228 | - </el-col> | 228 | + resize="none" |
| 229 | - <el-col :span="4"> | 229 | + v-model="tableRowformData.price" |
| 230 | - <Formitem label="净重" prop="netWeight"> | 230 | + clearable |
| 231 | - <el-input | 231 | + placeholder="" |
| 232 | - type="number" | 232 | + ></el-input> |
| 233 | - class="inputShadow" | 233 | + </Formitem> |
| 234 | - id="inputInner--netWeight" | 234 | + </el-col> |
| 235 | - resize="none" | 235 | + <el-col :span="4"> |
| 236 | - v-model="tableRowformData.netWeight" | 236 | + <Formitem label="总价" prop="totalPrice"> |
| 237 | - clearable | 237 | + <el-input |
| 238 | - placeholder="" | 238 | + type="number" |
| 239 | - ></el-input> | 239 | + class="inputShadow" |
| 240 | - </Formitem> | 240 | + id="inputInner--totalPrice" |
| 241 | - </el-col> | 241 | + resize="none" |
| 242 | - <el-col :span="8"> | 242 | + v-model="tableRowformData.totalPrice" |
| 243 | - <Formitem label="备注" prop="remark"> | 243 | + clearable |
| 244 | - <el-input | 244 | + placeholder="" |
| 245 | - type="text" | 245 | + ></el-input> |
| 246 | - class="inputShadow" | 246 | + </Formitem> |
| 247 | - id="inputInner--remark" | 247 | + </el-col> |
| 248 | - resize="none" | 248 | + <el-col :span="4"> |
| 249 | - v-model="tableRowformData.remark" | 249 | + <Formitem label="净重" prop="netWeight"> |
| 250 | - clearable | 250 | + <el-input |
| 251 | - placeholder="" | 251 | + type="number" |
| 252 | - ></el-input> | 252 | + class="inputShadow" |
| 253 | - </Formitem> | 253 | + id="inputInner--netWeight" |
| 254 | - </el-col> | 254 | + resize="none" |
| 255 | - </el-row> | 255 | + v-model="tableRowformData.netWeight" |
| 256 | - </el-form> | 256 | + clearable |
| 257 | - <p class="formRowDataOperate"><a @click="cancelEditRowData">取消</a> <a @click="rowFormDataSave">保存</a></p> | 257 | + placeholder="" |
| 258 | - </div> | 258 | + ></el-input> |
| 259 | - </template> | 259 | + </Formitem> |
| 260 | + </el-col> | ||
| 261 | + <el-col :span="8"> | ||
| 262 | + <Formitem label="备注" prop="remark"> | ||
| 263 | + <el-input | ||
| 264 | + type="text" | ||
| 265 | + class="inputShadow" | ||
| 266 | + id="inputInner--remark" | ||
| 267 | + resize="none" | ||
| 268 | + v-model="tableRowformData.remark" | ||
| 269 | + clearable | ||
| 270 | + placeholder="" | ||
| 271 | + ></el-input> | ||
| 272 | + </Formitem> | ||
| 273 | + </el-col> | ||
| 274 | + </el-row> | ||
| 275 | + </el-form> | ||
| 276 | + <p class="formRowDataOperate"> | ||
| 277 | + <a @click="cancelEditRowData">取消</a> | ||
| 278 | + <a @click="rowFormDataSave">保存</a> | ||
| 279 | + </p> | ||
| 280 | + </div> | ||
| 281 | +</template> | ||
| 260 | 282 | ||
| 261 | - <script> | 283 | +<script> |
| 262 | - | 284 | +export default { |
| 263 | - export default { | 285 | + props: { |
| 264 | - props: { | 286 | + rowDatas: { |
| 265 | - rowDatas: { | 287 | + type: Object, |
| 266 | - type: Object, | 288 | + default: () => ({}), |
| 267 | - default: ()=>({}), | ||
| 268 | - }, | ||
| 269 | }, | 289 | }, |
| 270 | - data() { | 290 | + }, |
| 271 | - var checkFractionalPart = (rule, value, callback) => { | 291 | + data() { |
| 272 | - if (value < 0) { | 292 | + var checkFractionalPart = (rule, value, callback) => { |
| 273 | - callback(new Error('数值不能为负')); | 293 | + if (value < 0) { |
| 274 | - } | 294 | + callback(new Error("数值不能为负")); |
| 275 | - if (value !== '' && value !== undefined) { | 295 | + } |
| 276 | - const regex = /^\d{0,14}(\.\d{1,5})?$/; | 296 | + if (value !== "" && value !== undefined) { |
| 277 | - if (!regex.test(value)) { | 297 | + const regex = /^\d{0,14}(\.\d{1,5})?$/; |
| 278 | - callback(new Error('整数最多14位,小数最多5位')); | 298 | + if (!regex.test(value)) { |
| 279 | - } else { | 299 | + callback(new Error("整数最多14位,小数最多5位")); |
| 280 | - callback(); | ||
| 281 | - } | ||
| 282 | } else { | 300 | } else { |
| 283 | callback(); | 301 | callback(); |
| 284 | } | 302 | } |
| 285 | - }; | 303 | + } else { |
| 286 | - var checkNegativeNum = (rule, value, callback) => { | 304 | + callback(); |
| 287 | - if (value < 0) { | 305 | + } |
| 288 | - callback(new Error('数值不能为负')); | 306 | + }; |
| 289 | - } else { | 307 | + var checkNegativeNum = (rule, value, callback) => { |
| 290 | - callback(); | 308 | + if (value < 0) { |
| 291 | - } | 309 | + callback(new Error("数值不能为负")); |
| 292 | - }; | 310 | + } else { |
| 293 | - var checkQty = (rule, value, callback) => { | 311 | + callback(); |
| 294 | - if (!Number.isInteger(value)) { | 312 | + } |
| 295 | - callback(new Error('请输入整数值')); | 313 | + }; |
| 314 | + var checkQty = (rule, value, callback) => { | ||
| 315 | + if (!Number.isInteger(value)) { | ||
| 316 | + callback(new Error("请输入整数值")); | ||
| 317 | + } else { | ||
| 318 | + if (value < 0) { | ||
| 319 | + callback(new Error("数值不能为负")); | ||
| 296 | } else { | 320 | } else { |
| 297 | - if (value < 0) { | 321 | + const valueStr = value.toString(); |
| 298 | - callback(new Error('数值不能为负')); | 322 | + if (valueStr.length > 14) { |
| 323 | + callback(new Error("最多14位")); | ||
| 299 | } else { | 324 | } else { |
| 300 | - const valueStr = value.toString(); | 325 | + callback(); |
| 301 | - if (valueStr.length > 14) { | ||
| 302 | - callback(new Error('最多14位')); | ||
| 303 | - } else { | ||
| 304 | - callback(); | ||
| 305 | - } | ||
| 306 | } | 326 | } |
| 307 | } | 327 | } |
| 308 | - }; | 328 | + } |
| 309 | - return { | 329 | + }; |
| 310 | - tableRowformData:{}, | 330 | + return { |
| 311 | - tableRowFormRules:{ | 331 | + tableRowformData: {}, |
| 312 | - enterpriseProductCode: [ | 332 | + tableRowFormRules: { |
| 313 | - { required: true, message: '请输入企业商品货号', trigger: 'blur' }, | 333 | + enterpriseProductCode: [ |
| 314 | - { max: 30, message: '长度不能超过30个字符', trigger: 'blur' } | 334 | + { required: true, message: "请输入企业商品货号", trigger: "blur" }, |
| 315 | - ], | 335 | + { max: 30, message: "长度不能超过30个字符", trigger: "blur" }, |
| 316 | - enterpriseProductName: [ | 336 | + ], |
| 317 | - { required: true, message: '请输入企业商品名称', trigger: 'blur' }, | 337 | + enterpriseProductName: [ |
| 318 | - { max: 250, message: '长度不能超过250个字符', trigger: 'blur' } | 338 | + { required: true, message: "请输入企业商品名称", trigger: "blur" }, |
| 319 | - ], | 339 | + { max: 250, message: "长度不能超过250个字符", trigger: "blur" }, |
| 320 | - enterpriseProductDescribe: [ | 340 | + ], |
| 321 | - { max: 1000, message: '长度不能超过1000个字符', trigger: 'blur' } | 341 | + enterpriseProductDescribe: [ |
| 322 | - ], | 342 | + { max: 1000, message: "长度不能超过1000个字符", trigger: "blur" }, |
| 323 | - productName: [ | 343 | + ], |
| 324 | - { required: true, message: '请输入商品名称', trigger: 'blur' }, | 344 | + productName: [ |
| 325 | - { max: 250, message: '长度不能超过250个字符', trigger: 'blur' } | 345 | + { required: true, message: "请输入商品名称", trigger: "blur" }, |
| 326 | - ], | 346 | + { max: 250, message: "长度不能超过250个字符", trigger: "blur" }, |
| 327 | - productCode: [ | 347 | + ], |
| 328 | - { required: true, message: '请输入商品编码', trigger: 'blur' }, | 348 | + productCode: [ |
| 329 | - { max: 10, message: '长度不能超过10个字符', trigger: 'blur' } | 349 | + { required: true, message: "请输入商品编码", trigger: "blur" }, |
| 330 | - ], | 350 | + { max: 10, message: "长度不能超过10个字符", trigger: "blur" }, |
| 331 | - model: [ | 351 | + ], |
| 332 | - { required: true, message: '请输入规格型号', trigger: 'blur' }, | 352 | + model: [ |
| 333 | - { max: 250, message: '长度不能超过250个字符', trigger: 'blur' } | 353 | + { required: true, message: "请输入规格型号", trigger: "blur" }, |
| 334 | - ], | 354 | + { max: 250, message: "长度不能超过250个字符", trigger: "blur" }, |
| 335 | - accountBookMaterialNumber: [ | 355 | + ], |
| 336 | - { max: 30, message: '长度不能超过30个字符', trigger: 'blur' } | 356 | + accountBookMaterialNumber: [ |
| 337 | - ], | 357 | + { max: 30, message: "长度不能超过30个字符", trigger: "blur" }, |
| 338 | - barCode: [ | 358 | + ], |
| 339 | - { max: 50, message: '长度不能超过50个字符', trigger: 'blur' } | 359 | + barCode: [ |
| 340 | - ], | 360 | + { max: 50, message: "长度不能超过50个字符", trigger: "blur" }, |
| 341 | - destinationCountryRegionCode: [ | 361 | + ], |
| 342 | - { required: true, message: '请选择目的国(地区)代码', trigger: 'change' } | 362 | + destinationCountryRegionCode: [ |
| 343 | - ], | 363 | + { |
| 344 | - unit: [ | 364 | + required: true, |
| 345 | - { required: true, message: '请选择计量单位', trigger: 'change' } | 365 | + message: "请选择目的国(地区)代码", |
| 346 | - ], | 366 | + trigger: "change", |
| 347 | - qty: [ | 367 | + }, |
| 348 | - { required: true, message: '请输入数量', trigger: 'blur' }, | 368 | + ], |
| 349 | - { validator: checkQty, trigger: 'blur' } | 369 | + unit: [ |
| 350 | - ], | 370 | + { required: true, message: "请选择计量单位", trigger: "change" }, |
| 351 | - legalQty: [ | 371 | + ], |
| 352 | - { required: true, message: '请输入法定数量', trigger: 'blur' }, | 372 | + qty: [ |
| 353 | - { validator: checkFractionalPart, trigger: 'blur' } | 373 | + { required: true, message: "请输入数量", trigger: "blur" }, |
| 354 | - ], | 374 | + { validator: checkQty, trigger: "blur" }, |
| 355 | - currency: [ | 375 | + ], |
| 356 | - { required: true, message: '请选择币制', trigger: 'change' } | 376 | + legalQty: [ |
| 357 | - ], | 377 | + { required: true, message: "请输入法定数量", trigger: "blur" }, |
| 358 | - price: [ | 378 | + { validator: checkFractionalPart, trigger: "blur" }, |
| 359 | - { required: true, message: '请输入单价', trigger: 'blur' }, | 379 | + ], |
| 360 | - { validator: checkNegativeNum, trigger: 'blur' } | 380 | + currency: [ |
| 361 | - ], | 381 | + { required: true, message: "请选择币制", trigger: "change" }, |
| 362 | - totalPrice: [ | 382 | + ], |
| 363 | - { required: true, message: '请输入总价', trigger: 'blur' }, | 383 | + price: [ |
| 364 | - { validator: checkNegativeNum, trigger: 'blur' } | 384 | + { required: true, message: "请输入单价", trigger: "blur" }, |
| 365 | - ], | 385 | + { validator: checkNegativeNum, trigger: "blur" }, |
| 366 | - netWeight: [ | 386 | + ], |
| 367 | - { required: true, message: '请输入净重', trigger: 'blur' }, | 387 | + totalPrice: [ |
| 368 | - { validator: checkFractionalPart, trigger: 'blur' } | 388 | + { required: true, message: "请输入总价", trigger: "blur" }, |
| 369 | - ], | 389 | + { validator: checkNegativeNum, trigger: "blur" }, |
| 370 | - remark: [ | 390 | + ], |
| 371 | - { max: 1000, message: '长度不能超过1000个字符', trigger: 'blur' } | 391 | + netWeight: [ |
| 372 | - ], | 392 | + { required: true, message: "请输入净重", trigger: "blur" }, |
| 373 | - } | 393 | + { validator: checkFractionalPart, trigger: "blur" }, |
| 374 | - }; | 394 | + ], |
| 375 | - }, | 395 | + remark: [ |
| 376 | - methods: { | 396 | + { max: 1000, message: "长度不能超过1000个字符", trigger: "blur" }, |
| 377 | - rowFormDataSave(){ | 397 | + ], |
| 378 | - this.$refs.editRowForm.validate((valid) => { | ||
| 379 | - if (valid) { | ||
| 380 | - this.$emit('rowFormDataSave', {gnum: this.rowDatas.row.gnum, tableRowformData: this.tableRowformData}) | ||
| 381 | - this.tableRowformData = {} | ||
| 382 | - } else { | ||
| 383 | - return false; | ||
| 384 | - } | ||
| 385 | - }) | ||
| 386 | }, | 398 | }, |
| 387 | - cancelEditRowData(){ | 399 | + }; |
| 388 | - this.tableRowformData = {} | 400 | + }, |
| 389 | - this.$emit('cancelEditRowData',this.rowDatas.row.gnum-1) | 401 | + methods: { |
| 390 | - }, | 402 | + mapDicDatas(dicArr, code) { |
| 391 | - // validate() { | 403 | + if (code != "" && code) { |
| 392 | - // return this.$refs.editRowForm.validate((valid)=>{ | 404 | + return dicArr.filter((item) => item.itemCode == code)[0] |
| 393 | - // if(valid){ | 405 | + .itemChineseName; |
| 394 | - // console.log("tg2") | 406 | + } else { |
| 395 | - // this.$emit('updateLastItemValid', true); | 407 | + return ""; |
| 396 | - // }else { | 408 | + } |
| 397 | - // console.log("wtg2") | 409 | + }, |
| 398 | - // this.$emit('updateLastItemValid', false); // 通知父组件校验未通过 | 410 | + rowFormDataSave() { |
| 399 | - // } | 411 | + this.$refs.editRowForm.validate((valid) => { |
| 400 | - // }); | 412 | + if (valid) { |
| 401 | - // }, | 413 | + this.$emit("rowFormDataSave", { |
| 402 | - async validate() { | 414 | + gnum: this.rowDatas.row.gnum, |
| 403 | - return new Promise((resolve, reject) => { | 415 | + tableRowformData: this.tableRowformData, |
| 404 | - this.$refs.editRowForm.validate((valid) => { | ||
| 405 | - if (valid) { | ||
| 406 | - // console.log("tg2") | ||
| 407 | - this.$emit('rowFormDataSave', {gnum: this.rowDatas.row.gnum, tableRowformData: this.tableRowformData}) | ||
| 408 | - this.tableRowformData = {} | ||
| 409 | - this.$emit('updateLastItemValid', true); | ||
| 410 | - resolve(true); | ||
| 411 | - } else { | ||
| 412 | - // console.log("wtg2") | ||
| 413 | - this.$emit('updateLastItemValid', false); | ||
| 414 | - resolve(false); | ||
| 415 | - } | ||
| 416 | }); | 416 | }); |
| 417 | + this.tableRowformData = {}; | ||
| 418 | + } else { | ||
| 419 | + return false; | ||
| 420 | + } | ||
| 421 | + }); | ||
| 422 | + }, | ||
| 423 | + cancelEditRowData() { | ||
| 424 | + this.tableRowformData = {}; | ||
| 425 | + this.$emit("cancelEditRowData", this.rowDatas.row.gnum - 1); | ||
| 426 | + }, | ||
| 427 | + // validate() { | ||
| 428 | + // return this.$refs.editRowForm.validate((valid)=>{ | ||
| 429 | + // if(valid){ | ||
| 430 | + // console.log("tg2") | ||
| 431 | + // this.$emit('updateLastItemValid', true); | ||
| 432 | + // }else { | ||
| 433 | + // console.log("wtg2") | ||
| 434 | + // this.$emit('updateLastItemValid', false); // 通知父组件校验未通过 | ||
| 435 | + // } | ||
| 436 | + // }); | ||
| 437 | + // }, | ||
| 438 | + async validate() { | ||
| 439 | + return new Promise((resolve, reject) => { | ||
| 440 | + this.$refs.editRowForm.validate((valid) => { | ||
| 441 | + if (valid) { | ||
| 442 | + // console.log("tg2") | ||
| 443 | + this.$emit("rowFormDataSave", { | ||
| 444 | + gnum: this.rowDatas.row.gnum, | ||
| 445 | + tableRowformData: this.tableRowformData, | ||
| 446 | + }); | ||
| 447 | + this.tableRowformData = {}; | ||
| 448 | + this.$emit("updateLastItemValid", true); | ||
| 449 | + resolve(true); | ||
| 450 | + } else { | ||
| 451 | + // console.log("wtg2") | ||
| 452 | + this.$emit("updateLastItemValid", false); | ||
| 453 | + resolve(false); | ||
| 454 | + } | ||
| 417 | }); | 455 | }); |
| 418 | - }, | 456 | + }); |
| 419 | }, | 457 | }, |
| 420 | - }; | 458 | + }, |
| 421 | - </script> | 459 | +}; |
| 460 | +</script> | ||
| 422 | 461 | ||
| 423 | - <style lang="scss" scoped> | 462 | +<style lang="scss" scoped> |
| 424 | - .addNewItem{ | 463 | +.addNewItem { |
| 425 | - display: flex; | 464 | + display: flex; |
| 426 | - justify-content: flex-start; | 465 | + justify-content: flex-start; |
| 427 | - align-items: center; | 466 | + align-items: center; |
| 428 | - color:#007AB7; | 467 | + color: #007ab7; |
| 429 | - line-height: 38px; | 468 | + line-height: 38px; |
| 430 | - cursor: pointer; | 469 | + cursor: pointer; |
| 431 | - i{ | 470 | + i { |
| 432 | - margin-right: 3px; | 471 | + margin-right: 3px; |
| 433 | - } | ||
| 434 | - span{ | ||
| 435 | - font-size: 13px; | ||
| 436 | - font-weight: 500; | ||
| 437 | - } | ||
| 438 | - } | ||
| 439 | - .formRowDataOperate{ | ||
| 440 | - text-align: center; | ||
| 441 | - padding: 0 20px; | ||
| 442 | - a{ | ||
| 443 | - color: #007AB7; | ||
| 444 | - font-weight: 600; | ||
| 445 | - &:first-child{ | ||
| 446 | - margin-right: 5px; | ||
| 447 | - } | ||
| 448 | - } | ||
| 449 | - } | ||
| 450 | - .fedexRowEditFormStyle .el-form-item{ | ||
| 451 | - background-color: #ffffff; | ||
| 452 | - box-shadow: 0 2px 4px 0 #E5F2F8CC; | ||
| 453 | - border-left: 1px solid #E5F2F8CC; | ||
| 454 | - // margin-bottom: 30px; | ||
| 455 | } | 472 | } |
| 456 | - .fedexRowEditFormStyle .el-form-item:has(.formError){ | 473 | + span { |
| 457 | - margin-bottom: 25px!important; | 474 | + font-size: 13px; |
| 475 | + font-weight: 500; | ||
| 458 | } | 476 | } |
| 459 | - .fedexRowEditFormStyle .activeBorder{ | 477 | +} |
| 460 | - border-left: 3px solid #007AB7; | 478 | +.formRowDataOperate { |
| 479 | + text-align: center; | ||
| 480 | + padding: 0 20px; | ||
| 481 | + a { | ||
| 482 | + color: #007ab7; | ||
| 483 | + font-weight: 600; | ||
| 484 | + &:first-child { | ||
| 485 | + margin-right: 5px; | ||
| 486 | + } | ||
| 461 | } | 487 | } |
| 462 | - </style> | 488 | +} |
| 489 | +.fedexRowEditFormStyle .el-form-item { | ||
| 490 | + background-color: #ffffff; | ||
| 491 | + box-shadow: 0 2px 4px 0 #e5f2f8cc; | ||
| 492 | + border-left: 1px solid #e5f2f8cc; | ||
| 493 | + // margin-bottom: 30px; | ||
| 494 | +} | ||
| 495 | +.fedexRowEditFormStyle .el-form-item:has(.formError) { | ||
| 496 | + margin-bottom: 25px !important; | ||
| 497 | +} | ||
| 498 | +.fedexRowEditFormStyle .activeBorder { | ||
| 499 | + border-left: 3px solid #007ab7; | ||
| 500 | +} | ||
| 501 | +</style> | ... | ... |
| ... | @@ -868,7 +868,7 @@ export default { | ... | @@ -868,7 +868,7 @@ export default { |
| 868 | }, | 868 | }, |
| 869 | methods: { | 869 | methods: { |
| 870 | mapDicDatas(dicArr, code) { | 870 | mapDicDatas(dicArr, code) { |
| 871 | - if (code != "") { | 871 | + if (code != "" && code) { |
| 872 | return dicArr.filter((item) => item.itemCode == code)[0] | 872 | return dicArr.filter((item) => item.itemCode == code)[0] |
| 873 | .itemChineseName; | 873 | .itemChineseName; |
| 874 | } else { | 874 | } else { | ... | ... |
| ... | @@ -178,7 +178,9 @@ | ... | @@ -178,7 +178,9 @@ |
| 178 | type="primary" | 178 | type="primary" |
| 179 | class="dropdown-style-button" | 179 | class="dropdown-style-button" |
| 180 | :loading="loadings.departureLoading" | 180 | :loading="loadings.departureLoading" |
| 181 | - @click="declareData('departureLoading', '离境单申报', 'logisticsDeparture')" | 181 | + @click=" |
| 182 | + declareData('departureLoading', '离境单申报', 'logisticsDeparture') | ||
| 183 | + " | ||
| 182 | > | 184 | > |
| 183 | <svg-icon | 185 | <svg-icon |
| 184 | class="el-icon-user-solid" | 186 | class="el-icon-user-solid" |
| ... | @@ -192,7 +194,7 @@ | ... | @@ -192,7 +194,7 @@ |
| 192 | type="primary" | 194 | type="primary" |
| 193 | class="dropdown-style-button" | 195 | class="dropdown-style-button" |
| 194 | :loading="loadings.revokeLoading" | 196 | :loading="loadings.revokeLoading" |
| 195 | - @click="declareData('revokeLoading', '撤销单申报' ,'cancellation')" | 197 | + @click="declareData('revokeLoading', '撤销单申报', 'cancellation')" |
| 196 | > | 198 | > |
| 197 | <svg-icon | 199 | <svg-icon |
| 198 | class="el-icon-user-solid" | 200 | class="el-icon-user-solid" |
| ... | @@ -211,7 +213,7 @@ | ... | @@ -211,7 +213,7 @@ |
| 211 | </el-button> | 213 | </el-button> |
| 212 | </div> | 214 | </div> |
| 213 | </div> | 215 | </div> |
| 214 | - <section style="position:fixed;top:350px;left: 500px;"> | 216 | + <section style="position: fixed; top: 350px; left: 500px"> |
| 215 | <TablePopover | 217 | <TablePopover |
| 216 | ref="allLogDataReceiptStatusPopover" | 218 | ref="allLogDataReceiptStatusPopover" |
| 217 | dataKey="allLogDataReceiptStatus" | 219 | dataKey="allLogDataReceiptStatus" |
| ... | @@ -237,7 +239,8 @@ | ... | @@ -237,7 +239,8 @@ |
| 237 | ref="entryTable" | 239 | ref="entryTable" |
| 238 | :data="tableData" | 240 | :data="tableData" |
| 239 | :headerData="headerData" | 241 | :headerData="headerData" |
| 240 | - :maxHeight="tableMaxheight" | 242 | + :height="tableMaxheight + 'px'" |
| 243 | + :maxHeight="tableMaxheight + 'px'" | ||
| 241 | :border="true" | 244 | :border="true" |
| 242 | :pagination="true" | 245 | :pagination="true" |
| 243 | :order="false" | 246 | :order="false" |
| ... | @@ -364,7 +367,9 @@ | ... | @@ -364,7 +367,9 @@ |
| 364 | <el-table-column align="center" label="操作" width="150"> | 367 | <el-table-column align="center" label="操作" width="150"> |
| 365 | <template slot-scope="scope"> | 368 | <template slot-scope="scope"> |
| 366 | <el-button type="text" @click="update(scope.row)"> 修改 </el-button> | 369 | <el-button type="text" @click="update(scope.row)"> 修改 </el-button> |
| 367 | - <el-button type="text" @click="showTotalLog(scope.row)">日志</el-button> | 370 | + <el-button type="text" @click="showTotalLog(scope.row)" |
| 371 | + >日志</el-button | ||
| 372 | + > | ||
| 368 | </template> | 373 | </template> |
| 369 | </el-table-column> | 374 | </el-table-column> |
| 370 | </template> | 375 | </template> |
| ... | @@ -375,26 +380,27 @@ | ... | @@ -375,26 +380,27 @@ |
| 375 | @dwonloadModelFile="dwonloadModelFile" | 380 | @dwonloadModelFile="dwonloadModelFile" |
| 376 | @close="close" | 381 | @close="close" |
| 377 | /> | 382 | /> |
| 378 | - <RevokeDialog | 383 | + <RevokeDialog |
| 379 | - :showDialog="revokeVisible" | 384 | + :showDialog="revokeVisible" |
| 380 | - :selectedDatas="selected" | 385 | + :selectedDatas="selected" |
| 381 | - :dropdownCode="dropdownCode" | 386 | + :dropdownCode="dropdownCode" |
| 382 | - @cancelRevoke="cancelRevoke" /> | 387 | + @cancelRevoke="cancelRevoke" |
| 383 | - <TemplateDownloadDialog | 388 | + /> |
| 384 | - :showDialog="templateDownloadVisible" | 389 | + <TemplateDownloadDialog |
| 385 | - @cancelDownload="cancelDownload" | 390 | + :showDialog="templateDownloadVisible" |
| 386 | - /> | 391 | + @cancelDownload="cancelDownload" |
| 387 | - <ExportDialog | 392 | + /> |
| 388 | - ref="exportDialog" | 393 | + <ExportDialog |
| 389 | - :showDialog="datasExportVisible" | 394 | + ref="exportDialog" |
| 390 | - @cancelDatasExport="cancelDatasExport" | 395 | + :showDialog="datasExportVisible" |
| 391 | - @startDatasExport="startDatasExport" | 396 | + @cancelDatasExport="cancelDatasExport" |
| 392 | - /> | 397 | + @startDatasExport="startDatasExport" |
| 393 | - <BatchModify | 398 | + /> |
| 394 | - :selectedDatas="selected" | 399 | + <BatchModify |
| 395 | - :showDialog="batchModifyVisible" | 400 | + :selectedDatas="selected" |
| 396 | - @cancelBatchModify="cancelBatchModify" | 401 | + :showDialog="batchModifyVisible" |
| 397 | - /> | 402 | + @cancelBatchModify="cancelBatchModify" |
| 403 | + /> | ||
| 398 | </div> | 404 | </div> |
| 399 | </template> | 405 | </template> |
| 400 | 406 | ||
| ... | @@ -408,9 +414,9 @@ import { | ... | @@ -408,9 +414,9 @@ import { |
| 408 | getTotalReceipt, | 414 | getTotalReceipt, |
| 409 | getLogisticsReceipt, | 415 | getLogisticsReceipt, |
| 410 | getDeclarationLog, | 416 | getDeclarationLog, |
| 411 | - exportDeclareData | 417 | + exportDeclareData, |
| 412 | } from "@/api/declareData-api.js"; | 418 | } from "@/api/declareData-api.js"; |
| 413 | -import { getDictData } from '@/api/system/dict-api.js' | 419 | +import { getDictData } from "@/api/system/dict-api.js"; |
| 414 | import DialogVue from "./dialog.vue"; | 420 | import DialogVue from "./dialog.vue"; |
| 415 | import RevokeDialog from "./revokeDialog.vue"; | 421 | import RevokeDialog from "./revokeDialog.vue"; |
| 416 | import TemplateDownloadDialog from "./templateDownloadDialog.vue"; | 422 | import TemplateDownloadDialog from "./templateDownloadDialog.vue"; |
| ... | @@ -423,7 +429,7 @@ export default { | ... | @@ -423,7 +429,7 @@ export default { |
| 423 | RevokeDialog, | 429 | RevokeDialog, |
| 424 | TemplateDownloadDialog, | 430 | TemplateDownloadDialog, |
| 425 | ExportDialog, | 431 | ExportDialog, |
| 426 | - BatchModify | 432 | + BatchModify, |
| 427 | }, | 433 | }, |
| 428 | data() { | 434 | data() { |
| 429 | return { | 435 | return { |
| ... | @@ -577,30 +583,30 @@ export default { | ... | @@ -577,30 +583,30 @@ export default { |
| 577 | dwonloadModelLoading: false, | 583 | dwonloadModelLoading: false, |
| 578 | dropDownLoading: false, | 584 | dropDownLoading: false, |
| 579 | logTableLoading: false, | 585 | logTableLoading: false, |
| 580 | - exportDeclareLoading:false, | 586 | + exportDeclareLoading: false, |
| 581 | revokeLoading: false, // 撤销单申报加载状态 | 587 | revokeLoading: false, // 撤销单申报加载状态 |
| 582 | departureLoading: false, // 离境单申报加载状态 | 588 | departureLoading: false, // 离境单申报加载状态 |
| 583 | }, | 589 | }, |
| 584 | textareaVisible: {}, | 590 | textareaVisible: {}, |
| 585 | - tableMaxheight: null, | 591 | + tableMaxheight: 500, |
| 586 | outerVisible: false, | 592 | outerVisible: false, |
| 587 | dropdownName: "一键申报", | 593 | dropdownName: "一键申报", |
| 588 | dropdownCode: "full", | 594 | dropdownCode: "full", |
| 589 | - revokeVisible:false, | 595 | + revokeVisible: false, |
| 590 | - templateDownloadVisible:false, | 596 | + templateDownloadVisible: false, |
| 591 | - datasExportVisible:false, | 597 | + datasExportVisible: false, |
| 592 | - batchModifyVisible:false | 598 | + batchModifyVisible: false, |
| 593 | }; | 599 | }; |
| 594 | }, | 600 | }, |
| 595 | created() { | 601 | created() { |
| 596 | this.search(0); | 602 | this.search(0); |
| 597 | - // this.getCancellationReasons() | 603 | + this.calculateTableHeight(); |
| 598 | }, | 604 | }, |
| 599 | mounted() { | 605 | mounted() { |
| 600 | - this.tableMaxheight = window.innerHeight - 355; | 606 | + window.addEventListener("resize", this.calculateTableHeight); |
| 601 | - window.addEventListener('resize',()=>{ | 607 | + }, |
| 602 | - this.tableMaxheight = window.innerHeight - 355; | 608 | + beforeDestroy() { |
| 603 | - },false) | 609 | + window.removeEventListener("resize", this.calculateTableHeight); |
| 604 | }, | 610 | }, |
| 605 | watch: { | 611 | watch: { |
| 606 | $route(val, oldval) { | 612 | $route(val, oldval) { |
| ... | @@ -608,7 +614,7 @@ export default { | ... | @@ -608,7 +614,7 @@ export default { |
| 608 | }, | 614 | }, |
| 609 | }, | 615 | }, |
| 610 | beforeRouteEnter(to, from, next) { | 616 | beforeRouteEnter(to, from, next) { |
| 611 | - next(vm => { | 617 | + next((vm) => { |
| 612 | // 检查标志是否需要刷新数据 | 618 | // 检查标志是否需要刷新数据 |
| 613 | if (to.meta.needsRefresh) { | 619 | if (to.meta.needsRefresh) { |
| 614 | vm.search(0); | 620 | vm.search(0); |
| ... | @@ -618,6 +624,9 @@ export default { | ... | @@ -618,6 +624,9 @@ export default { |
| 618 | }); | 624 | }); |
| 619 | }, | 625 | }, |
| 620 | methods: { | 626 | methods: { |
| 627 | + calculateTableHeight() { | ||
| 628 | + this.tableMaxheight = window.innerHeight - 300; | ||
| 629 | + }, | ||
| 621 | //查询申报数据 | 630 | //查询申报数据 |
| 622 | search(val) { | 631 | search(val) { |
| 623 | this.loadings.sreachLoading = true; | 632 | this.loadings.sreachLoading = true; |
| ... | @@ -678,140 +687,147 @@ export default { | ... | @@ -678,140 +687,147 @@ export default { |
| 678 | //下载模板 | 687 | //下载模板 |
| 679 | dwonloadModelFile() { | 688 | dwonloadModelFile() { |
| 680 | this.loadings.dwonloadModelLoading = true; | 689 | this.loadings.dwonloadModelLoading = true; |
| 681 | - this.$store.dispatch("GetInfo").then(res =>{ | 690 | + this.$store |
| 682 | - console.log('res====', res) | 691 | + .dispatch("GetInfo") |
| 683 | - if (res.code == 200) { | 692 | + .then((res) => { |
| 684 | - console.log('port===', res.data?.port?.split(',')) | 693 | + console.log("res====", res); |
| 685 | - if (res.data?.port?.split(',').length == 2) { | 694 | + if (res.code == 200) { |
| 686 | - this.templateDownloadVisible = true | 695 | + console.log("port===", res.data?.port?.split(",")); |
| 687 | - } else { | 696 | + if (res.data?.port?.split(",").length == 2) { |
| 697 | + this.templateDownloadVisible = true; | ||
| 698 | + } else { | ||
| 688 | this.fileDownload | 699 | this.fileDownload |
| 689 | - .downLoadZip( | 700 | + .downLoadZip( |
| 690 | - "api", | 701 | + "api", |
| 691 | - "declareDataModel", | 702 | + "declareDataModel", |
| 692 | - "申报数据模板.xlsx", | 703 | + "申报数据模板.xlsx", |
| 693 | - "xlsx", | 704 | + "xlsx", |
| 694 | - "get", | 705 | + "get", |
| 695 | - {type: res.data?.port} | 706 | + { type: res.data?.port } |
| 696 | - ) | 707 | + ) |
| 697 | - .finally(() => { | 708 | + .finally(() => { |
| 698 | - this.cancelDownload() | 709 | + this.cancelDownload(); |
| 699 | - }); | 710 | + }); |
| 700 | - } | 711 | + } |
| 701 | - } | 712 | + } |
| 702 | - }).catch(err =>{ | 713 | + }) |
| 703 | - console.log(err) | 714 | + .catch((err) => { |
| 704 | - }) | 715 | + console.log(err); |
| 705 | - | 716 | + }); |
| 706 | }, | 717 | }, |
| 707 | 718 | ||
| 708 | - datasDownload(dataSource){ | 719 | + datasDownload(dataSource) { |
| 709 | let obj = { | 720 | let obj = { |
| 710 | - billNo: this.sreachFormData.billNo, | 721 | + billNo: this.sreachFormData.billNo, |
| 711 | - declareId: [], | 722 | + declareId: [], |
| 712 | - logisticsNo: this.sreachFormData.logisticsNo, | 723 | + logisticsNo: this.sreachFormData.logisticsNo, |
| 713 | - orderNo: this.sreachFormData.orderNo, | 724 | + orderNo: this.sreachFormData.orderNo, |
| 714 | - receiptStatus: this.sreachFormData.receiptStatus, | 725 | + receiptStatus: this.sreachFormData.receiptStatus, |
| 715 | - dataSource | 726 | + dataSource, |
| 716 | - }; | 727 | + }; |
| 717 | - obj.startCreateTime = ""; | 728 | + obj.startCreateTime = ""; |
| 718 | - obj.endCreateTime = ""; | 729 | + obj.endCreateTime = ""; |
| 719 | - if (this.sreachFormData.createTime.length > 0) { | 730 | + if (this.sreachFormData.createTime.length > 0) { |
| 720 | - obj.startCreateTime = this.sreachFormData.createTime[0]; | 731 | + obj.startCreateTime = this.sreachFormData.createTime[0]; |
| 721 | - obj.endCreateTime = this.sreachFormData.createTime[1]; | 732 | + obj.endCreateTime = this.sreachFormData.createTime[1]; |
| 722 | - } | 733 | + } |
| 723 | - this.selected.forEach((item) => { | 734 | + this.selected.forEach((item) => { |
| 724 | - obj.declareId.push(item.declareId); | 735 | + obj.declareId.push(item.declareId); |
| 725 | - }); | 736 | + }); |
| 726 | - exportDeclareData(obj).then((res)=>{ | 737 | + exportDeclareData(obj) |
| 727 | - // if (res.code === "200") { | 738 | + .then((res) => { |
| 728 | - // // this.alertSuccessMsg(res.message); | 739 | + // if (res.code === "200") { |
| 729 | - // } else { | 740 | + // // this.alertSuccessMsg(res.message); |
| 730 | - // console.log(res.message); | 741 | + // } else { |
| 731 | - // this.alertWarningMsg(res.message); | 742 | + // console.log(res.message); |
| 732 | - // } | 743 | + // this.alertWarningMsg(res.message); |
| 733 | - | 744 | + // } |
| 734 | - }).catch((err)=>{ | 745 | + }) |
| 735 | - console.log(err); | 746 | + .catch((err) => { |
| 736 | - this.alertErrorMsg(err); | 747 | + console.log(err); |
| 737 | - }).finally(res =>{ | 748 | + this.alertErrorMsg(err); |
| 738 | - this.loadings.exportDeclareLoading = false; | 749 | + }) |
| 739 | - this.datasExportVisible = false | 750 | + .finally((res) => { |
| 740 | - this.$refs.exportDialog.datasExportVisible = false | 751 | + this.loadings.exportDeclareLoading = false; |
| 741 | - }) | 752 | + this.datasExportVisible = false; |
| 753 | + this.$refs.exportDialog.datasExportVisible = false; | ||
| 754 | + }); | ||
| 742 | }, | 755 | }, |
| 743 | //导出 | 756 | //导出 |
| 744 | downloadData() { | 757 | downloadData() { |
| 745 | this.loadings.exportDeclareLoading = true; | 758 | this.loadings.exportDeclareLoading = true; |
| 746 | - this.$store.dispatch("GetInfo").then(res =>{ | 759 | + this.$store |
| 747 | - console.log('res====', res) | 760 | + .dispatch("GetInfo") |
| 748 | - if (res.code == 200) { | 761 | + .then((res) => { |
| 749 | - console.log('port===', res.data?.port?.split(',')) | 762 | + console.log("res====", res); |
| 750 | - if (res.data?.port?.split(',').length == 2) { | 763 | + if (res.code == 200) { |
| 751 | - this.datasExportVisible = true | 764 | + console.log("port===", res.data?.port?.split(",")); |
| 752 | - } else { | 765 | + if (res.data?.port?.split(",").length == 2) { |
| 753 | - this.datasDownload(res.data?.port) | 766 | + this.datasExportVisible = true; |
| 754 | - } | 767 | + } else { |
| 755 | - } | 768 | + this.datasDownload(res.data?.port); |
| 756 | - }).catch(err =>{ | 769 | + } |
| 757 | - console.log(err) | 770 | + } |
| 758 | - }) | 771 | + }) |
| 772 | + .catch((err) => { | ||
| 773 | + console.log(err); | ||
| 774 | + }); | ||
| 759 | }, | 775 | }, |
| 760 | - startDatasExport(dataSource){ | 776 | + startDatasExport(dataSource) { |
| 761 | - this.datasDownload(dataSource) | 777 | + this.datasDownload(dataSource); |
| 762 | }, | 778 | }, |
| 763 | - cancelDatasExport(){ | 779 | + cancelDatasExport() { |
| 764 | - this.datasExportVisible = false | 780 | + this.datasExportVisible = false; |
| 765 | this.loadings.exportDeclareLoading = false; | 781 | this.loadings.exportDeclareLoading = false; |
| 766 | }, | 782 | }, |
| 767 | 783 | ||
| 768 | - /** | 784 | + /** |
| 769 | - * 通用申报方法 | 785 | + * 通用申报方法 |
| 770 | - * @param {string} loadingKey - 加载状态的 key(如 'dropDownLoading', 'departureLoading', 'revokeLoading') | 786 | + * @param {string} loadingKey - 加载状态的 key(如 'dropDownLoading', 'departureLoading', 'revokeLoading') |
| 771 | - * @param {string} dropdownName - 当前操作名称(如 '撤销单申报') | 787 | + * @param {string} dropdownName - 当前操作名称(如 '撤销单申报') |
| 772 | - * @param {string} dropdownCode - 当前操作代码(如 'full') | 788 | + * @param {string} dropdownCode - 当前操作代码(如 'full') |
| 773 | - */ | 789 | + */ |
| 774 | - declareData(loadingKey, dropdownName, dropdownCode) { | 790 | + declareData(loadingKey, dropdownName, dropdownCode) { |
| 775 | - if (this.selected.length === 0) { | 791 | + if (this.selected.length === 0) { |
| 776 | - this.alertWarningMsg("请选择数据!"); | 792 | + this.alertWarningMsg("请选择数据!"); |
| 777 | - return; | 793 | + return; |
| 778 | - } | 794 | + } |
| 779 | 795 | ||
| 780 | - // 设置加载状态 | 796 | + // 设置加载状态 |
| 781 | - this.$set(this.loadings, loadingKey, true); | 797 | + this.$set(this.loadings, loadingKey, true); |
| 782 | - // 构造请求参数 | 798 | + // 构造请求参数 |
| 783 | - const obj = { | 799 | + const obj = { |
| 784 | - declareIds: this.selected.map(item => item.declareId), | 800 | + declareIds: this.selected.map((item) => item.declareId), |
| 785 | - type: dropdownCode, | 801 | + type: dropdownCode, |
| 786 | - }; | 802 | + }; |
| 787 | 803 | ||
| 788 | - // 如果是撤销单申报,显示弹窗并返回 | 804 | + // 如果是撤销单申报,显示弹窗并返回 |
| 789 | - if (dropdownName === '撤销单申报') { | 805 | + if (dropdownName === "撤销单申报") { |
| 790 | - this.revokeVisible = true; | 806 | + this.revokeVisible = true; |
| 791 | - this.$set(this.loadings, loadingKey, false); | 807 | + this.$set(this.loadings, loadingKey, false); |
| 792 | - this.dropdownCode = dropdownCode; | 808 | + this.dropdownCode = dropdownCode; |
| 793 | - return; | 809 | + return; |
| 794 | - } | 810 | + } |
| 795 | 811 | ||
| 796 | - // 提交申报数据 | 812 | + // 提交申报数据 |
| 797 | - declareDataUpload(obj) | 813 | + declareDataUpload(obj) |
| 798 | - .then((res) => { | 814 | + .then((res) => { |
| 799 | - if (res.code === "200") { | 815 | + if (res.code === "200") { |
| 800 | - this.alertSuccessMsg("数据已成功提交申报,请等待海关回执。"); | 816 | + this.alertSuccessMsg("数据已成功提交申报,请等待海关回执。"); |
| 801 | - } else { | 817 | + } else { |
| 802 | - this.alertWarningMsg(res.message); | 818 | + this.alertWarningMsg(res.message); |
| 803 | - } | 819 | + } |
| 804 | - }) | 820 | + }) |
| 805 | - .catch((err) => { | 821 | + .catch((err) => { |
| 806 | - console.error(err); | 822 | + console.error(err); |
| 807 | - this.alertWarningMsg("申报失败,请稍后重试。"); | 823 | + this.alertWarningMsg("申报失败,请稍后重试。"); |
| 808 | - }) | 824 | + }) |
| 809 | - .finally(() => { | 825 | + .finally(() => { |
| 810 | - // 无论成功或失败,都重置加载状态并刷新数据 | 826 | + // 无论成功或失败,都重置加载状态并刷新数据 |
| 811 | - this.$set(this.loadings, loadingKey, false); | 827 | + this.$set(this.loadings, loadingKey, false); |
| 812 | - this.search(0); | 828 | + this.search(0); |
| 813 | - }); | 829 | + }); |
| 814 | - }, | 830 | + }, |
| 815 | //切换申报模式 | 831 | //切换申报模式 |
| 816 | dropdownChange(val) { | 832 | dropdownChange(val) { |
| 817 | this.dropdownName = val.name; | 833 | this.dropdownName = val.name; |
| ... | @@ -823,8 +839,8 @@ export default { | ... | @@ -823,8 +839,8 @@ export default { |
| 823 | // } | 839 | // } |
| 824 | this.search(1); | 840 | this.search(1); |
| 825 | this.outerVisible = false; | 841 | this.outerVisible = false; |
| 826 | - this.tableMaxheight = window.innerHeight - 355; | 842 | + this.tableMaxheight = window.innerHeight - 300; |
| 827 | - this.$forceUpdate() | 843 | + this.$forceUpdate(); |
| 828 | }, | 844 | }, |
| 829 | popoverChange(val) { | 845 | popoverChange(val) { |
| 830 | this.tableData = val.tableData; | 846 | this.tableData = val.tableData; |
| ... | @@ -839,7 +855,7 @@ export default { | ... | @@ -839,7 +855,7 @@ export default { |
| 839 | }) | 855 | }) |
| 840 | .finally(() => { | 856 | .finally(() => { |
| 841 | this.$nextTick(() => { | 857 | this.$nextTick(() => { |
| 842 | - this.$store.dispatch('setLoadingState', false) | 858 | + this.$store.dispatch("setLoadingState", false); |
| 843 | this.$refs.orderReceiptStatusPopover.tableLoading = false; | 859 | this.$refs.orderReceiptStatusPopover.tableLoading = false; |
| 844 | this.$refs.wayBillReceiptPopover.tableLoading = false; | 860 | this.$refs.wayBillReceiptPopover.tableLoading = false; |
| 845 | this.$refs.listReceiptStatusPopover.tableLoading = false; | 861 | this.$refs.listReceiptStatusPopover.tableLoading = false; |
| ... | @@ -905,8 +921,7 @@ export default { | ... | @@ -905,8 +921,7 @@ export default { |
| 905 | console.log(err); | 921 | console.log(err); |
| 906 | reject(); | 922 | reject(); |
| 907 | }); | 923 | }); |
| 908 | - } | 924 | + } else if (type == "logisticsReceiptStatus") { |
| 909 | - else if (type == "logisticsReceiptStatus") { | ||
| 910 | getLogisticsReceipt(obj) | 925 | getLogisticsReceipt(obj) |
| 911 | .then((res) => { | 926 | .then((res) => { |
| 912 | if (res.code === "200") { | 927 | if (res.code === "200") { |
| ... | @@ -919,8 +934,7 @@ export default { | ... | @@ -919,8 +934,7 @@ export default { |
| 919 | console.log(err); | 934 | console.log(err); |
| 920 | reject(); | 935 | reject(); |
| 921 | }); | 936 | }); |
| 922 | - } | 937 | + } else if (type == "allLogDataReceiptStatus") { |
| 923 | - else if (type == "allLogDataReceiptStatus") { | ||
| 924 | getDeclarationLog(id) | 938 | getDeclarationLog(id) |
| 925 | .then((res) => { | 939 | .then((res) => { |
| 926 | if (res.code === "200") { | 940 | if (res.code === "200") { |
| ... | @@ -980,13 +994,13 @@ export default { | ... | @@ -980,13 +994,13 @@ export default { |
| 980 | }); | 994 | }); |
| 981 | } | 995 | } |
| 982 | }, | 996 | }, |
| 983 | - cancelRevoke(){ | 997 | + cancelRevoke() { |
| 984 | this.loadings.dropDownLoading = false; | 998 | this.loadings.dropDownLoading = false; |
| 985 | - this.revokeVisible = false | 999 | + this.revokeVisible = false; |
| 986 | - this.dropdownCode = 'full' | 1000 | + this.dropdownCode = "full"; |
| 987 | }, | 1001 | }, |
| 988 | update(val) { | 1002 | update(val) { |
| 989 | - this.$router.push({ | 1003 | + this.$router.push({ |
| 990 | name: "EditReportingData", | 1004 | name: "EditReportingData", |
| 991 | params: { data: val }, | 1005 | params: { data: val }, |
| 992 | }); | 1006 | }); |
| ... | @@ -995,42 +1009,43 @@ export default { | ... | @@ -995,42 +1009,43 @@ export default { |
| 995 | showTotalLog(row) { | 1009 | showTotalLog(row) { |
| 996 | this.$store.state.viewOption.loadingDatas = true; | 1010 | this.$store.state.viewOption.loadingDatas = true; |
| 997 | this.selectedLogRow = row; | 1011 | this.selectedLogRow = row; |
| 998 | - this.$set(row, 'logLoading', true); | 1012 | + this.$set(row, "logLoading", true); |
| 999 | 1013 | ||
| 1000 | - this.receiptApi(row.declareId, "allLogDataReceiptStatus") | 1014 | + this.receiptApi(row.declareId, "allLogDataReceiptStatus").then( |
| 1001 | - .then((logData) => { | 1015 | + (logData) => { |
| 1002 | - this.$set(row, 'popoverData', logData); | 1016 | + this.$set(row, "popoverData", logData); |
| 1003 | 1017 | ||
| 1004 | - if(!this.selectedLogRow.popoverData.length){ | 1018 | + if (!this.selectedLogRow.popoverData.length) { |
| 1005 | this.$store.state.viewOption.loadingDatas = false; | 1019 | this.$store.state.viewOption.loadingDatas = false; |
| 1006 | } | 1020 | } |
| 1007 | 1021 | ||
| 1008 | // 手动触发状态更新 | 1022 | // 手动触发状态更新 |
| 1009 | this.$nextTick(() => { | 1023 | this.$nextTick(() => { |
| 1010 | // 强制设置弹窗状态为true | 1024 | // 强制设置弹窗状态为true |
| 1011 | - row.allLogDataReceiptStatusPopoverType = true | 1025 | + row.allLogDataReceiptStatusPopoverType = true; |
| 1012 | // 强制更新表格 | 1026 | // 强制更新表格 |
| 1013 | this.tableData = [...this.tableData]; | 1027 | this.tableData = [...this.tableData]; |
| 1014 | }); | 1028 | }); |
| 1015 | - }) | 1029 | + } |
| 1030 | + ); | ||
| 1016 | }, | 1031 | }, |
| 1017 | - cancelDownload(){ | 1032 | + cancelDownload() { |
| 1018 | this.loadings.dwonloadModelLoading = false; | 1033 | this.loadings.dwonloadModelLoading = false; |
| 1019 | - this.templateDownloadVisible = false | 1034 | + this.templateDownloadVisible = false; |
| 1020 | }, | 1035 | }, |
| 1021 | - batchModify(){ | 1036 | + batchModify() { |
| 1022 | if (!this.selected.length) { | 1037 | if (!this.selected.length) { |
| 1023 | this.alertWarningMsg("请选择数据!"); | 1038 | this.alertWarningMsg("请选择数据!"); |
| 1024 | - return | 1039 | + return; |
| 1025 | } | 1040 | } |
| 1026 | - this.batchModifyVisible = true | 1041 | + this.batchModifyVisible = true; |
| 1027 | }, | 1042 | }, |
| 1028 | - cancelBatchModify(val){ | 1043 | + cancelBatchModify(val) { |
| 1029 | - this.batchModifyVisible = false | 1044 | + this.batchModifyVisible = false; |
| 1030 | - if(val === 1){ | 1045 | + if (val === 1) { |
| 1031 | this.search(0); | 1046 | this.search(0); |
| 1032 | } | 1047 | } |
| 1033 | - } | 1048 | + }, |
| 1034 | }, | 1049 | }, |
| 1035 | }; | 1050 | }; |
| 1036 | </script> | 1051 | </script> |
| ... | @@ -1087,9 +1102,9 @@ export default { | ... | @@ -1087,9 +1102,9 @@ export default { |
| 1087 | transform: translate(0, -50%); | 1102 | transform: translate(0, -50%); |
| 1088 | z-index: 10; | 1103 | z-index: 10; |
| 1089 | } | 1104 | } |
| 1090 | -.revokeOperation{ | 1105 | +.revokeOperation { |
| 1091 | - margin-bottom:25px; | 1106 | + margin-bottom: 25px; |
| 1092 | - .revokeSubmitBtn{ | 1107 | + .revokeSubmitBtn { |
| 1093 | margin-right: 30px; | 1108 | margin-right: 30px; |
| 1094 | } | 1109 | } |
| 1095 | } | 1110 | } | ... | ... |
-
Please register or login to post a comment